Math 253 Homework due Wednesday, March 2 SOLUTIONS 1. Find

Math 253
Homework due Wednesday, March 2
SOLUTIONS
1. Find the second degree Taylor polynomial for ln(x) centered at x = 10. Use Taylor’s
inequality to bound the error on the interval (6, 14).
Solution: Let f (x) = ln x and compute the derivatives:
f 0 (x) =
Since f 0 (10) =
x = 10 is
1
10
1
,
x
f 00 (x) = −
1
,
x2
f 000 (x) =
2
.
x3
1
and f 00 (10) = − 100
, the degree two Taylor polynomial centered at
1
1
(x − 10) −
(x − 10)2 .
10
200
Next we consider an upper bound for |f 000 (x)| on (6, 14). The graph of x23 is decreasing,
so its maximum value on [6, 14] is at the point x = 6: take M = |f 000 (6)| = 623 .
T2 (x) = ln(10) +
Taylor’s Inequality tells us that
2
63
3
ln(x) − T2 (x) < M · |x − 10| <
3!
· 43
8
= 4 ≈ 0.0987654.
6
6
Note that in the second inequality we have used that |x − 10| < 4 for x in the interval
(6, 14).
Conclusion: ln(x) and T2 (x) differ by less than 0.00617 throughout the interval (6, 14).
2. Approximate e0.4 with a third degree Taylor polynomial centered at x = 0. Use Taylor’s
Inequality to bound your error.
Solution: We start with ex ≈ 1 + x +
e0.4 ≈ 1 + (0.4) +
x2
2
+
x3
,
6
giving
(0.4)2 (0.4)3
+
≈ 1.49067.
2
6
Next, we consider the error.
Taylor’s Inequality says that
|e0.4 − T3 (0.4)| <
3
M · (0.4)4
4!
3
d
d
x
x
x
where M is the maximum value of dx
3 (e ) on [0, 0.4]. But dx3 (e ) = e , and this is
0.4
an increasing function, so that maximum value is e . We could take M = e0.4 , but
we don’t really know this number exactly. Instead, let’s just make an estimate. Surely
e0.4 < e1 = e, and we know e is about 2.7, so if we take M = 2.7 we are safe: M is
guaranteed to be large enough for our purposes. So we can write
|e0.4 − T3 (0.4)| <
2.7 · (0.4)4
≈ 0.00288.
4!
Note: There is not a single “right” answer for what to take for M in these problems. M
can be any number that is larger than the maximum value of the appropriate derivative
on the given interval. You generally want to make some effort to choose M so that it
is small enough to give you a good bound, but not so small that it takes a ridiculous
amount of work to figure out. For example, we could have taken M = 100 in the above
problem but this would give us a larger bound on the error. We could also take M = 1.5
in the above problem, but explaining why 1.5 > e0.4 is not so easy. Taking M = 2.7
was a convenient medium ground, giving us a good error bound that didn’t require too
much work.
3. How many terms of the Maclaurin series for cos(2x) should we use in order to get an
estimate for cos(2x) to within 10−6 on the interval (− 13 , 13 )?
Solution: Let f (x) = cos(2x). The first few derivatives are
f 0 (x) = −2 sin(2x),
f 00 (x) = −4 cos(2x),
f 000 (x) = 8 sin(2x),
f (4) (x) = 14 cos(2x).
We can extrapolate from this to get the general formula f (n) (x) = 2n E(2x) where E
denotes either sin or cos.
To use Taylor’s Inequality we need a bound on |f (n+1) (x)| on (− 31 , 31 ). But |f (n+1) (x)| =
2n+1 |E(2x)| where E is sin or cos, and since both sin and cos are never larger than 1 we
can say
|f (n+1) (x)| ≤ 2n+1
for all values of x. So take M = 2n+1 .
Taylor’s Inequality now gives
2n+1
M · |x|n+1
<
·
|f (x) − Tn (x)| <
(n + 1)!
(n + 1)!
n+1
1
3
for |x| < 31 . This is what we know, and what we want is |f (x) − Tn (x)| < 10−6 . So we
should try for
n+1
1
2n+1
·
< 10−6 .
(n + 1)!
3
Rearranging to get rid of fractions, this says
106 · 2n+1 < (n + 1)! · 3n+1 .
Plugging in numbers, we find that this works when n ≥ 7.
Page 2
Conclusion: We need the Maclaurin series for cos(2x) up through degree 7 in order
to estimate cos(2x) to within 10−6 on (− 13 , 13 ). Note that the odd degree terms of the
Maclaurin series are actually zero, so the degree 6 Maclaurin polynomial actually ALSO
works in this case.
4. Suppose we want to use the Maclaurin series for sin(x) to estimate sin(40). Use Taylor’s
Inequality to determine the degree of the Taylor approximation we should use in order
to get the answer to within 0.001.
Solution: Since all the deriviatves of sin(x) are ± sin(x) or ± cos(x), we know there
absolute values are bounded by 1. So we will take M = 1, and then Taylor Inequality
then says
1 · 40n+1
.
| sin(x) − Tn (x)| <
(n + 1)!
This is what we have, and we want | sin(x) − Tn (x)| < 10−3 , so we should try for
40n+1
< 10−3 .
(n + 1)!
Rearranging, this says
103 · 40n+1 < (n + 1)!.
Plugging in values and using Mathematica, the first n that works is n = 112. So we
should use the degree 112 Taylor approximation to find sin(40) to within 0.001.
5. (a) Use Taylor’s Inequality to find a radius d such that the fourth order Taylor polynomial of f (x) = sin(3x) centered at 2 is accurate to within 0.1 on the interval
(2 − d, 2 + d).
(b) Use Mathematica to plot both sin(3x) and the fourth order Taylor polynomial from
(a). Choose appropriate intervals for the domain and range so that the graph clearly
shows where the Taylor polynomial starts to diverge from the original function.
Mark your answer to (a) on the graph by shading in the interval (2 − d, 2 + d) on
the x-axis.
Solution to (a): We start by cranking out the derivatives of f (x):
f 0 (x) = 3 cos(3x),
f 00 (x) = −9 sin(3x),
f 000 (x) = −27 cos(3x),
f (4) (x) = 81 sin(3x).
The fourth degree Taylor polynomial centered at x = 2 is
T4 (x) = sin(6) + 3 cos(6)(x − 2) −
9
27
9
sin(6)(x − 2)2 − cos(6)(x − 2)3 +
sin(6)(x − 2)4 .
2
2
8
For Taylor’s Inequality we need f (5) (x), which is f (5) (x) = 243 cos(3x). This is bounded
above by 243, since | cos(3x)| ≤ 1 always.
Page 3
Taylor’s Inequality now says
|f (x) − T4 (x)| <
243 · d5
243 · |x − 2|5
<
5!
5!
for x in the interval (2 − d, 2 + d). This is what we have, and what we want is |f (x) −
T4 (x)| < 0.1. So we try for
243 · d5
< 0.1.
5!
12
Solving for d, this becomes d5 < 243
or
r
d<
5
12
≈ 0.5479.
243
Conclusion: As long as d < 0.5479, the Taylor polynomial T4 (x) approximates sin(3x)
to within 0.1 on (2 − d, 2 + d).
Here’s a printout of the Mathematica commands for (b). Note that the two graphs are
very close in the range (1.5, 2.5), as predicted.
In[14]:=
Out[14]=
In[15]:=
f[x_] = Sin[6] + 3 Cos[6] (x -− 2) -−
9 /∕ 2 Sin[6] (x -− 2) ^ 2 -− 9 /∕ 2 Cos[6] (x -− 2) ^ 3 + 27 /∕ 8 Sin[6] (x -− 2) ^ 4
3 (-− 2 + x) Cos[6] -−
9
2
(-− 2 + x)3 Cos[6] + Sin[6] -−
9
2
(-− 2 + x)2 Sin[6] +
27
8
(-− 2 + x)4 Sin[6]
Plot[{Sin[3 x], f[x]}, {x, 1, 3}, PlotRange → {-− 1, 1}]
1.0
0.5
Out[15]=
1.5
2.0
2.5
3.0
-−0.5
-−1.0
6. (a) Give an example of a series
your answer.
P
an where
P
Page 4
an diverges but
P
a2n converges. Explain
(b) Give an example of a series
your answer.
P
an where
P
an converges but
P
a2n diverges. Explain
P1
P 1
Solution: For (a): The harmonic series
diverges (by the Integral Test), but
n
n2
converges (also by the Integral Test).
P
P1
For (b): (−1)n √1n converges by the Alternating Series Test, but
diverges (by the
n
Integral Test).
5
5
5 5
− +
−
+ ···
6 9 12 15
(a) Find an explicit formula for this series.
7. Consider the series
(b) Is the series absolutely convergent? Why or why not?
(c) Is the series convergent? Why or why not?
Solution: The series is
∞
P
5
(−1)n−1 3n+3
.
n=1
For aboslute convergence we must look at
∞
P
n=1
examine
5
.
3n+3
The Integral Test suggests that we
∞
5
5
dx = ln(3x + 3) = ∞,
3
1
1
P
n−1 5
so the series diverges. This means (−1) 3n+3 is not absolutely convergent.
Z
∞
3x + 3
For convergence, we notice that this is an alternating series. We check that
5
5
5
> >
> ···
6
9
12
and
5
= 0,
3n + 3
so the Alternating Series Test guaranteees convergence.
lim
n→∞
Page 5