Taylor and Maclaurin series

Print the chapter

Every lesson of the chapter, ready for paper. Exercise sets are lettered A, B, C… and answered at the end.

To save a PDF, choose “Save as PDF” in the print dialog.

1. Taylor polynomials

Warm-up

Three quick questions from earlier lessons.

Discover

The violet curve is y=exy = e^x. The blue curve is 1+x+x22+a x361 + x + \tfrac{x^2}{2} + a\,\tfrac{x^3}{6}. Switch aa from 0 to 1 to add the cubic term.

The curve y = eˣ and its Maclaurin polynomial of degree 2 (a = 0) or 3 (a = 1). The cubic term keeps the polynomial close to eˣ over a wider range.

What happens when you add the cubic term?

  1. The polynomial hugs exe^x over a wider range
  2. Nothing changes near the curve

Key idea

Match the value and derivatives at a point.

The Taylor polynomial of degree nn of ff centered at aa is Pn(x)=∑k=0nf(k)(a)k!(x−a)kP_n(x) = \displaystyle\sum_{k=0}^{n} \dfrac{f^{(k)}(a)}{k!}(x - a)^k. Centered at 0 it is a Maclaurin polynomial.

Worked example

P3P_3 of sin⁡x\sin x at 0.

f(0)=0f(0) = 0, f′(0)=1f'(0) = 1, f′′(0)=0f''(0) = 0, f(3)(0)=−1f^{(3)}(0) = -1
Derivatives at 0: sin, cos, −sin, −cos.
P3(x)=x−x36P_3(x) = x - \dfrac{x^3}{6}
Divide by k!.
P3(0.5)=0.4792P_3(0.5) = 0.4792
sin(0.5) = 0.4794…

Your turn, guided

Your turn: P2P_2 of cos⁡x\cos x at 0.

P2(x)=1−x22P_2(x) = 1 - \dfrac{x^2}{2}
1, 0, −1 divided by 0!, 1!, 2!.

Practice ★

  1. f(0)=−6f(0) = -6, f′(0)=−6f'(0) = -6 and f′′(0)=4f''(0) = 4. Write the degree-2 Maclaurin polynomial of ff.
  2. f(0)=4f(0) = 4, f′(0)=4f'(0) = 4 and f′′(0)=1f''(0) = 1. Write the degree-2 Maclaurin polynomial of ff.
  1. Find the degree-2 Maclaurin polynomial of f(x)=e8xf(x) = e^{ 8x}.
  2. Find the degree-2 Maclaurin polynomial of f(x)=e6xf(x) = e^{ 6x}.

Watch out!

Practice ★★

  1. Find the degree-2 Taylor polynomial of f(x)=8ln⁡xf(x) = 8\ln x centered at x=1x = 1.
  2. Find the degree-2 Taylor polynomial of f(x)=6ln⁡xf(x) = 6\ln x centered at x=1x = 1.
  1. Boss problem. f(x)=e2xf(x) = e^{ 2x}, approximated near 0 by its degree-3 Maclaurin polynomial P3P_3.

Exit ticket

Three questions to check you have got it.

  1. Find the degree-2 Maclaurin polynomial of f(x)=e8xf(x) = e^{ 8x}.
  2. Find the degree-2 Maclaurin polynomial of f(x)=e6xf(x) = e^{ 6x}.
  3. Find the degree-2 Maclaurin polynomial of f(x)=e7xf(x) = e^{ 7x}.

Summary card

Taylor polynomials

Pn(x)=∑k=0nf(k)(a)k!(x−a)kP_n(x) = \displaystyle\sum_{k=0}^{n} \dfrac{f^{(k)}(a)}{k!}(x - a)^k.

Watch out: divide by k!k!; use powers of (x−a)(x - a).

2. The Lagrange error bound

Warm-up

Three quick questions from earlier lessons.

Discover

P2P_2 matches ff, f′f' and f′′f'' at aa. Which derivative is responsible for the error?

  1. f(3)f^{(3)}
  2. f′′f''

Key idea

The next term, with the worst derivative, bounds the error.

