Unit 7, lesson 108

Taylor and Maclaurin Series Theorems

When a Taylor series really equals its function, how Taylor's inequality proves it, why power series coefficients are unique, and which operations on series are valid where.

  • Theory part 215
  • Practice part 216
  • Taylor and Maclaurin Series

A Taylor series can converge and still add up to the wrong function. So two questions are always separate. Does the series converge at xx? Does it converge to f(x)f(x)? The answer to the second comes from the remainder, and once it is settled for a few basic functions, uniqueness of coefficients lets you get many more series by algebra alone.

Key terms

Equality requires the remainder to tend to zero

Definition Let ff have derivatives of all orders on an open interval II containing aa, let TnT_n be its Taylor polynomials at aa and Rn(x)=f(x)−Tn(x)R_n(x) = f(x) - T_n(x). For x∈Ix \in I,

f(x)=∑n=0∞f(n)(a)n!(x−a)nif and only iflim⁡n→∞Rn(x)=0.f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n \quad \text{if and only if} \quad \lim_{n \to \infty} R_n(x) = 0.

This holds because the partial sums of the Taylor series are exactly the Tn(x)T_n(x), and Tn(x)→f(x)T_n(x) \to f(x) means Rn(x)→0R_n(x) \to 0.

In plain words The series equals the function at xx exactly when the error of the Taylor polynomials at xx shrinks to zero.

Example For exe^x at a=0a = 0 and x≠0x \neq 0 the Lagrange form gives

Rn(x)=ez(n+1)!xn+1R_n(x) = \frac{e^z}{(n + 1)!} x^{n+1}

with zz between 00 and xx, so

∣Rn(x)∣≤e∣x∣∣x∣n+1(n+1)!.\lvert R_n(x) \rvert \le e^{\lvert x \rvert} \frac{\lvert x \rvert^{n+1}}{(n + 1)!}.

For any fixed xx the factorial eventually outgrows the power, so

lim⁡n→∞∣x∣n+1(n+1)!=0.\lim_{n \to \infty} \frac{\lvert x \rvert^{n+1}}{(n + 1)!} = 0.

At x=0x = 0 the remainder is 00 anyway. So ex=∑xnn!e^x = \sum \frac{x^n}{n!} for every real xx.

Taylor’s inequality for series

Definition Let ff have derivatives of all orders on [a−d,a+d][a - d, a + d], where d>0d > 0, and suppose there are constants MnM_n with ∣f(n+1)(t)∣≤Mn\bigl\lvert f^{(n+1)}(t) \bigr\rvert \le M_n for every n≥0n \ge 0 and every tt in that interval. Taylor’s inequality gives

∣Rn(x)∣≤Mn(n+1)!∣x−a∣n+1,∣x−a∣≤d.\lvert R_n(x) \rvert \le \frac{M_n}{(n + 1)!} \lvert x - a \rvert^{n+1}, \qquad \lvert x - a \rvert \le d.

If the right side tends to 00 as n→∞n \to \infty, in particular if one constant MM bounds every derivative on that interval, then the Taylor series equals f(x)f(x) for all ∣x−a∣≤d\lvert x - a \rvert \le d.

In plain words If you can bound all the derivatives on an interval well enough, the Taylor series is guaranteed to give the right answer there.

Example Every derivative of sin⁡x\sin x is ±sin⁡x\pm \sin x or ±cos⁡x\pm \cos x, so Mn=1M_n = 1 works on every interval. Then

∣Rn(x)∣≤∣x∣n+1(n+1)!→0for every x,\lvert R_n(x) \rvert \le \frac{\lvert x \rvert^{n+1}}{(n + 1)!} \to 0 \qquad \text{for every } x,

and the Maclaurin series of sin⁡x\sin x equals sin⁡x\sin x on all of R\mathbb{R}.

Convergence domain

Definition For a function ff with derivatives of all orders at aa, three sets can differ. They are the domain of ff, the interval of convergence of its Taylor series at aa, and the set of xx where the series converges to f(x)f(x). The third is contained in the second, and both can be much smaller than the first.

In plain words A function can be perfectly fine at a point where its series has already stopped working, and a series can converge to the wrong value.

Example The function f(x)=11+x2f(x) = \frac{1}{1 + x^2} is defined and smooth for every real xx. Its Maclaurin series ∑(−1)nx2n\sum (-1)^n x^{2n} has radius 11, so at x=2x = 2 the function equals 15\frac{1}{5} but the series diverges. For e−1/x2e^{-1/x^2} (with value 00 at 00) the series converges everywhere and equals the function only at 00.

