Taylor polynomials get better as their degree rises. Let the degree grow
without end, and the polynomial becomes a power series, the Taylor series
of f f f at a a a :
∑ n = 0 ∞ f ( n ) ( a ) n ! ( x − a ) n = f ( a ) + f ′ ( a ) ( x − a ) + f ′ ′ ( a ) 2 ! ( x − a ) 2 + ⋯ \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x - a)^n = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \cdots n = 0 ∑ ∞ n ! f ( n ) ( a ) ( x − a ) n = f ( a ) + f ′ ( a ) ( x − a ) + 2 ! f ′′ ( a ) ( x − a ) 2 + ⋯
Centered at a = 0 a = 0 a = 0 it is a Maclaurin series . A handful of these come up
constantly:
Function Maclaurin series Converges for e x e^x e x 1 + x + x 2 2 ! + x 3 3 ! + ⋯ 1 + x + \tfrac{x^2}{2!} + \tfrac{x^3}{3!} + \cdots 1 + x + 2 ! x 2 + 3 ! x 3 + ⋯ all x x x sin x \sin x sin x x − x 3 3 ! + x 5 5 ! − ⋯ x - \tfrac{x^3}{3!} + \tfrac{x^5}{5!} - \cdots x − 3 ! x 3 + 5 ! x 5 − ⋯ all x x x cos x \cos x cos x 1 − x 2 2 ! + x 4 4 ! − ⋯ 1 - \tfrac{x^2}{2!} + \tfrac{x^4}{4!} - \cdots 1 − 2 ! x 2 + 4 ! x 4 − ⋯ all x x x 1 1 − x \tfrac{1}{1 - x} 1 − x 1 1 + x + x 2 + x 3 + ⋯ 1 + x + x^2 + x^3 + \cdots 1 + x + x 2 + x 3 + ⋯ − 1 < x < 1 -1 < x < 1 − 1 < x < 1 ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) x − x 2 2 + x 3 3 − ⋯ x - \tfrac{x^2}{2} + \tfrac{x^3}{3} - \cdots x − 2 x 2 + 3 x 3 − ⋯ − 1 < x ≤ 1 -1 < x \le 1 − 1 < x ≤ 1 arctan x \arctan x arctan x x − x 3 3 + x 5 5 − ⋯ x - \tfrac{x^3}{3} + \tfrac{x^5}{5} - \cdots x − 3 x 3 + 5 x 5 − ⋯ − 1 ≤ x ≤ 1 -1 \le x \le 1 − 1 ≤ x ≤ 1
Example 1 — The series for e^x
Find the Maclaurin series of e x e^x e x .
Every derivative of e x e^x e x is e x e^x e x , and e 0 = 1 e^0 = 1 e 0 = 1 , so every coefficient is
1 n ! \tfrac{1}{n!} n ! 1 :
e x = ∑ n = 0 ∞ x n n ! = 1 + x + x 2 2 + x 3 6 + ⋯ e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots e x = n = 0 ∑ ∞ n ! x n = 1 + x + 2 x 2 + 6 x 3 + ⋯ At x = 1 x = 1 x = 1 this gives e = 1 + 1 + 1 2 + 1 6 + ⋯ e = 1 + 1 + \tfrac{1}{2} + \tfrac{1}{6} + \cdots e = 1 + 1 + 2 1 + 6 1 + ⋯ .
A Taylor series is built from derivatives at a single point, so it is fair to
ask whether it really adds up to f ( x ) f(x) f ( x ) elsewhere. It does exactly when the
error of P n ( x ) P_n(x) P n ( x ) shrinks to 0 0 0 as n n n grows. For e x e^x e x , the Lagrange bound is
e ∣ x ∣ ∣ x ∣ n + 1 ( n + 1 ) ! e^{\lvert x \rvert}\tfrac{\lvert x \rvert^{n+1}}{(n + 1)!} e ∣ x ∣ ( n + 1 )! ∣ x ∣ n + 1 , and the factorial
eventually beats any power, so the error vanishes for every x x x . For
1 1 − x \tfrac{1}{1 - x} 1 − x 1 , the polynomials follow the curve only inside the interval
of convergence:
Polynomials from the series for 1/(1 − x)
The curve y = 1/(1 − x), rising toward an asymptote at x = 1, with the polynomials 1 + x + x² and 1 + x + ⋯ + x⁶. Between the dashed lines at x = −1 and x = 1 the polynomials close in on the curve as the degree rises; outside that interval they swing away from it.
-1 1 -1 1 2 3 4 5 6 x y
Polynomials from the series for 1/(1 − x)
A Taylor series equals its function exactly where the errors of its
polynomials shrink to zero. For all six series in the table, that is the
whole interval of convergence.
Derivatives can get messy, and there is rarely a need to compute them. A known
series can be changed into a new one:
Substitute: replace x x x by − x 2 -x^2 − x 2 , 2 x 2x 2 x or x 3 x^3 x 3 .
Multiply by a power of x x x .
Differentiate or integrate term by term, which keeps the radius of
convergence (the endpoints need checking again).
Example 2 — Substitution
Find the Maclaurin series of e − x 2 e^{-x^2} e − x 2 .
Replace x x x by − x 2 -x^2 − x 2 in the series for e x e^x e x :
e − x 2 = ∑ n = 0 ∞ ( − x 2 ) n n ! = 1 − x 2 + x 4 2 ! − x 6 3 ! + ⋯ e^{-x^2} = \sum_{n=0}^{\infty} \frac{(-x^2)^n}{n!} = 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots e − x 2 = n = 0 ∑ ∞ n ! ( − x 2 ) n = 1 − x 2 + 2 ! x 4 − 3 ! x 6 + ⋯ It converges for all x x x , like the series it came from.
Example 3 — Integrating term by term
Find the Maclaurin series of arctan x \arctan x arctan x .
Substitute − x 2 -x^2 − x 2 into the geometric series:
1 1 + x 2 = 1 − x 2 + x 4 − x 6 + ⋯ \tfrac{1}{1 + x^2} = 1 - x^2 + x^4 - x^6 + \cdots 1 + x 2 1 = 1 − x 2 + x 4 − x 6 + ⋯ for ∣ x ∣ < 1 \lvert x \rvert < 1 ∣ x ∣ < 1 .
Since arctan x = ∫ 0 x d t 1 + t 2 \arctan x = \int_0^x \tfrac{dt}{1 + t^2} arctan x = ∫ 0 x 1 + t 2 d t , integrate each term:
arctan x = x − x 3 3 + x 5 5 − x 7 7 + ⋯ \arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots arctan x = x − 3 x 3 + 5 x 5 − 7 x 7 + ⋯ At x = 1 x = 1 x = 1 this becomes π 4 = 1 − 1 3 + 1 5 − ⋯ \tfrac{\pi}{4} = 1 - \tfrac{1}{3} + \tfrac{1}{5} - \cdots 4 π = 1 − 3 1 + 5 1 − ⋯ .
Example 4 — Differentiating term by term
Find a series for 1 ( 1 − x ) 2 \tfrac{1}{(1 - x)^2} ( 1 − x ) 2 1 .
It is the derivative of 1 1 − x \tfrac{1}{1 - x} 1 − x 1 , so differentiate
1 + x + x 2 + x 3 + ⋯ 1 + x + x^2 + x^3 + \cdots 1 + x + x 2 + x 3 + ⋯ :
1 ( 1 − x ) 2 = 1 + 2 x + 3 x 2 + 4 x 3 + ⋯ = ∑ n = 1 ∞ n x n − 1 ∣ x ∣ < 1 \frac{1}{(1 - x)^2} = 1 + 2x + 3x^2 + 4x^3 + \cdots = \sum_{n=1}^{\infty} n x^{n-1} \qquad \lvert x \rvert < 1 ( 1 − x ) 2 1 = 1 + 2 x + 3 x 2 + 4 x 3 + ⋯ = n = 1 ∑ ∞ n x n − 1 ∣ x ∣ < 1
Example 5 — An integral with no antiderivative
Estimate ∫ 0 1 e − x 2 d x \int_0^1 e^{-x^2}\,dx ∫ 0 1 e − x 2 d x .
e − x 2 e^{-x^2} e − x 2 has no elementary antiderivative, but its series integrates term
by term:
∫ 0 1 ( 1 − x 2 + x 4 2 − x 6 6 + ⋯ ) d x = 1 − 1 3 + 1 10 − 1 42 + ⋯ \int_0^1 \left(1 - x^2 + \frac{x^4}{2} - \frac{x^6}{6} + \cdots\right)dx = 1 - \frac{1}{3} + \frac{1}{10} - \frac{1}{42} + \cdots ∫ 0 1 ( 1 − x 2 + 2 x 4 − 6 x 6 + ⋯ ) d x = 1 − 3 1 + 10 1 − 42 1 + ⋯ Four terms give 0.7429 0.7429 0.7429 . The series alternates with shrinking terms, so the
error is less than the next term, 1 216 ≈ 0.005 \tfrac{1}{216} \approx 0.005 216 1 ≈ 0.005 . The true value
is 0.7468 0.7468 0.7468 .
Example 6 — A limit
Find lim x → 0 sin x − x x 3 \displaystyle\lim_{x \to 0} \frac{\sin x - x}{x^3} x → 0 lim x 3 sin x − x .
sin x − x = − x 3 6 + x 5 120 − ⋯ \sin x - x = -\tfrac{x^3}{6} + \tfrac{x^5}{120} - \cdots sin x − x = − 6 x 3 + 120 x 5 − ⋯ , so
sin x − x x 3 = − 1 6 + x 2 120 − ⋯ ⟶ − 1 6 \frac{\sin x - x}{x^3} = -\frac{1}{6} + \frac{x^2}{120} - \cdots \longrightarrow -\frac{1}{6} x 3 sin x − x = − 6 1 + 120 x 2 − ⋯ ⟶ − 6 1
Common mistake
Substituting only part of the term. The series for sin 2 x \sin 2x sin 2 x is
∑ ( − 1 ) n ( 2 x ) 2 n + 1 ( 2 n + 1 ) ! \sum \tfrac{(-1)^n (2x)^{2n+1}}{(2n + 1)!} ∑ ( 2 n + 1 )! ( − 1 ) n ( 2 x ) 2 n + 1 : the 2 2 2 is raised to the power with the
x x x . Writing 2 ∑ ( − 1 ) n x 2 n + 1 ( 2 n + 1 ) ! 2\sum \tfrac{(-1)^n x^{2n+1}}{(2n + 1)!} 2 ∑ ( 2 n + 1 )! ( − 1 ) n x 2 n + 1 gives the series of
2 sin x 2\sin x 2 sin x instead.
Common mistake
Using a series outside its interval. 1 + x + x 2 + ⋯ 1 + x + x^2 + \cdots 1 + x + x 2 + ⋯ equals
1 1 − x \tfrac{1}{1 - x} 1 − x 1 only for ∣ x ∣ < 1 \lvert x \rvert < 1 ∣ x ∣ < 1 . At x = 2 x = 2 x = 2 the series diverges,
while 1 1 − 2 = − 1 \tfrac{1}{1 - 2} = -1 1 − 2 1 = − 1 .
Common mistake
Forgetting the constant after integrating. Integrating a series term by
term produces a constant of integration. Fix it with a known value: for
arctan x \arctan x arctan x , the constant is arctan 0 = 0 \arctan 0 = 0 arctan 0 = 0 .
Find the Maclaurin series of e 3 x e^{3x} e 3 x .
Answer
∑ n = 0 ∞ 3 n x n n ! \sum_{n=0}^{\infty} \tfrac{3^n x^n}{n!} ∑ n = 0 ∞ n ! 3 n x n
Full solution
Substitute 3 x 3x 3 x for x x x in the series for e x e^x e x : ( 3 x ) n n ! = 3 n x n n ! \tfrac{(3x)^n}{n!} = \tfrac{3^n x^n}{n!} n ! ( 3 x ) n = n ! 3 n x n .
Find the Maclaurin series of x sin x x\sin x x sin x .
Answer
∑ n = 0 ∞ ( − 1 ) n x 2 n + 2 ( 2 n + 1 ) ! \sum_{n=0}^{\infty} \tfrac{(-1)^n x^{2n+2}}{(2n + 1)!} ∑ n = 0 ∞ ( 2 n + 1 )! ( − 1 ) n x 2 n + 2
Full solution
Multiply each term of the series for sin x \sin x sin x by x x x : x 2 − x 4 3 ! + x 6 5 ! − ⋯ x^2 - \tfrac{x^4}{3!} + \tfrac{x^6}{5!} - \cdots x 2 − 3 ! x 4 + 5 ! x 6 − ⋯
Find the Maclaurin series of cos ( x 2 ) \cos(x^2) cos ( x 2 ) .
Answer
∑ n = 0 ∞ ( − 1 ) n x 4 n ( 2 n ) ! \sum_{n=0}^{\infty} \tfrac{(-1)^n x^{4n}}{(2n)!} ∑ n = 0 ∞ ( 2 n )! ( − 1 ) n x 4 n
Full solution
Substitute x 2 x^2 x 2 into the series for cos x \cos x cos x : 1 − x 4 2 ! + x 8 4 ! − ⋯ 1 - \tfrac{x^4}{2!} + \tfrac{x^8}{4!} - \cdots 1 − 2 ! x 4 + 4 ! x 8 − ⋯
Starting from 1 1 + x = 1 − x + x 2 − ⋯ \tfrac{1}{1 + x} = 1 - x + x^2 - \cdots 1 + x 1 = 1 − x + x 2 − ⋯ , find the series for ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) .
Answer
x − x 2 2 + x 3 3 − ⋯ x - \tfrac{x^2}{2} + \tfrac{x^3}{3} - \cdots x − 2 x 2 + 3 x 3 − ⋯
Full solution
ln ( 1 + x ) = ∫ 0 x d t 1 + t \ln(1 + x) = \int_0^x \tfrac{dt}{1 + t} ln ( 1 + x ) = ∫ 0 x 1 + t d t . Integrate term by term; the constant is 0 0 0 since ln 1 = 0 \ln 1 = 0 ln 1 = 0 .
Find the Taylor series of e x e^x e x centered at 1 1 1 .
Answer
∑ n = 0 ∞ e n ! ( x − 1 ) n \sum_{n=0}^{\infty} \tfrac{e}{n!}(x - 1)^n ∑ n = 0 ∞ n ! e ( x − 1 ) n
Full solution
Every derivative of e x e^x e x at 1 1 1 equals e e e .
Find the sums ∑ n = 0 ∞ 1 n ! \sum_{n=0}^{\infty} \tfrac{1}{n!} ∑ n = 0 ∞ n ! 1 and ∑ n = 0 ∞ ( − 1 ) n 2 n + 1 \sum_{n=0}^{\infty} \tfrac{(-1)^n}{2n + 1} ∑ n = 0 ∞ 2 n + 1 ( − 1 ) n .
Answer
e e e and π 4 \tfrac{\pi}{4} 4 π
Full solution
The first is the series for e x e^x e x at x = 1 x = 1 x = 1 . The second is the series for arctan x \arctan x arctan x at x = 1 x = 1 x = 1 , and arctan 1 = π 4 \arctan 1 = \tfrac{\pi}{4} arctan 1 = 4 π .
Find lim x → 0 1 − cos x x 2 \displaystyle\lim_{x \to 0} \frac{1 - \cos x}{x^2} x → 0 lim x 2 1 − cos x using a series.
Answer
1 2 \tfrac{1}{2} 2 1
Full solution
1 − cos x = x 2 2 − x 4 24 + ⋯ 1 - \cos x = \tfrac{x^2}{2} - \tfrac{x^4}{24} + \cdots 1 − cos x = 2 x 2 − 24 x 4 + ⋯ , so the quotient is 1 2 − x 2 24 + ⋯ → 1 2 \tfrac{1}{2} - \tfrac{x^2}{24} + \cdots \to \tfrac{1}{2} 2 1 − 24 x 2 + ⋯ → 2 1 .
For f ( x ) = cos ( x 2 ) f(x) = \cos(x^2) f ( x ) = cos ( x 2 ) , find f ( 4 ) ( 0 ) f^{(4)}(0) f ( 4 ) ( 0 ) from its Maclaurin series.
Answer
− 12 -12 − 12
Full solution
The coefficient of x 4 x^4 x 4 is − 1 2 -\tfrac{1}{2} − 2 1 , and it equals f ( 4 ) ( 0 ) 4 ! \tfrac{f^{(4)}(0)}{4!} 4 ! f ( 4 ) ( 0 ) . So f ( 4 ) ( 0 ) = 24 ⋅ ( − 1 2 ) f^{(4)}(0) = 24 \cdot \left(-\tfrac{1}{2}\right) f ( 4 ) ( 0 ) = 24 ⋅ ( − 2 1 ) .
Estimate ∫ 0 0.5 sin ( x 2 ) d x \int_0^{0.5} \sin(x^2)\,dx ∫ 0 0.5 sin ( x 2 ) d x with two terms of a series.
Answer
About 0.04148 0.04148 0.04148
Full solution
sin ( x 2 ) = x 2 − x 6 6 + ⋯ \sin(x^2) = x^2 - \tfrac{x^6}{6} + \cdots sin ( x 2 ) = x 2 − 6 x 6 + ⋯ , so the integral is 0.5 3 3 − 0.5 7 42 + ⋯ ≈ 0.041667 − 0.000186 \tfrac{0.5^3}{3} - \tfrac{0.5^7}{42} + \cdots \approx 0.041667 - 0.000186 3 0. 5 3 − 42 0. 5 7 + ⋯ ≈ 0.041667 − 0.000186 .
A student writes the Maclaurin series of sin 2 x \sin 2x sin 2 x as 2 x − 2 x 3 3 ! + 2 x 5 5 ! − ⋯ 2x - \tfrac{2x^3}{3!} + \tfrac{2x^5}{5!} - \cdots 2 x − 3 ! 2 x 3 + 5 ! 2 x 5 − ⋯ . What went wrong?
Hint
Substitute 2 x 2x 2 x for x x x in each term, including the powers.
Answer
The 2 2 2 must be raised to each power: 2 x − ( 2 x ) 3 3 ! + ( 2 x ) 5 5 ! − ⋯ 2x - \tfrac{(2x)^3}{3!} + \tfrac{(2x)^5}{5!} - \cdots 2 x − 3 ! ( 2 x ) 3 + 5 ! ( 2 x ) 5 − ⋯
Full solution
The student’s series is 2 sin x 2\sin x 2 sin x . Substituting 2 x 2x 2 x gives 2 x − 8 x 3 6 + 32 x 5 120 − ⋯ 2x - \tfrac{8x^3}{6} + \tfrac{32x^5}{120} - \cdots 2 x − 6 8 x 3 + 120 32 x 5 − ⋯
A check: the derivative of sin 2 x \sin 2x sin 2 x at 0 0 0 is 2 cos 0 = 2 2\cos 0 = 2 2 cos 0 = 2 , and its third derivative is − 8 cos 0 = − 8 -8\cos 0 = -8 − 8 cos 0 = − 8 , so the x 3 x^3 x 3 coefficient must be − 8 3 ! \tfrac{-8}{3!} 3 ! − 8 .