Lagrange error bound: if ∣f(n+1)(t)∣≤M|f^{(n+1)}(t)| \le M between aa and xx, then ∣f(x)−Pn(x)∣≤M ∣x−a∣n+1(n+1)!|f(x) - P_n(x)| \le \dfrac{M\,|x - a|^{n+1}}{(n + 1)!}.

Worked example

Bound the error of P3P_3 for exe^x at x=0.5x = 0.5 (center 0).

M=2M = 2
f⁽⁴⁾ = eˣ ≤ e^0.5 < 2 on [0, 0.5].
∣R3∣≤2⋅0.5424|R_3| \le \dfrac{2 \cdot 0.5^4}{24}
|x|⁴/4!.
≈0.0052\approx 0.0052
Compute.

Your turn, guided

Your turn: ∣f(3)∣≤6|f^{(3)}| \le 6; bound the error of P2P_2 at ∣x−a∣=1|x - a| = 1.

∣R2∣≤1|R_2| \le 1
6 · 1³/3!.

Practice ★

  1. ∣f(3)(x)∣≤9|f^{(3)}(x)| \le 9 on [0,1][0, 1]. Bound the error of the degree-2 Maclaurin polynomial at x=1x = 1.
  2. ∣f(3)(x)∣≤8|f^{(3)}(x)| \le 8 on [0,1][0, 1]. Bound the error of the degree-2 Maclaurin polynomial at x=1x = 1.
  1. The Lagrange error bound for the degree-4 Taylor polynomial uses the maximum of which derivative?
    1. f(5)f^{(5)}, the next derivative
    2. f(4)f^{(4)}
    3. ff itself

Watch out!

Practice ★★

  1. On the interval, ∣f(2)(x)∣≤2|f^{(2)}(x)| \le 2. Bound the error of the degree-1 Taylor polynomial centered at aa, at a point with ∣x−a∣=12|x - a| = \tfrac{1}{2}.
  2. On the interval, ∣f(3)(x)∣≤1|f^{(3)}(x)| \le 1. Bound the error of the degree-2 Taylor polynomial centered at aa, at a point with ∣x−a∣=12|x - a| = \tfrac{1}{2}.

Exit ticket

Three questions to check you have got it.

  1. ∣f(3)(x)∣≤9|f^{(3)}(x)| \le 9 on [0,1][0, 1]. Bound the error of the degree-2 Maclaurin polynomial at x=1x = 1.
  2. ∣f(3)(x)∣≤8|f^{(3)}(x)| \le 8 on [0,1][0, 1]. Bound the error of the degree-2 Maclaurin polynomial at x=1x = 1.
  3. ∣f(3)(x)∣≤2|f^{(3)}(x)| \le 2 on [0,1][0, 1]. Bound the error of the degree-2 Maclaurin polynomial at x=1x = 1.

Summary card

Lagrange error bound

∣Rn∣≤M∣x−a∣n+1(n+1)!|R_n| \le \dfrac{M|x - a|^{n+1}}{(n + 1)!}, M≥∣f(n+1)∣M \ge |f^{(n+1)}|.

Watch out: n+1n + 1 everywhere.

3. Radius and interval of convergence of a power series

Warm-up

Three quick questions from earlier lessons.

Discover

∑n=0∞xn\displaystyle\sum_{n=0}^{\infty} x^n is geometric. For which xx does it converge?

  1. −1<x<1-1 < x < 1
  2. −1≤x≤1-1 \le x \le 1

Key idea

A power series converges in an interval around its center.

∑cn(x−a)n\displaystyle\sum c_n (x - a)^n converges for ∣x−a∣<R|x - a| < R and diverges for ∣x−a∣>R|x - a| > R (the radius). Find RR with the ratio test. At the endpoints x=a±Rx = a \pm R anything can happen: test each one separately.

Worked example

∑n=1∞xnn 3n\displaystyle\sum_{n=1}^{\infty} \dfrac{x^n}{n\,3^n}.

