Skip to content

Taylor series explained

7 min read

Short answer

A Taylor series writes a smooth function as a polynomial with infinitely many terms built from its derivatives at a point aa: f(x)=∑n=0∞f(n)(a)n!(x−a)n.f(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n. Near aa, a few terms already give an excellent approximation; more terms widen the region where it works.

Diagrama = 0more terms → closer fit
Near the point a, the curve is its tangent line plus curvature; each extra Taylor term adds a correction.

Building the polynomial

Match the function and its first nn derivatives at aa. The polynomial of degree nn that does this has coefficients f(k)(a)k!\dfrac{f^{(k)}(a)}{k!}. At a=0a=0 it is called a Maclaurin series.

The series worth memorizing

ex=1+x+x22!+x33!+⋯ ,sin⁡x=x−x33!+x55!−⋯ ,e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots,\qquad \sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots, 11−x=1+x+x2+x3+⋯ (∣x∣<1).\frac1{1-x}=1+x+x^2+x^3+\cdots\ (|x|<1). Substitute, differentiate or integrate these to get others, for example e−x2=1−x2+x42−⋯e^{-x^2}=1-x^2+\tfrac{x^4}{2}-\cdots.

How good is the approximation

The error after the degree-nn term is bounded by M(n+1)!∣x−a∣n+1\dfrac{M}{(n+1)!}|x-a|^{n+1}, where MM bounds ∣f(n+1)∣|f^{(n+1)}| between aa and xx. Factorials in the denominator make the error shrink fast when ∣x−a∣|x-a| is small.

Worked example

Use the degree-3 Maclaurin polynomial of sin⁡x\sin x to estimate sin⁡(0.5)\sin(0.5) and bound the error.

sin⁡x≈x−x36\sin x\approx x-\tfrac{x^3}{6}, so sin⁡0.5≈0.5−0.1256=0.47917\sin0.5\approx0.5-\tfrac{0.125}{6}=0.47917. The next term is x5120\tfrac{x^5}{120}, at most 0.03125120≈0.00026\tfrac{0.03125}{120}\approx0.00026. The true value 0.479430.47943 differs by less than that bound. ✓

Try it yourself

Write the first four nonzero terms of the Maclaurin series of cos⁡x\cos x.

Show the answer

cos⁡x=1−x22!+x44!−x66!+⋯\cos x=1-\dfrac{x^2}{2!}+\dfrac{x^4}{4!}-\dfrac{x^6}{6!}+\cdots (derivatives cycle cos⁡,−sin⁡,−cos⁡,sin⁡\cos,-\sin,-\cos,\sin and equal 1,0,−1,01,0,-1,0 at 00).

Keep going with practice

Vidi's lessons connect Taylor polynomials to linearization and the second derivative test in several variables.