Math Detours · Grade 12 · Sharpen · 12

Where the power series come from

Match derivatives at zero, one at a time. eˣ = 1 + x + x²/2 + …, sin x = x − x³/6 + …, and why your calculator can compute them.

Name ____________________Date ____________

Tonight's idea

Grade 10 took the series for \(e^x\), \(\sin x\) and \(\cos x\) on trust and built Euler's formula from them. Tonight they are derived.

Suppose a polynomial \(p(x) = a_0 + a_1x + a_2x^2 + a_3x^3 + \cdots\) matches \(f\) at 0: same value, slope, second derivative, and so on. Then \(a_0 = p(0) = f(0)\). Differentiate: \(p'(x) = a_1 + 2a_2x + 3a_3x^2 + \cdots\), and at 0 only \(a_1\) survives: \(a_1 = f'(0)\). Then \(p''(0) = 2a_2\), \(p'''(0) = 3!\,a_3\): each differentiation brings down the power and kills the terms below it, so

\(a_n = \dfrac{f^{(n)}(0)}{n!}\), with \(f^{(n)}\) the \(n\)th derivative: the Taylor series of \(f\) at 0.

For \(e^x\) every derivative is \(e^x\), so every \(f^{(n)}(0) = 1\). For \(\sin x\) the derivatives cycle \(\sin, \cos, -\sin, -\cos\), giving \(0, 1, 0, -1, \ldots\) at 0; for \(\cos x\), \(1, 0, -1, 0, \ldots\):

\[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, \qquad \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots\]

π−π1 degree 1 degree 3 degree 5 sin x
\(\sin x\) (black) with \(x\), \(x - x^3/6\) and \(x - x^3/6 + x^5/120\). Each extra term widens the stretch where the polynomial and the function agree.

Stopping after \(x^n\) gives the Taylor polynomial of degree \(n\). For these three the series converges for every \(x\), which is how a computer can find \(\sin 0.3\) by arithmetic alone. And \(x = i\theta\) in the \(e^x\) series now gives \(e^{i\theta} = \cos\theta + i\sin\theta\) with every ingredient earned.

Watch one: \(\sin 0.5\) by hand

Degree 5:

\[0.5 - \frac{0.125}{6} + \frac{0.03125}{120} = 0.5 - 0.0208333 + 0.0002604 = 0.4794271.\]

A calculator gives \(\sin 0.5 = 0.4794255\). The error, \(1.5\times10^{-6}\), is almost exactly the first term left out, \(0.5^7/7! \approx 1.55\times10^{-6}\). That is typical of a series whose terms alternate in sign and shrink: the first omitted term is a good estimate of the error, and the next term would give seven correct decimals.

Slide the degree up and down, and watch what goes wrong for \(\ln(1 + x)\) beyond \(x = 1\): mathdetours.com/demos/taylor.html.

Your turn

  1. Build the degree-4 Taylor polynomial of \(\cos x\) from scratch: list \(f, f', f'', f''', f''''\) at 0 and divide by the factorials. Use it to estimate \(\cos 0.2\) to six decimal places.
  2. Let \(f(x) = 1/(1 - x)\). (a) Show that \(f^{(n)}(0) = n!\) and write down the Taylor series. (b) You met this series in grade 10. For which \(x\) does it actually add up to \(f(x)\)? What goes wrong at \(x = 2\)?
  3. Replace \(x\) by \(-x^2\) in the series for \(e^x\) to get the series for \(e^{-x^2}\). Integrate it term by term from 0 to 1 and add the first five terms. (No formula built from elementary functions gives this integral; areas under the bell curve are computed this way.)
  4. Derive the series for \(\ln(1 + x)\) by matching derivatives: find \(f', f'', f''', f''''\) at 0, spot the pattern, and write the general term. Then set \(x = 1\) and name the number the series adds up to.

Stretch: limits by series

Use the series to find \(\displaystyle\lim_{x\to0}\frac{x - \sin x}{x^3}\) and \(\displaystyle\lim_{x\to0}\frac{1 - \cos x}{x^2}\). Then say in one sentence why \(\sin x \approx x\) is a good approximation for small angles, and how big the error is.

Answers

  1. Derivatives at 0: \(1, 0, -1, 0, 1\). \(p_4(x) = 1 - \tfrac{x^2}{2} + \tfrac{x^4}{24}\). \(\cos 0.2 \approx 1 - 0.02 + 0.0000667 = 0.980067\); the true value is \(0.9800666\).
  2. (a) \(f' = (1-x)^{-2}\), \(f'' = 2(1-x)^{-3}\), \(f''' = 6(1-x)^{-4}\), and in general \(f^{(n)} = n!\,(1-x)^{-(n+1)}\), which is \(n!\) at 0. Every coefficient is \(n!/n! = 1\): \(1 + x + x^2 + x^3 + \cdots\), the geometric series. (b) Only for \(|x| \lt 1\). At \(x = 2\) the left side is \(-1\) and the right side is \(1 + 2 + 4 + \cdots\), which grows without bound. Matching derivatives at 0 guarantees agreement near 0, not everywhere.
  3. \(e^{-x^2} = 1 - x^2 + \tfrac{x^4}{2} - \tfrac{x^6}{6} + \tfrac{x^8}{24} - \cdots\). Integrating term by term: \(1 - \tfrac13 + \tfrac1{10} - \tfrac1{42} + \tfrac1{216} \approx 0.7475\). The true value is \(0.74682\); the next term, \(-\tfrac1{1320}\), brings the sum to \(0.74673\).
  4. \(f(0) = 0\); \(f' = \tfrac{1}{1+x} \to 1\); \(f'' = -\tfrac{1}{(1+x)^2} \to -1\); \(f''' = \tfrac{2}{(1+x)^3} \to 2\); \(f'''' = -\tfrac{6}{(1+x)^4} \to -6\). Dividing by \(n!\): \(\ln(1 + x) = x - \tfrac{x^2}{2} + \tfrac{x^3}{3} - \tfrac{x^4}{4} + \cdots\), general term \((-1)^{n+1}x^n/n\). At \(x = 1\): \(1 - \tfrac12 + \tfrac13 - \tfrac14 + \cdots = \ln 2\). (It converges there, slowly. At \(x = -1\) it is minus the harmonic series, which diverges, matching \(\ln 0\).)

Stretch. \(x - \sin x = \tfrac{x^3}{6} - \tfrac{x^5}{120} + \cdots\), so \(\dfrac{x - \sin x}{x^3} = \tfrac16 - \tfrac{x^2}{120} + \cdots \to \tfrac16\). Likewise \(\dfrac{1 - \cos x}{x^2} = \tfrac12 - \tfrac{x^2}{24} + \cdots \to \tfrac12\). Since \(\sin x = x - x^3/6 + \cdots\), replacing \(\sin x\) by \(x\) makes an error of about \(x^3/6\): at \(x = 0.1\) radians that is \(0.00017\), which is why a pendulum's swing is treated as simple harmonic motion.

← PreviousNext: Lines and planes in space →