Professional Documents
Culture Documents
Calc 8E Liesmycomp Stu
Calc 8E Liesmycomp Stu
Calc 8E Liesmycomp Stu
reserved.
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
are remembered play on you is even larger, since not all terminating
but not shown.) decimal numbers are represented exactly. A recent
This is all right implementation of the BASIC language shows (in
because, as double precision) examples of incorrect conversion
previously from one number system into another, for example,
mentioned, the
finite number of 8
digits makes it
impossible to 0
represent 2 3 .
exactly. 1
A similar
0
situation occurs
.
when you calculate
7
( 9
s6)2 6. If you do
9
not obtain 0, the 9
order of magnitude 9
of the result will
tell you how many
9
digits the
9
calculator uses
9
internally. Next,
9
try to compute 15
9
using the yx key.
Many calculators
will indicate an 9
error because they 9
are built to attempt 9
e5ln1. One way to 9
overcome this is to 9
use the fact that 1k
9
cos k whenever k
is an integer. whereas 19 0.1 ? 1.90000 00000 00001
Calculators are
usually constructed Yet another implementation, apparently free of the
to operate in the preceding anomalies, will not calculate standard
decimal number functions in double precision. For example, the
system. In number 4 tan11, whose representation with sixteen
contrast, some decimal digits should be 3.14159 26535 89793,
microcomputer appears as 3.14159 29794 31152; this is off by more
packages of than 3 107. What is worse, the cosine function is
arithmetical programmed so badly that its “cos” 0 1 223. (Can you
programs operate invent a situation when this could ruin your
in a number calculations?) These or similar defects exist in other
system with base programming languages too.
other than 10
(typically 2 or 16). THE PERILS OF SUBTRACTION
Here the list of
unwelcome tricks
your device can
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 3
8721s3 10,681s2
8721s3 10,681s2
s
s s
(It would take too much space to
explain why all seven digits are
reliable; the subject numerical
analysis deals with these and similar
situations.) See Exercise 7 for another
instance of restoring lost digits.
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
Now you can see why in Exercises
2.2 (Exercise 38) your guess at the
limit ofExercises 1.5 (Exercise 42) tan x
xx3 was bound to go wrong: tan x
becomes so close to x that the values
will eventually agree in all digits that
the calculator is capable of carrying.
Similarly, if you start with just about
any continuous function f and try to
guess the value of
f x lim
fx
hl0
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 5
n1 n1.001
1
.
0
0
1
1
9
.
5
n
1
n
But, from the proof of the Integral
Test, we have
1
dx
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
number of elementary particles in our
solar system.) If we were to add 10 100
terms of the above series (only in
theory; a million years is less than 10 26
microseconds), we would still obtain a
sum of less than 207 compared with
the true sum of more than 1000. (This
estimate of 207 is obtained by using a
more precise form of the Integral Test,
known as the Euler-Maclaurin
Formula, and only then using a
calculator. The formula provides a
way to accelerate the convergence of
this and other series.)
If the two preceding approaches
didn’t give the right information about
the accuracy of the partial sums, what
does? A suitable inequality satisfied
by the remainder of the series, as you
can see from Exercise 6.
Computers and calculators are not
replacements for mathematical
thought. They are just replacements
for some kinds of mathematical labor,
either numerical or symbolic. There
are, and always will be, mathematical
problems that can’t be solved by a
calculator or computer, regardless of
its size and speed. A calculator or
computer does stretch the human
capacity for handling numbers and
symbols, but there is still considerable
scope and necessity for “thinking
before doing.”
EXERCISES
loss of significant digits destroys
your result. (The answer will
depend on your calculator.) Then
A Click here for answers. S
find the precise answer using an
solutions. appropriate calculus method.
1. Guess the value of
2. Guess the value of
ln1 h
x0 12 lim
Sixth Edition. ISBN:0495011606. © 2008 Brooks/Cole. All rights
hl0 h
1
lim and determine when to stop
l sin x x 2 guessing before the loss of
significant digits destroys your
and determine when to result. This time the detrimental
stop guessing before the subtraction takes place inside the
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 7
expression to replace fx dx
N1 N1
gives fb
ln a b ln 1
eb
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
and Taylor’s Inequality to improve 27q s729q2 108p3
the accuracy of ln x. where a
2
9. The cubic equation
Hint: Use the factorization
x 3 px q 0 formula
where we assume for simplicity A3 B3
that p 0, has a classical solution A
formula for the real root, called
Cardano’s formula: B
1
27q s729q2 108p3 13 2
x A AB B2
3 2 (b) Evaluate
4
27q s729q2 108p3 13 u
2 (2 s5)
2 3
1 (2 2 3
9
q 1
0
0
x
1
It is easy to show
a
that its radius of
2
3 convergence is r
100. The series will
converge rather
3 slowly at x 99:
p find out how many
terms will make
the error less than
9 5 107.
p (b) We can speed up
2 the convergence of
a the series in part
2
(a). Show that
3
x
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 9
n 1
ac n! 1!
2!
n!
and recall from our study of
Taylor and Maclaurin series that
1 1
1! 2!
converges to e 1 as nl . The
expression in square
brackets
converges to c e 1, a nonzero
number, which gets multiplied
by a fast-growing factor n!.
We conclude that even if all
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
Sixth Edition. ISBN:0495011606. © 2008 Brooks/Cole. All rights
reserved.
where
n 0, 1, . . . . For
such the integrals are no
longer elementary (not
solvable in “finite terms”), but
the numbers can be calculated
quickly. Find the integrals for
the particular choice and n
0, 1, . . . , 5 to five digits of
accuracy.
1
E
x
e
x
1
if x 0
x
After so many warnings about the
subtraction of close numbers, you
may appreciate that the definition
sinh x e ex
1 x
2
n
1 1x
xe
dx
0
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
6 ■ LIES MY CALCULATOR AND COMPUTER TOLD ME
ANSWERS
9. (b) 1, x 3 3x 4 0
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
SOLUTIONS
1. The computer results are from Maple, with Digits:=16. The last column shows the values of the sixth-degree
Taylor polynomial for near . Note that the second arrangement of Taylor’s polynomial is
easier to use with a calculator:
computer
calculator Taylor
100 or 200
10,000 or
20,000
1,000,000 0
We see that the calculator results start to deteriorate seriously at , and for smaller , they are entirely
meaningless. The different results “100 or 200” etc. depended on whether we calculated or
. With Maple, the result is off by more than 10% when (compare with the calculator
result!) A detailed analysis reveals that the values of the function are always greater than , but the computer
The polynomial was obtained by patient simplication of the expression for , starting with
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 13
it would be wasteful and inelegant to use l’Hospital’s Rule twenty-ve times since we can transform into
, and the inside expression needs just one application of l’Hospital’s Rule to give 0.
8 ■ LIES MY CALCULATOR AND COMPUTER TOLD ME
5. , we need .
, where .
7. (a) The 11-digit calculator value of , while the value (on the same device) of before
rationalization is , which is less than the trigonometric result.
but of course we can avoid repetitious calculations by storing intermediate results in a memory:
, and so
According to this formula, a calculator gives , which is within of the trigonometric
result. With Digits:=16;, Maple gives before rationalization (off the trig result by
about one digit of accuracy for rationalizing. If we sets Digits:=100;, the difference between Maple’s
Stewart:Calculus,
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
9. (a) Let .
Then . Substitute into the formula
where we replace :
which almost yields the given formula; since replacing results in replacing , a simple discussion of
the cases allows us to replace in the denominator, so that it involves only positive
numbers. The problems mentioned in the introduction to this exercise have disappeared.
(b) A direct attack works best here. To save space, let , so we can rationalize, using
and (check it!):
0 7 14
1 8 15
2 9 16
3 10 17
4 11 18
5 12 19
6 13 20
It is clear that the values calculated from the direct reduction formula will diverge to . If we instead calculate
using the reduction formula in Maple (with Digits:=16), we get some odd results: ,
, for examples. But for larger , the results are at least small and positive (for example,
, we get the delightful objecttoolarge error message. If, instead of using the
reduction formula, we integrate directly with Maple, the results are much better.
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.
LIES MY CALCULATOR AND COMPUTER TOLD ME ■ 15
, thus presenting no loss of accuracy due to subtraction.
Another form, which calls the function only once:
Sixth Edition. ISBN:0495011606. © 2008 Brooks/Cole. All rights reserved.
Stewart: Calculus, Seventh Edition. ISBN: 0538497815. (c) 2012 Brooks/Cole. All rights reserved.