Tut 10 S
Tut 10 S
Material covered
Taylor’s Theorem including remainder and Taylor series
Outcomes
After completing this tutorial you should
use Taylor’s Theorem to approximate functions and integrals;
use Taylor’s Theorem to compute limits;
is the n-th order Taylor polynomial of f centred at x = x0 . It is the best polynomial approximation of
order n near x0 . If f has at least n + 1 derivatives in a neighbourhood of x0 , then the remainder can
be written in the form
f (n+1) (c)
Rn (x) = f (x) − Tn (x) = (x − x0 )n+1 for some c strictly between x0 and x.
(n + 1)!
This is called the Lagrange form of the remainder. The remainder looks like the general term in Tn (x),
but f (n+1) is evaluated at an intermediate c value between x and x0 and not at x0 . A special case is the
Mean Value Theorem (n = 0).
To estimate Rn (x) we maximise | f (n+1) (c)| over all c between x and x0 . A common method is to
use the “worst case scenario” for an estimate:
• If | f (n) (c)| is monotone in c set c = 0 or c = x0 depending on whether it is increasing or
decreasing;
• If | f (n) (c)| is a fraction maximise the numinator and minimize the denominator, often by setting
c = 0 or c = x0 .
Often this is achieved by setting c = 0 or c = x0 , or if it is a fraction to minimize the denominator and
maximise the numerator. One can also use calculus to find the maximum, but that is not necessary
most of the time.
Taylor Series In many cases the remainder term Rn (x) goes to zero as n → ∞. In that case we call
∞
Õ f (k) (x0 )
f (x) = (x − x0 ) k
k=0
k!
the Taylor series representing f . There are cases where such a representation works for all x, or for
x in some smaller interval centred at x0 . There are also cases where the Taylor series converges, but
does not represent f (x).
x3 x5 x7 x 2n+1
sin(x) = x− + − + · · · + (−1)n +... x∈R
3! 5! 7! (2n + 1)!
x2 x4 x6 x 2n
cos(x) = 1− + − + · · · + (−1) n +... x∈R
2! 4! 6! (2n)!
1
= 1 + x + x2 + x3 + · · · + xn + . . . (geometric series) |x| < 1
1−x
x2 x3 xn
ln(1 + x) = x− + − · · · + (−1)n+1 + . . . −1 < x ≤ 1
2 3 n
∞
α
Õ α k
(1 + x) = x (binomial series, α ∈ R) |x| < 1 unless α ∈ N.
k
k=0
α α α(α − 1)(α − 3) · · · (α − k + 1)
where := 1 and := if k ≥ 1
0 k k!
(a) Show that Tn is the only polynomial with the above property, that is, if P(x) is a
polynomial of at most degree n and
f (x) − P(x)
lim = 0,
x→x0 (x − x0 )n
then P = Tn . To do so use the fact proved in Assignment 2 that if P is a polynomial of
Tn (x) − P(x)
degree at most n and lim = 0, then P = Tn .
x→x0 (x − x0 )n
Solution: By assumption we have
Tn (x) − P(x) Tn (x) − f (x) P(x) − f (x)
lim n
= lim n
− lim = 0 − 0 = 0.
x→x0 (x − x0 ) x→x 0 (x − x0 ) x→x 0 (x − x0 )n
Hence, the result from Assignment 2 implies that Tn (x) = P(x) for all x ∈ R.
(b) Assume that Tn is the n-th order Taylor polynomial of f centred at x0 = 0. Using part (a)
show that T̃mn (x) := Tn (ax m ) is the Taylor polynomial of order mn for g(x) := f (ax m )
whenever a , 0 and m ∈ N.
(c) By doing a suitable substitution, find the Taylor polynomials for the following functions
about x0 = 0.
2
2
(i) The 6-th order Taylor polynomial of e x .
Solution: The given function is et with the substitution t = x 2 . Hence we need
the 3rd order Taylor polynomial of et , which is given by
t2 t3
1+t+ + .
2 6
2
Hence the 6-th order Taylor polynomial of e x about x0 = 0 is
(x 2 )3 x4 x6
T6 (x) = 1 + x 2 + (x 2 )2 + = 1 + x2 + + .
6 2 6
√
(ii) The 10-th order Taylor polynomial of 1 − x 4 .
√
Solution: The given function is 1 + t with the substitution t = −x 4 . If we
substitute into the Taylor polynomials the powers are multiples of 4, so to get
the 10th order Taylor polynomial we only need the t 2 term√to have (−x 4 )2 = x 8 .
The next term will be x 12 and is not required. We have ( 1 + t)0 = √1 and
√ 2 1+t
( 1 + t)00 = − √ 1 3 . Hence the second order Taylor Polynomial is
4 (1+t)
1 1 t2 t t2
1+ t− =1+ −
2 42 2 8
√
Hence the 10th order Taylor polynomial of 1 − x 4 about x0 = 0 is
−x 4 (−x 4 )2 x4 x8
T10 (x) = T8 (x) = 1 + − =1− − .
2 8 2 8
2. By estimating the remainder term in the Taylor polynomial of sin x about x0 = 0, Prove that for
n
Õ (−1) k 1
all n ≥ 0, we have the estimate sin(1) − ≤ .
k=0
(2k + 1)! (2n + 2)!
Solution: Write
sin x = T2n+1 (x) + R2n+1 (x),
where T2n+1 (x) is the Taylor polynomial of order 2n + 1 of f (x) = sin x centred at x = 0. Thus
n
Õ (−1) k 2 k+1
T2n+1 (x) = x
k=0
(2k + 1)!
(this is a very common Taylor polynomial, and we should remember it!). By Taylor’s Theorem
the remainder can be written
f (2n+2) (c) 2n+2
R2n+1 (x) = x for some c between 0 and x.
(2n + 2)!
Note that f (2n+2) (x) = (−1)n+1 sin x. Thus
n
Õ (−1) k sin c
sin(1) = T2n+1 (1) + R2n+1 (1) = + (−1)n+1 for some c ∈ (0, 1).
k=0
(2k + 1)! (2n + 2)!
So
n
Õ (−1) k | sin c| 1
sin(1) − = ≤ .
k=0
(2k + 1)! (2n + 2)! (2n + 2)!
3
Remark: In fact we have the better inequality:
n
Õ (−1) k 1
sin(1) − ≤ .
k=0
(2k + 1)! (2n + 3)!
To see this, repeat the above working using the Taylor polynomial T2n+2 (x) of sin x. Note
that T2n+2 (x) = T2n+1 (x), because the “even” terms in the Taylor polynomial are zero. The
remainder R2n+2 (x) can be written as
p(3) = 5
p0(3) = 4x 3 − 21x 2 + 26x + 2 = −1
x=3
p000(3) = 3!(4x − 7) = 3! × 5
x=3
p(4) (3) = 4! × 1
Hence the polynomial is p(x) = T4 (x) = (x − 3)4 + 5(x − 3)3 + 4(x − 3)2 − (x − 3) + 5.
√
4. (a) Calculate the second order Taylor polynomial T2 (x) for f (x) = 1 + x about x = 0, and
write down a formula for the remainder term R2 (x) = f (x) − T2 (x). Hence show that
1 1 p 1 1 1
1 + x 4 − x 8 ≤ 1 + x 4 ≤ 1 + x 4 − x 8 + x 12 for all x ∈ R
2 8 2 8 16
Solution: We have
4
Thus
x x2
T2 (x) = 1 +
− .
2 8
By Taylor’s Theorem, the remainder may be expressed as
f (3) (c) 3 3 x3
R2 (x) = x = (1 + c)−5/2 x 3 =
3! 8 · 3! 16(1 + c)5/2
for some c = c(x) between 0 and x.
√
We have 1 + x − T2 (x) = R2 (x), and replacing x by x 2 gives
x 12
p 1 4 1 8
1 + x − 1 + x − x = R2 (x 4 ) =
4
2 8 16(1 + c)5/2
for some c between 0 and x 4 . Thus 0 ≤ c ≤ x 4 , and so 0 ≤ 1/(1 + c)5/2 ≤ 1. Thus
p 1 4 1 8 1 12
0 ≤ 1+x − 1+ x − x ≤
4 x for all x ∈ R, (1)
2 8 16
hence the result.
√
2 1 + x4 − 2 − x4
(b) Hence, or otherwise, calculate lim .
x→0 x8
Solution: Rearranging the above inequality gives
1 p 1 1 1
− x 8 ≤ 1 + x 4 − 1 − x 4 ≤ − x 8 + x 12
8 2 8 16
Multiplying through by 2, and dividing by x 8 , gives
√
1 2 1 + x4 − 2 − x4 1 1 4
− ≤ ≤ − + x for x , 0.
4 x8 4 8
Thus, by the squeeze law,
√
2 1 + x4 − 2 − x4 1
lim = − .
x→0 x8 8
5
1
(b) Hence, write down the 4th order Taylor polynomial of √ about x = 0.
1+x
Solution: We apply the formula from the previous part to compute the coefficients:
1
−2
=1
0
1
−2 1
=− ,
1 2
− 12 − 21 − 1
1
−2 3
= = ,
2 2 8
1 1 1 1
−2 −2 2 − 1 −2 − 2 5
= =− ,
3 3! 16
1 1 1 1 1
−2 −2 −2 − 1 −2 − 2 −2 − 3 35
= = .
3 4! 128
Hence the Taylor polynomial of order 4 is
1 1 1 35 4
T4 (x) = 1 − x + x 2 − x 3 + x .
2 8 16 128
(c) This part shows that the remainder Rn (x) approaches zero as n gets large provided that
0 ≤ x < 1.
*(i) Fix x ∈ R with |x| < 1. Using the Lagrange form of the remainder, show that
(1 + c)α α α α x n+1
Rn (x) = (−1)n α 1−α 1− 1− ··· 1−
n+1 2 3 n 1+c
for some c strictly between 0 and x. Derive that for 1 ≤ m < n and x ∈ (0, 1)
2α m |α| n+1 n+1
|Rn (x)| ≤ 1 + |α| 1 + |x| .
n+1 m
Solution: Using the Lagrange form of the remainder, there exists c between 0
and x such that
f (n+1) (c) α
Rn (x) = = (1 + c)α−n−1 x n+1
(n + 1)! n+1
We rewrite the generalised binomial term. We pair the n+1 terms in the numerator
and denominator and then simplify
7
Extra questions for further practice
6. Let f (x) = ln(1 + x).
(a) Calculate the fourth order Taylor polynomial T4 (x) for f (x) centred at 0.
Solution: We did this last week,
x2 x3 x4
T4 (x) = x − + − .
2 3 4
(b) Use Taylor’s Theorem to write down a formula for the fourth remainder term R4 (x), and
deduce that
x5 x5
≤ f (x) − T4 (x) ≤ for all x > 0.
5(1 + x)5 5
Solution: We have, for some c between 0 and x,
x5 1 x5
≤ x 5
≤ ,
5(1 + x)5 5(1 + c)5 5
hence the result.
(c) Use the previous part to compute the limit
12 ln(1 + x) − 12x + 6x 2 − 4x 3 + 3x 4
lim+
x→0 sin5 x
12x 5 12x 5
≤ 12 ln(1 + x) − 12x + 6x 2
− 4x 3
+ 3x 4
≤ .
5(1 + x)5 5
Dividing by sin5 x with x > 0 small (so that sin x > 0) we have
x 5 12 12 ln(1 + x) − 12x + 6x 2 − 4x 3 + 3x 4 12 x 5
≤ ≤ .
sin x 5(1 + x)5 sin5 x 5 sin x
12 ln(1 + x) − 12x + 6x 2 − 4x 3 + 3x 4 12
lim+ = .
x→0 sin5 x 5
x2 x3 xm
7. The Taylor series for e x is given by e x = 1 + x + + + . . . . Show that e x > for all
2 3! m!
x > 0. Fix α > 0 and prove that
xα
lim x α e−x = lim = 0.
x→∞ x→∞ ex
8
(Make a suitable choice of m and use the squeeze law.)
xm
Solution: Since all terms in the Taylor series are positive if x > 0 we clearly have e x > for
m!
all x > 0. If we choose m > α, then
xα α−m x
m m!
0< x
= x x
≤ m−α
e e x
8. There are limitations to Taylor polynomials. This question describes a function whose Taylor
polynomials are all identically zero. That is, Tn (x) = 0 for all n, and so Rn (x) = f (x) − Tn (x) =
f (x). Thus this function is “all remainder”!
Let ( 2
e−1/x if x , 0
f (x) =
0 if x = 0.
where Pn+1 (t) = −t 2 Pn (t) − 2t 3 Pn (t) is a polynomial with integer coefficients. Hence
the result is true by induction.
2
(b) Show that lim |x| −k e−1/x = 0 for all integers k ≥ 0.
x→0
Solution: It is easiest to do this limit by “changing variable” in the limit. Let y = 1/x 2 ,
√
so that |x| = 1/ y. As x → 0 we have y → ∞, and so
2 y k/2
lim |x| −k e−1/x = lim .
x→0 y→∞ ey
By repeated applications of L’Hôpital’s Rule we arrive at
1
lim y = 0 if k is even
y k/2
2
lim |x| −k e−1/x = lim =
y→∞
e
ey 1
x→0 y→∞
lim √ y = 0 if k is odd
y→∞
ye
9
(c) Show, by induction, that f (x) is differentiable as many times as we please at the point
x = 0, and that f (n) (0) = 0. Thus the nth order Taylor polynomial of f (x) centred at
x = 0 is identically zero.
Solution: For n = 0 we have f (n) (0) = f (0) (0) = f (0) = 0 by definition, starting the
induction. Suppose that f (n) (0) = 0. Then
2
f (n) (h) − f (n) (0) Pn (1/h)e−1/h − 0 2
lim = lim = lim Q(1/h)e−1/h ,
h→0 h h→0 h h→0
where we have used the first part, and the induction hypothesis, and set Q(t) = tPn (t) (a
polynomial with integer coefficients). Writing
Q(t) = a0 + a1 t + a2 t 2 + · · · + aN t N
with a0, . . . , aN ∈ Z we have
N
2 2
Õ
0 ≤ |Q(1/h)e−1/h | ≤ |a k ||h| −k e−1/h .
k=0
Therefore
f (n) (h) − f (n) (0)
lim = 0,
h→0 h
and so f (n+1) (0) = 0. So the result is true by induction.
Solution: By Taylor’s Theorem, and familiar formulae for the Taylor polynomial of et , we have
n
Õ tk ec
et = Tn (t) + Rn (t) = + t n+1 for some c between 0 and t.
k=0
k! (n + 1)!
10
Replacing t by −t 2 we have
n
2
Õ (−1) k t 2 k (−1)n+1 ec 2n+2
e−t = + t for some c between 0 and −t 2 .
k=0
k! (n + 1)!
Thus
∫ x
2 2
erf(x) = √ e−t dt
π 0
n ∫ x
2 Õ (−1) k
=√ t 2 k dt + En (x)
π k=0 k! 0
n
2 Õ (−1) k
=√ x 2 k+1 + En (x),
π k=0 (2k + 1)k!
where
x x
(−1)n+1 ec 2n+2 t 2n+2 2x 2n+3
∫ ∫
2 2
|En (x)| = √ t dt ≤ √ dt = √ .
π 0 (n + 1)! π 0 (n + 1)! π(2n + 3)(n + 1)!
*10. Use Question 2 to prove that sin(1) is irrational. Show also that cos(1) is irrational.
Solution: Recalling the solution for Question 2 we have
n
Õ (−1) k | sin c| 1
sin(1) − = ≤ .
k=0
(2k + 1)! (2n + 2)! (2n + 2)!
We also note that since c ∈ (0, 1) we have | sin c| , 0, and therefore in fact
n
Õ (−1) k 1
0 < sin(1) − ≤ for all n ≥ 0.
k=0
(2k + 1)! (2n + 2)!
Our plan now is to adapt the proof from lectures where we showed that e is irrational. So
suppose that sin(1) = p/q is rational, with p, q ∈ N (note that sin(1) > 0). Let q0 be the
smallest odd integer with q0 ≥ q. Thus q0 = q if q is odd, and if q0 = q + 1 if q is even. Now
let n be such that q0 = 2n + 1. Then the above inequality gives (after multiplying by (2n + 1)!
and replacing sin(1) be p/q)
n
p Õ (−1) k 1
0 < (2n + 1)! − ≤ .
q k=0 (2k + 1)! 2n + 2
Note that
p
(2n + 1)! ×
q
11
is an integer (because q ≤ q0 = 2n + 1), and also that
(−1) k
(2n + 1)! ×
(2k + 1)!
is an integer for each 0 ≤ k ≤ n. Therefore
n
p Õ (−1) k
(2n + 1)! − =N
q k=0 (2k + 1)!
12