Uniqueness of coefficients

Definition If f(x)=∑cn(x−a)nf(x) = \sum c_n (x - a)^n for all xx with ∣x−a∣<R\lvert x - a \rvert < R, where R>0R > 0, then

cn=f(n)(a)n!for every n≥0.c_n = \frac{f^{(n)}(a)}{n!} \qquad \text{for every } n \ge 0.

So a function has at most one power series expansion about a given center, and any such expansion is its Taylor series. This follows by differentiating the series term by term nn times and setting x=ax = a.

In plain words However you find a power series for ff, by substitution, multiplication or any other valid method, it is the Taylor series. You can then read derivatives off the coefficients.

Example From 11+x2=∑(−1)nx2n\frac{1}{1 + x^2} = \sum (-1)^n x^{2n} the coefficient of x10x^{10} is (−1)5=−1(-1)^5 = -1. So

f(10)(0)10!=−1,f(10)(0)=−10!=−3628800,\frac{f^{(10)}(0)}{10!} = -1, \qquad f^{(10)}(0) = -10! = -3628800,

with no differentiation needed.

Operations with valid convergence conditions

Definition Let f(x)=∑an(x−a)nf(x) = \sum a_n (x - a)^n for ∣x−a∣<R1\lvert x - a \rvert < R_1 and g(x)=∑bn(x−a)ng(x) = \sum b_n (x - a)^n for ∣x−a∣<R2\lvert x - a \rvert < R_2. Then the following hold.

  1. Sums and Cauchy products give f+gf + g and fgf g for ∣x−a∣<min⁡(R1,R2)\lvert x - a \rvert < \min(R_1, R_2).
  2. Term-by-term differentiation and integration give f′f' and antiderivatives of ff for ∣x−a∣<R1\lvert x - a \rvert < R_1.
  3. For a series centered at 00, substituting u=kxmu = k x^m into ∑anun\sum a_n u^n is valid where ∣kxm∣<R1\lvert k x^m \rvert < R_1.

By uniqueness, each resulting series is the Taylor series of the new function. Endpoints must be checked separately each time.

In plain words Combine known series freely, but write down where each result holds. The answer is valid only where every ingredient was valid.

Example Substituting u=−x2u = -x^2 into eu=∑unn!e^u = \sum \frac{u^n}{n!}, valid for every uu, gives

e−x2=∑n=0∞(−1)nx2nn!=1−x2+x42−x66+⋯e^{-x^2} = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{n!} = 1 - x^2 + \frac{x^4}{2} - \frac{x^6}{6} + \cdots

for every real xx. The coefficient of x4x^4 is 12\frac{1}{2}, so the fourth derivative of e−x2e^{-x^2} at 00 is 4!⋅12=124! \cdot \frac{1}{2} = 12.

Check yourself

  1. Prove that the Maclaurin series of cos⁡x\cos x equals cos⁡x\cos x for every real xx.
Show the answer

Every derivative of cos⁡x\cos x is ±sin⁡x\pm \sin x or ±cos⁡x\pm \cos x, so it is bounded by M=1M = 1 everywhere. Taylor’s inequality gives

∣Rn(x)∣≤∣x∣n+1(n+1)!,\lvert R_n(x) \rvert \le \frac{\lvert x \rvert^{n+1}}{(n + 1)!},

which tends to 00 for every xx.

  1. Find f(7)(0)f^{(7)}(0) for f(x)=x2exf(x) = x^2 e^x.
Show the answer

Multiply the series for exe^x by x2x^2 to get

x2ex=∑n=0∞xn+2n!.x^2 e^x = \sum_{n=0}^{\infty} \frac{x^{n+2}}{n!}.

The coefficient of x7x^7 comes from n=5n = 5 and is 15!\frac{1}{5!}. By uniqueness

f(7)(0)=7!5!=42.f^{(7)}(0) = \frac{7!}{5!} = 42.
  1. Find the Maclaurin series of ln⁡(1+x2)\ln(1 + x^2) and the set where it equals the function.
Show the answer

Substitute u=x2u = x^2 into

ln⁡(1+u)=∑n=1∞(−1)n−1unn,\ln(1 + u) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1} u^n}{n},

which is valid for −1<u≤1-1 < u \le 1. This gives

ln⁡(1+x2)=∑n=1∞(−1)n−1x2nn,\ln(1 + x^2) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1} x^{2n}}{n},

valid when x2≤1x^2 \le 1, that is for −1≤x≤1-1 \le x \le 1. For ∣x∣>1\lvert x \rvert > 1 the terms do not tend to 00.

How this lesson connects

Resources for this lesson