A636 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A6 · Lesson 36 · Taylor series

Building any smooth function out of powers of x

A calculator has no sine table inside. To find sin⁡0.3 it adds up a handful of terms: 0.3−0.33/6+0.35/120−⋯, and stops when the next term is too small to matter. Smooth functions can all be built this way, out of plain powers of x, and engineers use the first one or two terms of these sums constantly as approximations.

Play

  • The yellow curve is sin⁡x. The blue curve is its Taylor polynomial: the sum of its series up to the power N.
  • Start at N=1: a straight line, x. Raise N one step at a time and watch how far from the middle the polynomial hugs the sine.
  • At N=15, over what range of x is the fit good? What happens beyond it?

Predict

Near x=0, the first term alone gives sin⁡x≈x. Using the first two terms, x−x3/6, how close is the estimate at x=0.5?

Name it

Matching a function's derivatives at a point

The Taylor series of f about a point a is the power series whose value and every derivative match f's at a:

f(x)=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+f′′′(a)3!(x−a)3+⋯

The kth term's coefficient is f(k)(a)/k!: differentiating (x−a)k k times leaves k!, which the factorial cancels. About a=0 (a Maclaurin series) the ones to know are:

FunctionSeriesConverges for
ex1+x+x22!+x33!+⋯all x
sin⁡xx−x33!+x55!−⋯all x
cos⁡x1−x22!+x44!−⋯all x
11−x1+x+x2+x3+⋯|x|<1
ln⁡(1+x)x−x22+x33−⋯−1<x≤1
(1+x)n1+nx+n(n−1)2x2+⋯|x|<1

Using them as approximations. For small x, keep the first one or two terms:

sin⁡x≈x,cos⁡x≈1−x22,ex≈1+x,1+x≈1+x2,11+x≈1−x

How good is it? For series like these, whose terms shrink and alternate in sign, the error is smaller than the first term left out. That's the number to quote when you say an approximation is good to 0.1%.

The series for 1/(1−x) is the geometric series from lesson 24; it stops converging at |x|=1, where the function itself blows up. A series can only reach as far from its center as the nearest place where the function misbehaves.

Worked example

Estimate e0.2 with the Taylor polynomial of degree 3 about 0.

Show the solution
  1. Add the four terms. e0.2≈1+0.2+0.042+0.0086=1+0.2+0.02+0.001333=1.221333
  2. Compare. The true value is 1.221403, so four terms give four correct digits. Near the center, each extra term multiplies the accuracy by roughly x/n.

Answer e0.2≈1.221333, against the true value 1.221403.

Worked example

Use the Taylor polynomial of x about x=4 to estimate 4.1.

Show the solution
  1. Derivatives at x=4. f(4)=2f′(x)=12xf′(4)=14f′′(x)=−14x−3/2f′′(4)=−132
  2. Build the polynomial. x≈2+x−44−(x−4)264
  3. Evaluate at 4.1. 4.1≈2+0.025−0.000156=2.024844
  4. Compare. The true value is 2.024846. Centering the series at a point where you know the function well is what makes it useful.

Answer 4.1≈2.024844, against the true value 2.024846.

Worked example

Estimate cos⁡62° from a degree-2 Taylor polynomial about 60°.

Show the solution
  1. Expand about a=π/3. cos⁡(a+h)≈cos⁡a−sin⁡ah−cos⁡a2h2=0.5−0.866h−0.25h2
  2. Put in h. With h=2°=0.03491 rad: cos⁡62°≈0.5−0.03023−0.00030=0.46947
  3. Compare. The true value is 0.469 47, to five places: expanding about a nearby point with known values works far better than expanding about 0.

Answer cos⁡62°≈0.46947, right to five places.

Check

Estimate e0.2 with the first three terms of its series.

Check

What is the coefficient of x2 in the series for e3x?

Check

Write the Taylor polynomial of cos⁡x about 0 up to the x4 term.

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

For small x, which is the best simple approximation to 1+x?

Check

Estimate cos⁡(60°+2°) from the degree-2 Taylor polynomial about 60°.

(a)

What does the polynomial give?

(b)

What is the true value?

Check

Build the Taylor series of ex about 0.

Step 1

Every derivative of ex is ex. What is f(n)(0)?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why does a Taylor polynomial get more accurate near its center as you add terms?

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.