152 Understanding Calculus
Since 0
:s
X
2
:s
1 if 0
:s
x
:s
1, we can substitute x
2
for x in (25.9), and get
p (x
2
)
+~xlO
< e
x 2
< P (x
2
) +
~xlO
4 5! 4
5!'
1
1 P4(X2)dx
+_1_
< 1
1
e
x
2dx
< 1
1
p
4
(x
2
) dx
+
_3_.
o
II·5!
0 0
II·5!
Substituting x
2
for x in
P4
(x) and integrating, we get an approximation to the integral with error between
11~5!
= .00076 and
11~5!
= .0023. Rounding off, we would have to use .001 and .002 for lower and upper
bounds on the error. Now calculate the integral of
p
4
(X
2
) :
1
1 P4(x2)dx = 1
1
(1
+x
2
+
~X4
+
~X6
+
~x8)
dx
o 0 2! 3! 4!
1 1 1 1
= 1 +
3"
+ 5
·2!
+ 7 . 3! + 9
·4!
= 1.462.
Using the error estimates of .001 and .002, we can finally say that
1.463 <
1
1
e
x 2
dx < 1.464.
If we wanted more accuracy, we could go to
p
5
(X
2
)
and get an error between 13
1.6!
= .0001 and
li6!
=
.0003 (see Problem 25.10).
As a comparison, Simpson's Rule with
n = 10, and carrying eight places for the arithmetic, gives
1.4626814 for
f0
1
e
x 2
dx.
Of
course, we have no way to estimate the accuracy of the Simpson's Rule
number.
The preceding examples involving
eX
are particularly simple since all the derivatives of
e'
are the same, and we considered intervals to the right of
O.
In case we are interested in
negative
x, or the derivatives of f
(x)
have different signs, it is more convenient to use the
following estimate for
R; (x):
M
lflf(n+l)(x)1
~
M on
[-a,
a], then IRn(x)1 s (n + I)! Ixl
n+
1
•
EXAMPLE 25.5
Calculate cos 1 = cos 57.2958° to within .0005.
Let
j (x) = cos x, and notice that for all n, j(n+1) (x) equals ± cos x or ± sin x. Therefore, I
j(n+1)
(x) I
~
1
for all
n and all x. Consequently, we have the following estimates:
I
R (x)1 <
_1_lxl
n
+
1
n - (n + I)!
1
IRn(I)1
s (n +
I)!'
We find the smallest n such that (nl1)! < .0005:
1 1 1 1
3!
= .16,
4!
= .04,
5!
= .008,
6!
= .0014,
7!
= .0002.
Therefore,
P
6(1)
will be within .0002 of cos 1. Notice, however, that P
6
(x )
==
P
7
(x ) since the coefficient
of
x
7
is O. Therefore, R
7
(1) will also give the difference between P
6
(1) and cos 1. IR
7
(1) I
~
~
=
.ססOO2,
and
111
P
6(1)
= P
7(1)
= 1 - - + - - - = .54028.
2! 4! 6!
Therefore, cos 1
= .54028 ± .00002.