R=3R = 3
Ratio test: |x|/3 · n/(n + 1) → |x|/3.
Right endpoint excluded
x = 3: ∑1/n diverges.
Interval [−3,3)[-3, 3)
x = −3: ∑(−1)ⁿ/n converges.

Your turn, guided

Your turn: the radius of ∑xn5n\displaystyle\sum \dfrac{x^n}{5^n}.

R=5R = 5
|x|/5 < 1.

Practice ★

  1. Find the radius of convergence of ∑n=0∞xn8n\displaystyle\sum_{n=0}^{\infty} \dfrac{x^n}{ 8^n}.
  2. Find the radius of convergence of ∑n=0∞xn3n\displaystyle\sum_{n=0}^{\infty} \dfrac{x^n}{ 3^n}.
  1. Find the radius of convergence of ∑n=0∞(2x)n\displaystyle\sum_{n=0}^{\infty} (2x)^n.
  2. Find the radius of convergence of ∑n=0∞(5x)n\displaystyle\sum_{n=0}^{\infty} (5x)^n.

Watch out!

Practice ★★

  1. What is the interval of convergence of ∑n=1∞(x−7)nn\displaystyle\sum_{n=1}^{\infty} \dfrac{(x - 7)^n}{n}?
    1. [6,8)[6, 8)
    2. (6,8)(6, 8)
    3. [6,8][6, 8]

Exit ticket

Three questions to check you have got it.

  1. Find the radius of convergence of ∑n=0∞xn8n\displaystyle\sum_{n=0}^{\infty} \dfrac{x^n}{ 8^n}.
  2. Find the radius of convergence of ∑n=0∞xn3n\displaystyle\sum_{n=0}^{\infty} \dfrac{x^n}{ 3^n}.
  3. Find the radius of convergence of ∑n=0∞xn9n\displaystyle\sum_{n=0}^{\infty} \dfrac{x^n}{ 9^n}.

Summary card

Radius and interval

  1. Ratio test → ∣x−a∣<R|x - a| < R.
  2. Test x=a−Rx = a - R and x=a+Rx = a + R separately.

Watch out: solve for ∣x−a∣|x - a| carefully; never skip the endpoints.

4. Maclaurin series of eˣ, sin x, cos x and 1/(1 − x)

Warm-up

Three quick questions from earlier lessons.

Discover

Every derivative of exe^x at 0 is 1. So its Maclaurin series is ∑xnn!\displaystyle\sum \dfrac{x^n}{n!}. What about sin⁡x\sin x, whose derivatives at 0 cycle 0,1,0,−10, 1, 0, -1?

  1. x−x33!+x55!−⋯x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dotsb
  2. 1+x+x22!+⋯1 + x + \dfrac{x^2}{2!} + \dotsb

Key idea

Four series to know by heart.

ex=∑n≥0xnn!e^x = \displaystyle\sum_{n \ge 0} \dfrac{x^n}{n!}; sin⁡x=∑n≥0(−1)nx2n+1(2n+1)!\sin x = \displaystyle\sum_{n \ge 0} \dfrac{(-1)^n x^{2n+1}}{(2n+1)!}; cos⁡x=∑n≥0(−1)nx2n(2n)!\cos x = \displaystyle\sum_{n \ge 0} \dfrac{(-1)^n x^{2n}}{(2n)!} (all xx); 11−x=∑n≥0xn\dfrac{1}{1 - x} = \displaystyle\sum_{n \ge 0} x^n (∣x∣<1|x| < 1).

Worked example

The first terms of e−x2e^{-x^2}.

1+(−x2)+(−x2)22!+⋯1 + (-x^2) + \dfrac{(-x^2)^2}{2!} + \dotsb
Substitute u = −x² into eᵘ.
1−x2+x42−⋯1 - x^2 + \dfrac{x^4}{2} - \dotsb
Simplify.

Your turn, guided

Your turn: the coefficient of x2x^2 in cos⁡(3x)\cos(3x).

−92-\tfrac{9}{2}
−(3x)²/2!.

Practice ★

  1. Find the coefficient of x3x^3 in the Maclaurin series of e5xe^{ 5x}.
  2. Find the coefficient of x3x^3 in the Maclaurin series of e6xe^{ 6x}.
  1. ∑n=0∞(−1)n(1x)2n+1(2n+1)!\displaystyle\sum_{n=0}^{\infty} \dfrac{(-1)^n (1x)^{2n+1} }{(2n + 1)!} is the Maclaurin series of which function?
    1. sin⁡(1x)\sin(1x)
    2. cos⁡(1x)\cos(1x)
    3. e1xe^{ 1x}

Watch out!

Practice ★★

  1. Find the coefficient of x4x^4 in the Maclaurin series of cos⁡(2x)\cos(2x).
  2. Find the coefficient of x4x^4 in the Maclaurin series of cos⁡(5x)\cos(5x).

Exit ticket

Three questions to check you have got it.

  1. Find the coefficient of x3x^3 in the Maclaurin series of e5xe^{ 5x}.
  2. Find the coefficient of x3x^3 in the Maclaurin series of e6xe^{ 6x}.
  3. Find the coefficient of x3x^3 in the Maclaurin series of e4xe^{ 4x}.

Summary card

Known Maclaurin series

exe^x, sin⁡x\sin x (odd), cos⁡x\cos x (even), 11−x\dfrac{1}{1 - x}.

Watch out: signs alternate in sin and cos.

5. New series from known ones

Warm-up

Three quick questions from earlier lessons.

Discover

To get the series of xsin⁡xx\sin x, can you just multiply the series of sin⁡x\sin x by xx?

  1. Yes, each power goes up by one
  2. No, the derivatives must be computed again

Key idea

Build new series from known ones.

Inside its interval, a power series can be multiplied by xkx^k, have xx replaced by u(x)u(x) (such as −x2-x^2 or 3x3x), and be differentiated or integrated term by term. The radius stays the same for differentiation and integration.

Worked example

The series of ln⁡(1+x)\ln(1 + x).

11+x=1−x+x2−x3+⋯\dfrac{1}{1 + x} = 1 - x + x^2 - x^3 + \dotsb
Substitute −x into 1/(1 − u).
ln⁡(1+x)=x−x22+x33−⋯\ln(1 + x) = x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dotsb
Integrate term by term from 0.

Your turn, guided

Your turn: the coefficient of x3x^3 in x2exx^2 e^x.

11
x² · x¹/1!.

Practice ★

  1. Find the coefficient of x3x^3 in the Maclaurin series of xe4xxe^{ 4x}.
  2. Find the coefficient of x3x^3 in the Maclaurin series of xe9xxe^{ 9x}.
  3. Find the coefficient of x3x^3 in the Maclaurin series of xe2xxe^{ 2x}.

Watch out!

Practice ★★

  1. Find the coefficient of x10x^{ 10 } in the Maclaurin series of 11+x2\dfrac{1}{1 + x^2}.
  2. Find the coefficient of x2x^{ 2 } in the Maclaurin series of 11+x2\dfrac{1}{1 + x^2}.
  1. arctan⁡x=∫0xdt1+t2\arctan x = \displaystyle\int_0^x \dfrac{dt}{1 + t^2}. Find the coefficient of x3x^{ 3 } in its Maclaurin series.
  2. arctan⁡x=∫0xdt1+t2\arctan x = \displaystyle\int_0^x \dfrac{dt}{1 + t^2}. Find the coefficient of x9x^{ 9 } in its Maclaurin series.

Exit ticket

Three questions to check you have got it.

  1. Find the coefficient of x3x^3 in the Maclaurin series of xe4xxe^{ 4x}.
  2. Find the coefficient of x3x^3 in the Maclaurin series of xe9xxe^{ 9x}.
  3. Find the coefficient of x3x^3 in the Maclaurin series of xe2xxe^{ 2x}.

Summary card

New series from old

  • Multiply by xkx^k: shift the powers.
  • Substitute: replace xx by u(x)u(x).
  • Differentiate or integrate term by term.

Watch out: integrating divides by the new power.