Solution - Manual For Numerical Analysis
Solution - Manual For Numerical Analysis
FOR
Numerical Analysis
Eighth Edition
Richard L. Burden
J. Douglas Faires
YOUNGSTOWN S TATE U NIVERSITY
COPYRIGHT
c 2005 Richard L. Burden and J. Douglas Faires
Contents
Preface v
Mathematical Preliminaries 1
Exercise Set 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Exercise Set 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Exercise Set 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
i
ii CONTENTS
Exercise Set 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Exercise Set 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Exercise Set 5.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Exercise Set 5.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Exercise Set 5.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Exercise Set 5.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Exercise Set 5.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
This Student Study Guide for Numerical Analysis, Eighth Edition, by Burden and Faires contains worked
out representative exercises for the all the techniques discussed in the book. Although the answers to the odd
exercises are also in the back of the text, the results listed in this Study Guide go well beyond those in the
book. The exercises that are solved in the Guide were chosen to be those requiring insight into the methods
discussed in the text.
We have also added a number of exercises to the text that involve the use of a computer algebra system.
We chose Maple as our standard, but any of these systems can be used. In our recent teaching of the course
we found that students understood the concepts better when they worked through the algorithms step-by-step,
but let the computer algebra system do the tedious computation.
It has been our practice to include in our Numerical Analysis book structured algorithms of all the tech-
niques discussed in the text. The algorithms are given in a form that can be coded in any appropriate pro-
gramming language, by students with even a minimal amount of programming expertise.
In the Fifth Edition of Numerical Analysis we included in the Student Study Guide a disk containing
FORTRAN and Pascal programs for the algorithms in the book. In the Sixth edition we placed the disk in the
text itself, and added C programs, as well as worksheets in Maple and Mathematica, for all the algorithms.
We continued this practice for the Seventh Edition, have updated the added Maple programs to both versions
5.0 and 6.0, and added MATLAB programs as well.
For the Eighth Edition, we have added new Maple programs to reflect the linear algebra package change
from the original linalg package to the more modern LinearAlgebra package. In addition, we now
also have the programs coded in Java.
You will not find a disk with this edition of the book. Instead, our reviewers suggested, and we agree,
that it is more useful to have the programs available for downloading from the web. At the website for the
book,
http://www.as.ysu.edu/∼faires/Numerical-Analysis/
you will find the programs. This site also contains additional information about the book and will be updated
regularly to reflect any modifications that might be made. For example, we will place there any responses to
questions from users of the book concerning interpretations of the exercises and appropriate applications of
the techniques.
v
vi Preface
We hope our supplement package provides flexibility for instructors teaching Numerical Analysis. If
you have any suggestions for improvements that can be incorporated into future editions of the book or the
supplements, we would be most grateful to receive your comments. We can be most easily contacted by
electronic mail at the addresses listed below.
Since f is continuous on [4, 5] with f (4) ≈ 0.3066 and f (5) ≈ −5.799, the Intermediate Value
Theorem implies that a number x must exist in (4, 5) with 0 = f (x) = x − (ln x)x .
2. c. Find intervals that contain a solution to the equation x3 − 2x2 − 4x + 3 = 0.
SOLUTION: Let f (x) = x3 − 2x2 − 4x + 3. The critical points of f occur when
that is, when x = − 23 and x = 2. Relative maximum and minimum values of f can occur only at
these values. There are at most three
solutions
to f (x) = 0, since f (x) is a polynomial of degree
three. Since f (−2) = −5 and f − 23 ≈ 4.48; f (0) = 3 and f (1) = −2; and f (2) = −5 and
f (4) = 19; solutions lie in the intervals [−2, −2/3], [0, 1], and [2, 4].
4. a. Find max0≤x≤1 |f (x)| when f (x) = (2 − ex + 2x) /3.
SOLUTION: First note that f (x) = (−ex + 2) /3, so the only critical point of f occurs at x = ln 2,
which lies in the interval [0, 1]. The maximum for |f (x)| must consequently be
SOLUTION: Since
f (x) = ex (cos x − sin x), f (x) = −2ex (sin x), and f (x) = −2ex (sin x + cos x),
1
2 Exercise Set 1.1
a. Use P2 (0.5) to approximate f (0.5), find an upper bound for |f (0.5) − P2 (0.5)|, and compare this
to the actual error.
SOLUTION: We have P2 (0.5) = 1 + 0.5 = 1.5 and
−2eξ (sin ξ + cos ξ)
|f (0.5) − P2 (0.5)| ≤ max (0.5)2
ξ∈[0.0.5] 3!
1
≤ (0.5)2 max |eξ (sin ξ + cos ξ)|.
3 ξ∈[0,0.5]
To maximize this quantity on [0, 0.5], first note that Dx ex (sin x + cos x) = 2ex cos x > 0, for all x in
[0, 0.5]. This implies that the maximum and minimum values of ex (sin x + cos x) on [0, 0.5] occur at
the endpoints of the interval, and
e0 (sin 0 + cos 0) = 1 < e0.5 (sin 0.5 + cos 0.5) ≈ 2.24.
Hence,
1
|f (0.5) − P2 (0.5)| ≤ (0.5)3 (2.24) ≈ 0.0932.
3
b. Find a bound for the error |f (x) − P2 (x)|, for x in [0, 1].
SOLUTION: A similar analysis to that in part (a) gives
1
|f (x) − P2 (x)| ≤ (1.0)3 e1 (sin 1 + cos 1) ≈ 1.252.
3
1 1
c. Approximate 0 f (x) dx using 0 P2 (x) dx.
SOLUTION: 1
1 1
x2 3
f (x) dx ≈ 1 + x dx = x + = .
0 0 2 0 2
d. Find an upper bound for the error in part (c).
SOLUTION: From part b),
1 1 1
1 1
|R2 (x)| dx ≤ e (cos 1 + sin 1)x3 dx = 1.252x3 dx = 0.313.
0 0 3 0
Since
1 1
ex e 1
ex cos x dx = (cos x + sin x) = (cos 1 + sin 1) − (1 + 0) ≈ 1.378,
0 2 0 2 2
the actual error is |1.378 − 1.5| ≈ 0.12.
14. Use the error term of a Taylor polynomial to estimate the error involved in using sin x ≈ x to
approximate sin 1◦ .
SOLUTION: First we need to convert the degree measure for the sine function to radians. We have
180◦ = π radians, so 1◦ = 180
π
radians. Since, f (x) = sin x, f (x) = cos x, f (x) = − sin x, and
f (x) = − cos x, we have f (0) = 0, f (0) = 1, and f (0) = 0. The approximation sin x ≈ x is
16. a. Let f (x) = ex/2 sin x3 . Use Maple to determine the third Maclaurin polynomial P3 (x).
SOLUTION: Define f (x) by
>f:=exp(x/2)*sin(x/3);
(1/2x) 1
f := e sin x
3
Then find the first three terms of the Taylor series with
>g:=taylor(f,x=0,4);
1 1 23 3
g := x + x2 + x + O x4
3 6 648
Extract the third Maclaurin polynomial with
>p3:=convert(g,polynom);
1 1 23 3
p3 := x + x2 + x
3 6 648
b. f (4) (x) and bound the error |f (x) − P3 (x)| on [0, 1].
SOLUTION: Determine the fourth derivative.
>f4:=diff(f,x,x,x,x);
119 (1/2x) 1 5 (1/2x) 1
f 4 := − e sin x + e cos x
2592 3 54 3
Find the fifth derivative.
>f5:=diff(f4,x);
119 (1/2x) 1 61 (1/2x) 1
f 5 := − e sin x + e cos x
2592 3 3888 3
See if the fourth derivative has any critical points in [0, 1].
>p:=fsolve(f5=0,x,0..1);
p := .6047389076
The extreme values of the fourth derivative will occur at x = 0, 1, or p.
>c1:=evalf(subs(x=p,f4));
c1 := .09787176213
>c2:=evalf(subs(x=0,f4));
c2 := .09259259259
>c3:=evalf(subs(x=1,f4));
c3 := .09472344463
The maximum absolute value of f (4) (x) is c1 and the error is given by
>error:=c1/24;
error := .004077990089
4 Exercise Set 1.2
26. Suppose that f is continuous on [a, b], that x1 and x2 are in [a, b], and that c1 and c2 are positive
constants. Show that a number ξ exists between x1 and x2 with
c1 f (x1 ) + c2 f (x2 )
f (ξ) = .
c1 + c2
SOLUTION: Let m = min{f (x1 ), f (x2 )} and M = max{f (x1 ), f (x2 )}. Then m ≤ f (x1 ) ≤ M
and m ≤ f (x2 ) ≤ M, so
Thus,
(c1 + c2 )m ≤ c1 f (x1 ) + c2 f (x2 ) ≤ (c1 + c2 )M
and
c1 f (x1 ) + c2 f (x2 )
m≤ ≤ M.
c1 + c2
By the Intermediate Value Theorem applied to the interval with endpoints x1 and x2 , there exists a
number ξ between x1 and x2 for which
c1 f (x1 ) + c2 f (x2 )
f (ξ) = .
c1 + c2
that is, √ √ √
− 2 × 10−4 ≤ p∗ − 2 ≤ 2 × 10−4 .
√ √
This implies that p∗ must be in the interval 2(0.9999), 2(1.0001) .
13 6
− = 0.0720 and 2e − 5.4 = 5.44 − 5.40 = 0.0400.
14 7
Mathematical Preliminaries 5
Hence,
13
− 67
14 0.0720
= = 1.80.
2e − 5.4 0.0400
The correct value is approximately 1.954, so the absolute and relative errors to three digits are
|1.80 − 1.954|
|1.80 − 1.954| = 0.154 and = 0.0788,
1.954
respectively.
9. a. Use the first three terms of
the Maclaurin series for the arctangent function to approximate
π = 4 arctan 12 + arctan 13 , and determine the absolute and relative errors.
SOLUTION: Let P (x) = x − 13 x3 + 15 x5 . Then P 12 = 0.464583 and P 13 = 0.3218107, so
1 1
π = 4 arctan + arctan ≈ 3.145576.
2 3
The absolute and relative errors are, respectively,
|π − 3.145576|
|π − 3.145576| ≈ 3.983 × 10−3 and ≈ 1.268 × 10−3 .
|π|
12. Let
ex − e−x
f (x) = .
x
0 01111111111 0101001100000000000000000000000000000000000000000000.
16. c. Find the decimal equivalents of the next largest and next smallest floating-point machine number to
0 01111111111 0101001100000000000000000000000000000000000000000000.
0 01111111111 0101001011111111111111111111111111111111111111111111
−52
1023−1023
=1.32421875 − 2 2
=1.3242187499999997779553950749686919152736663818359375,
0 01111111111 0101001100000000000000000000000000000000000000000001
−52
1023−1023
=1.32421875 + 2 2
=1.3242187500000002220446049250313080847263336181640625.
21. a. Show that the polynomial nesting technique can be used to evaluate
n
SOLUTION: Since enx = (ex ) , we can write
b. Use three-digit rounding arithmetic and the formula given in the statement of part (a) to evaluate
f (1.53).
SOLUTION: Using e1.53 = 4.62 and three-digit rounding gives e2(1.53) = (4.62)2 = 21.3,
e3(1.53) = (4.62)2 (4.62) = (21.3)(4.62) = 98.4, and e4(1.53) = (98.4)(4.62) = 455. So
c. Redo the calculations in part (b) using the nesting form of f (x) that was found in part (a).
Mathematical Preliminaries 7
SOLUTION:
so
286.61 ≤ T ≤ 293.72.
◦
Since 19 Celsius = 292.16 kelvin, we are again within the bound. In either case it is possible that the
actual temperature is 290.15 kelvin = 17◦ Celsius.
alternate in sign, the error produced by truncating the series at any term is less than the magnitude of
the next term.
8 Exercise Set 1.3
To ensure significant accuracy, we need to choose n so that
4
< 10−3 or 4000 < 2n + 1.
2(n + 1) − 1
To ensure this accuracy requirement, we need n ≥ 2000.
b. How many terms are required to ensure the 10−10 accuracy needed for an approximation to π?
SOLUTION: In this case, we need
4
< 10−10 or n > 20,000,000,000.
2(n + 1) − 1
Clearly, a more rapidly convergent method is needed for this approximation.
8. a. How many calculations are needed to determine a sum of the form
n
i
ai bj ?
i=1 j=1
i
SOLUTION: For each i, the inner sum j=1 ai bj requires i multiplications and i − 1 additions, for
a total of
n
n(n + 1)
i= multiplications
i=1
2
and
n
n(n + 1)
i−1= − n additions.
i=1
2
Once the n inner sums are computed, n − 1 additions are required for the final sum.
The final total is:
n(n + 1) (n + 2)(n − 1)
multiplications and additions.
2 2
b. Re-express the series in a way that will reduce the number of calculations needed to determine this
sum.
SOLUTION: By rewriting the sum as
n
i
n
i
ai bj = ai bj ,
i=1 j=1 i=1 j=1
we can significantly reduce the amount of calculation. For each i, we now need i − 1 additions to sum
bj ’s for a total of
n
n(n + 1)
i−1= − n additions.
i=1
2
Once the bj ’s are summed, we need n multiplications by the ai ’s, followed by n − 1 additions of the
products.
The total additions by this method is still 21 (n + 2)(n − 1), but the number of multiplications has
been reduced from 12 n(n + 1) to n.
Mathematical Preliminaries 9
10. Devise an algorithm to compute the real roots of a quadratic equation in the most efficient manner.
SOLUTION: The following algorithm uses the most effective formula for computing the roots of a
quadratic equation.
INPUT A, B, C.
OUTPUT x1 , x2 .
Step 1 If A = 0 then
if B = 0 then OUTPUT (‘NO SOLUTIONS’);
STOP.
else set x1 = −C/B;
OUTPUT (‘ONE SOLUTION’,x1 );
STOP.
Step 2 Set D = B 2 − 4AC.
Step 3 If D = 0 then set x1 = −B/(2A);
OUTPUT (‘MULTIPLE ROOTS’, x1 );
STOP.
Step 4 If D < 0 then set √
b = −D/(2A);
a = −B/(2A);
OUTPUT (‘COMPLEX CONJUGATE ROOTS’);
x1 = a + bi;
x2 = a − bi;
OUTPUT (x1 , x2 );
STOP.
Step 5 If B ≥ 0 then set √
d = B + D;
x1 = −2C/d;
x2 = −d/(2A)
else set √
d = −B + D;
x1 = d/(2A);
x2 = 2C/d.
Step 6 OUTPUT (x1 , x2 );
STOP.
SOLUTION: Since
1
lim xn = lim xn+1 = x and xn+1 = 1 + ,
n→∞ n→∞ xn
we have
1
x=1+ , which implies that x2 − x − 1 = 0.
x
√
The only positive solution to this quadratic equation is x = 1 + 5 /2.
17. The Fibonacci sequence also satisfies the equation
√ n √ n
1 1+ 5 1− 5
Fn ≡ F̃n = √ − .
5 2 2
n :=98
f :=1
s :=1
>for i from 1 to n do
> l:=f+s:f:=s:s:=l:od;
l :=2
f :=1
s :=2
l :=3
f :=2
s :=3
l :=5
..
.
l :=218922995834555169026
f :=135301852344706746049
s :=218922995834555169026
l :=354224848179261915075
b. Use Maple with the default value of Digits followed by evalf to calculate F̃100 .
SOLUTION:
F100:=(((1+sqrt(5))/2)ˆ100-((1-sqrt(5))/2ˆ100)/sqrt(5);
100 100
1 1 1√ 1 1√ √
F 100 := + 5 − − 5 5
5 2 2 2 2
evalf(F100);
0.3542248538 × 1021
c. Why is the result from part (a) more accurate than the result from part (b)?
12 Exercise Set 1.3
SOLUTION: The result in part (a) is computed using exact integer arithmetic, and the result in part
(b) is computed using ten-digit rounding arithmetic.
d. Why is the result from part (b) obtained more rapidly than the result from part (a)?
SOLUTION: The result in part (a) required traversing a loop 98 times.
e. What results when you use the command simplify instead of evalf to compute F̃100 ?
SOLUTION: The result is the same as the result in part (a).
Solutions of Equations of One Variable
x11 2 2 2 2 2 2 0 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1
1
x 22
2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 1 1 1 1 1 11 1 1 1 1
x21 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 1 1 1 11 1 1 1 1
f (x) 2 2 2 2 2 2 0 1 1 1 1 11 0 2 0 1 1 1 1 11 1 1 1 1
22 21 0 1
2 1 2 3 x
2
Thus, a1 = −2, with f (a1 ) < 0, and b1 = 1.5, with f (b1 ) > 0. Since p1 = − 14 , we have f (p1 ) > 0.
We assign a2 = −2, with f (a2 ) < 0, and b2 = − 14 , with f (b2 ) > 0. Thus, p2 = −1.125 and
f (p2 ) < 0. Hence, we assign a3 = p2 = −1.125 and b3 = −0.25. Then p3 = −0.6875.
11. Let f (x) = (x + 2)(x + 1)x(x − 1)3 (x − 2). To which zero of f does the Bisection method
converge for the following intervals?
SOLUTION: Since
f (x) = (x + 2)(x + 1)x(x − 1)3 (x − 2),
13
14 Exercise Set 2.1
we have the following sign graph for f (x).
x12 2 2 2 2 0 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x11 22 2 22 2 2 2 0 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11
x 22 2 2 2 2 2 2 2 2 2 2 0 1 11 1 1 1 1 1 1 1 1 1 11
3
(x 2 1) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 1 1 1 1 1 1 1 1 1
x22 22 2 22 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 1 1 1 11
f (x) 2 2 2 2 0 1 1 1 0 2 2 2 0 11 1 0 2 2 2 0 1 1 1 1 1 1
23 22 21 0 1 2 3 x
a. [−3, 2.5]
SOLUTION: The interval [−3, 2.5] contains all 5 zeros of f . For a1 = −3, with f (a1 ) < 0, and
b1 = 2.5, with f (b1 ) > 0, we have p1 = (−3 + 2.5)/2 = −0.25, so f (p1 ) < 0. Thus we assign
a2 = p1 = −0.25, with f (a2 ) < 0, and b2 = b1 = 2.5, with f (b1 ) > 0. Hence,
p2 = (−0.25 + 2.5)/2 = 1.125 and f (p2 ) < 0. Then we assign a3 = 1.125, with f (a3 ) < 0, and
b3 = 2.5, with f (b3 ) > 0. Since [1.125, 2.5] contains only the zero 2, the method converges to 2.
c. [−1.75, 1.5]
SOLUTION: The interval [−1.75, 1.5] contains the zeros −1, 0, 1. For a1 = −1.75, with f (a1 ) > 0,
and b1 = 1.5, with f (b1 ) < 0, we have p1 = (−1.75 + 1.5)/2 = −0.125 and f (p1 ) < 0. Then we
assign a2 = a1 = −1.75, with f (a1 ) > 0, and b2 = p1 = −0.125, with f (b2 ) < 0. Since
[−1.75, −0.125] contains only the zero −1, the method converges to −1.
√
12. Use the Bisection Algorithm to find an approximation to 3 that is accurate to within 10−4 .
√
SOLUTION: The function defined by f (x) = x2 − 3 has √ 3 as its only positive root. Applying the
Bisection method to this function on the interval [1, 2] gives 3 ≈ p14 = 1.7320. Using a smaller
starting interval would decrease the number of iterations that are required.
14. Use Theorem 2.1 to find a bound for the number of iterations needed to approximate a solution to the
equation x3 + x − 4 = 0 on the interval [1, 4] to an accuracy of 10−3 .
SOLUTION: First note that the particular equation plays no part in finding the bound; all that is
needed is the interval and the accuracy requirement. To find an approximation that is accurate to
within 10−3 , we need to determine the number of iterations n so that
b−a 4−1
|p − pn | < = n < 0.001;
2n 2
that is,
3 × 103 < 2n .
As a consequence, a bound for the number of iterations is n ≥ 12. Applying the Bisection Algorithm
gives p12 = 1.3787.
n
17. Define the sequence {pn } by pn = k=1 k1 . Show that limn→∞ (pn − pn−1 ) = 0, even though the
sequence {pn } diverges.
Solutions of Equations of One Variable 15
SOLUTION: Since pn − pn−1 = 1/n, we have limn→∞ (pn − pn−1 ) = 0. However, pn is the nth
partial sum of the divergent harmonic series. The harmonic series is the classic example of a series
whose terms go to zero, but not rapidly enough to produce a convergent series. There are many proofs
of divergence of this series, any calculus text should give at least two. One proof will simply analyze
the partial sums of the series and another based on the Integral Test. The point of the problem is not
the fact that this particular sequence diverges, it is that a test for an approximate solution to a root
based on the condition that |pn − pn−1 | is small should always be suspect. Consecutive terms of a
sequence may be close to each other, but not sufficiently close to the actual solution you are seeking.
19. A trough of water of length L = 10 feet has a cross section in the shape of a semicircle with radius
r = 1 foot. When filled with water to within a distance h of the top, the volume V = 12.4 ft3 of the
water is given by the formula
1/2
12.4 = 10 0.5π − arcsin h − h 1 − h2
SOLUTION: Applying the Bisection Algorithm on the interval [0, 1] to the function
1/2
f (h) = 12.4 − 10 0.5π − arcsin h − h 1 − h2
SOLUTION:
a. Since
20pn−1 + 21/p2n−1
pn = ,
21
we have
20x + 21/x2 20 1
g(x) = = x + 2,
21 21 x
20 2
20 2
and g (x) = 21 − x3 . Thus, g 211/3 = 21 − 21 = 0.857.
b. Since
p3n−1 − 21
pn = pn−1 − ,
3p2n−1
we have
x3 − 21 1 7 2 7
g(x) = x − =x− x+ 2 = x+ 2
3x2 3 x 3 x
2
and g (x) = 3 − x73 . Thus, g 211/3 = 23 − 13 = 13 = 0.333.
16 Exercise Set 2.2
c. Since
p4n−1 − 21pn−1
pn = pn−1 − ,
p2n−1 − 21
we have
x4 − 21x x3 − 21x − x4 + 21x x3 − x4
g(x) = x − 2
= 2
= 2
x − 21 x − 21 x − 21
and
x2 − 21 3x2 − 4x3 − x3 − x4 2x
g (x) = 2
(x2 − 21)
3x4 − 63x2 − 4x5 + 84x3 − 2x4 + 2x5
= 2
(x2 − 21)
−2x + x + 84x3 − 63x2
5 4
= 2 .
(x2 − 21)
Thus, g 211/3 = 5.706 > 1.
d. Since 1/2
21
pn = ,
pn−1
we have 1/2 √
21 21
g(x) = =
x x1/2
√
− 21
and g (x) = 3/2
. Thus, g 211/3 = − 12 .
2x
The order of convergence should be (b), (d), (a). Choice (c) does not converge.
√
9. Use a fixed-point iteration method to determine an approximation to 3 that is accurate to within
10−4 .
SOLUTION: As always with fixed-point iteration, the trick is to choose the fixed-point problem that
will produce rapid convergence.
Recalling the solution to Exercise 10 in Section 2.1, we need to convert the root-finding problem
f (x) = x2 − 3 into a fixed-point problem. One successful solution is to write
3
0 = x2 − 3 as x= ,
x
then add x to both sides of the latter equation and divide by 2. This gives g(x) = 0.5 x + x3 , and for
√
p0 = 1.0, we have 3 ≈ p4 = 1.73205.
12. c. Determine a fixed-point function g and an appropriate interval that produces an approximation to a
positive solution of 3x2 − ex = 0 that is accurate to within 10−5 .
SOLUTION:There are numerous possibilities:
For g(x) = 13 ex on [0, 1] with p0 = 1, we have p12 = 0.910015.
For g(x) = ln 3x2 on [3, 4] with p0 = 4, we have p16 = 3.733090.
Solutions of Equations of One Variable 17
18. Show that (a) Theorem 2.2 is true if |g (x)| ≤ k is replaced by the statement “g (x) ≤ k < 1, for all
x ∈ [a, b]”, but that (b) Theorem 2.3 may not hold in this situation.
SOLUTION: The proof of existence is unchanged. For uniqueness, suppose p and q are fixed points
in [a, b] with p = q. By the Mean Value Theorem, a number ξ in (a, b) exists with
2
√
SOLUTION: First let g(x) = x/2 √
2
+ 1/x. For√ x = 0, we have g (x) = 1/2 − 1/x . If x > 2, then
1/x < 1/2, so g (x) > 0. Also, g 2 = 2.
√
Suppose, as is the assumption given in part (a), that x0 > 2. Then
√
√
√
x1 − 2 = g(x0 ) − g 2 = g (ξ) x0 − 2 ,
√ √ √
where 2 < ξ < x0 . Thus, x1 − 2 > 0 and x1 > 2. Further,
√
x0 1 x0 1 x0 + 2
x1 = + < +√ = ,
2 x0 2 2 2
√
and 2 < x1 < x0 . By an inductive argument, we have
√
2 < xm+1 < xm < . . . < x0 .
Thus, {xm } is a decreasing sequence that has a lower bound and must therefore converge. Suppose
p = limm→∞ xm . Then
xm−1 1 p 1
p = lim + = + .
m→∞ 2 xm−1 2 p
Thus,
p 1
p= + ,
2 p
which implies that
2p2 = p2 + 2,
√ √
so p = ± 2. Since xm > 2 for all m,
√
lim xm = 2.
m→∞
18 Exercise Set 2.3
√
Now consider the situation when 0 < x0 < 2, which is the situation in part (b). Then we have
√ 2 √
0 < x0 − 2 = x20 − 2x0 2 + 2,
so
√ √ x0 1
2x0 2 < x20 + 2 and 2< + = x1 .
2 x0
√
In any situation, the sequence converges to 2, and rapidly, as we will discover in the Section 2.3.
24. Suppose that the function g has a fixed-point at p, that g ∈ C[a, b], and that g exists in (a, b). Show
that if |g (p)| > 1, then the fixed-point sequence will fail to converge for any initial choice of p0 ,
except if pn = p for some value of n.
SOLUTION: Since g is continuous at p and |g (p)| > 1, by letting = |g (p)| − 1 there exists a
number δ > 0 such that
|g (x) − g (p)| < ε = |g (p)| − 1,
If p0 is chosen so that 0 < |p − p0 | < δ, we have by the Mean Value Theorem that
This means that when an approximation gets close to p, but is not equal to p, the succeeding terms of
the sequence move away from p.
Solutions of Equations of One Variable 19
SOLUTION: Let f (x) = x2 − 6. Then f (x) = 2x, and Newton’s method becomes
f (pn−1 ) p2n−1 − 6
pn = pn−1 − = p n−1 − .
f (pn−1 ) 2pn−1
With p0 = 1, we have
p20 − 6 1−6
p 1 = p0 − =1− = 1 + 2.5 = 3.5
2p0 2
and
p21 − 6 3.52 − 6
p 2 = p1 − = 3.5 − = 2.60714.
2p1 2(3.5)
3. Let f (x) = x2 − 6. With p0 = 3 and p1 = 2, find p3 for (a) the Secant method and (b) the method of
False Position.
SOLUTION: The formula for both the Secant method and the method of False Position is
f (pn−1 )(pn−1 − pn−2 )
pn = pn−1 − .
f (pn−1 ) − f (pn−2 )
Using the endpoints of the intervals as p0 and p1 , we have the entries in the following tables.
n pn n pn
0 0 0 0
1 1.5707963 1 1.5707963
2 0.6110155 2 0.6110155
3 0.7232695 3 0.7232695
4 0.7395671 4 0.7372659
5 0.7390834 5 0.7388778
6 0.7390851 6 0.7390615
7 0.7390825
9. c. Apply the method of False Position to find a solution to x − cos x = 0 in the interval [0, π/2] that is
accurate to within 10−4 .
SOLUTION: The method of False Position approximations are generated using this same formula as
in Exercise 7, but incorporate the additional bracketing test.
13. Apply Newton’s method to find a solution, accurate to within 10−4 , to the value of x that produces
the closest point on the graph of y = x2 to the point (1, 0).
SOLUTION: The distance between an arbitrary point x, x2 on the graph of y = x2 and the point
(1, 0) is
2
d(x) = (x − 1)2 + (x2 − 0) = x4 + x2 − 2x + 1.
Because a derivative is needed to find the critical points of d, it is easier to work with the square of
this function,
f (x) = [d(x)]2 = x4 + x2 − 2x + 1,
Solutions of Equations of One Variable 21
whose minimum will occur at the same value of x as the minimum of d(x). To minimize f (x) we
need x so that
0 = f (x) = 4x3 + 2x − 2.
Applying Newton’s method to find the root of this equation with p0 = 1 gives p5 = 0.589755. The
point on the graph of y = x2 that is closest to (1, 0) has the approximate coordinates
(0.589755, 0.347811).
SOLUTION: Newton’s method with p0 = π2 gives p15 = 1.895488 and with p0 = 5π gives
p19 = 1.895489. With p0 = 10π, the sequence does not converge in 200 iterations.
The results do not indicate the fast convergence usually associated with Newton’s method because the
function and its derivative have the same roots. As we approach a root, we are dividing by numbers
with small magnitude, which increases the round-off error.
19. Explain why the iteration equation for the Secant method should not be used in the algebraically
equivalent form
f (pn−1 )pn−2 − f (pn−2 )pn−1
pn = .
f (pn−1 ) − f (pn−2 )
SOLUTION: This formula incorporates the subtraction of nearly equal numbers in both the
numerator and denominator when pn−1 and pn−2 are nearly equal. The form given in the Secant
Algorithm subtracts a correction from a result that should dominate the calculations. This is always
the preferred approach.
22. Use Maple to determine how many iterations of Newton’s method with p0 = π/4 are needed to find
a root of f (x) = cos x − x to within 10−100 .
p7 = .73908513321516064165531208767387340401341175890075746496
56806357732846548835475945993761069317665319,
0.4x
SOLUTION: The key to this problem is recognizing
2 behavior of e
the . When x is negative, this
term goes to zero, so f (x) is dominated by ln x + 1 . However, when x is positive, e0.4x dominates
the calculations, and f (x) will be zero approximately when this term makes no contribution; that is,
when cos πx = 0. This occurs when x = n/2 for a positive integer n. Using this information to
determine initial approximations produces the following results:
For part (a), we can use p0 = −0.5 to find the sufficiently accurate p3 = −0.4341431.
For part (b), we can use:
p0 = 0.5 to give p3 = 0.4506567; p0 = 1.5 to give p3 = 1.7447381;
p0 = 2.5 to give p5 = 2.2383198; and p0 = 3.5 to give p4 = 3.7090412.
In general, a reasonable initial approximation for the nth positive root is n − 0.5. To solve part (d),
we let p0 = 24.5 to produce the sufficiently accurate approximation p2 = 24.4998870.
Graphs for various parts of the region are shown below.
y y y
12 600 30000
400 20000
8
200 10000
4
12 16 20
4 6 x x
4 8 16
24 22 2 x 210000
2200
24 220000
26. Determine the minimal annual interest rate i at which an amount P = $1500 per month can be
invested to accumulate an amount A = $750, 000 at the end of 20 years based on the annuity due
equation
P
A = [(1 + i)n − 1] .
i
Solutions of Equations of One Variable 23
SOLUTION: This is simply a root-finding problem where the function is given by
P 1500
f (i) = A − [(1 + i)n − 1] = 750000 − (1 + i/12)(12)(20) − 1 .
i (i/12)
Notice that n and i have been adjusted because the payments are made monthly rather than yearly.
The approximate solution to this equation can be found by any method in this section. Newton’s
method is a bit cumbersome for this problem, since the derivative of f is complicated. The Secant
method would be a likely choice. The minimal annual interest is approximately 6.67%.
28. A drug administered to a patient produces a concentration in the blood stream given by
c(t) = Ate−t/3 mg/mL, t hours after A units have been administered. The maximum safe
concentration is 1 mg/mL.
a) What amount should be injected to reach this safe level, and when does this occur?
b) When should an additional amount be administered, if it is administered when the level drops to
0.25 mg/mL?
c) Assuming 75% of the original amount is administered in the second injection, when should a third
injection be given?
This occurs when t is 11 hours and 5 minutes; that is, when t = 11.083 hours.
The solution to part (c) requires finding t so that
1 −t/3 1
0.25 = c(t) = e te + 0.75 e (t − 11.083)e−(t−11.083)/3 .
3 3
This occurs after 21 hours and 14 minutes.
29. Let f (x) = 33x+1 − 7 · 52x .
a. Use the Maple commands solve and fsolve to try to find all roots of f .
SOLUTION: First define the function by
>f:=x->3ˆ(3*x+1)-7*5ˆ(2*x);
f := x → 3(3x+1) − 7 52x
>solve(f(x)=0,x);
ln (3/7)
−
ln (27/25)
24 Exercise Set 2.3
>fsolve(f(x)=0,x);
fsolve(3(3x+1) − 7 5(2x) = 0, x)
The procedure solve gives the exact solution, and fsolve fails because the negative x-axis is an
asymptote for the graph of f (x).
b. Plot f (x) to find initial approximations to roots of f .
SOLUTION: Using the Maple command >plot({f(x)},x=10.5..11.5); produces the
following graph.
15
y
3 x 10
15
2 x 10
15
1 x 10
10.5
11 11.5 12 x
>Digits:=18; p0:=11;
Digits := 18
p0 := 11
>for i from 1 to 5 do
>p1:=evalf(p0-f(p0)/fp(p0));
>err:=abs(p1-p0);
>p0:=p1;
>od;
The results are given in the following table.
i pi |pi − pi−1 |
1 11.0097380401552503 .0097380401552503
2 11.0094389359662827 .0002991041889676
3 11.0094386442684488 .2916978339 10−6
4 11.0094386442681716 .2772 10−2
5 11.0094386442681716 0
Solutions of Equations of One Variable 25
d. Find the exact solutions of f (x) = 0 algebraically.
SOLUTION: We have 33x+1 = 7 · 52x . Taking the natural logarithm of both sides gives
(3x + 1) ln 3 = ln 7 + 2x ln 5.
Thus,
3x ln 3 − 2x ln 5 = ln 7 − ln 3,
7
x(3 ln 3 − 2 ln 5) = ln ,
3
and
ln 7/3 ln 7/3 ln 3/7
x= = =− .
ln 27 − ln 25 ln 27/25 ln 27/25
This agrees with part (a).
and
we have linear convergence. To have |pn − p| < 5 × 10−2 , we need 1/n < 0.05, which implies that
n > 20.
n k
8. Show that (a) the sequence pn = 10−2 converges quadratically to zero, but that (b) pn = 10−n
does not converge to zero quadratically, regardless of the size of k > 1.
SOLUTION:
a. Since
n+1 n+1 n+1
|pn+1 − 0| 10−2 10−2 10−2
lim = lim = lim = lim n+1 = 1,
n→∞ (10−2n )2
n
n→∞ |pn − 0|2 n→∞ 10−2·2 n→∞ 10−2
k
diverges. So the sequence pn = 10−n does not converge quadratically for any positive value of k.
10. Show that the fixed-point method
mf (x)
g(x) = x −
f (x)
has g (p) = 0, if p is a zero of f of multiplicity m.
mq(p)[mq(p)]
g (p) = 1 − = 0.
[mq(p)]2
If f is continuous, Theorem 2.8 implies that this sequence produces quadratic convergence once we
are close enough to the solution p.
12. Suppose that f has m continuous derivatives. Show that f has a zero of multiplicity m at p if and
only if
0 = f (p) = f (p) = · · · = f (m−1) (p), but f (m) (p) = 0.
for x = p, where
lim q(x) = 0.
x→p
Thus,
f (x) = m(x − p)m−1 q(x) + (x − p)m q (x)
and f (p) = 0. Also,
f (x) = m(m − 1)(x − p)m−2 q(x) + 2m(x − p)m−1 q (x) + (x − p)m q (x)
and f (p) = 0.
In general, for k ≤ m,
k j
k d (x − p)m
f (k) (x) = q (k−j) (x)
j=0
j dxj
k
k
= m(m − 1)· · ·(m − j + 1)(x − p)m−j q (k−j) (x).
j=0
j
Conversely, suppose that f (p) = f (p) = . . . = f (m−1) (p) = 0 and f (m) (p) = 0. Consider the
(m − 1)th Taylor polynomial of f expanded about p :
f (m−1) (p)(x − p)m−1 f (m) (ξ(x))(x − p)m
f (x) =f (p) + f (p)(x − p) + . . . + +
(m − 1)! m!
f (m) (ξ(x))
=(x − p)m ,
m!
where ξ(x) is between x and p. Since f (m) is continuous, let
f (m) (ξ(x))
q(x) = .
m!
Then f (x) = (x − p)m q(x) and
f (m) (p)
lim q(x) = = 0.
x→p m!
√
14. Show that the Secant method converges of order α, where α = 1 + 5 /2, the golden ratio.
SOLUTION: Let en = pn − p. If
|en+1 |
lim = λ > 0,
n→∞ |en |α
then for sufficiently large values of n, |en+1 | ≈ λ|en |α . Thus,
|en | ≈ λ|en−1 |α and |en−1 | ≈ λ−1/α |en |1/α .
Using the hypothesis that for some constant C and sufficiently large n, we have
|pn+1 − p| ≈ C|pn − p| |pn−1 − p|, which gives
λ|en |α ≈ C|en |λ−1/α |en |1/α .
So
|en |α ≈ Cλ−1/α−1 |en |1+1/α .
Since the powers of |en | must agree,
√
1+ 5
α = 1 + 1/α and α = .
2
This number is called the Golden Ratio. It appears in numerous situations in mathematics and in art.
SOLUTION: Applying Newton’s method with p0 = 0 requires finding p16 = −0.182888. For the
Aitken’s ∆2 sequence, we have sufficient accuracy with p̂6 = −0.183387. Newton’s method fails to
converge quadratically because there is a multiple root.
Solutions of Equations of One Variable 29
(0) (1)
3. Let g(x) = cos(x − 1) and p0 = 2. Use Steffensen’s method to find p0 .
(0)
SOLUTION: With g(x) = cos(x − 1) and p0 = 2, we have
(0) (0)
p1 =g p0 = cos(2 − 1) = cos 1 = 0.5403023
and
(0) (0)
p2 =g p1 = cos(0.5403023 − 1) = 0.8961867.
Thus,
2
(0) (0)
p1 − p0
(1) (0)
p0 =p0 − (0) (0) (0) (0)
p2 − 2p1 − 2p1 + p0
(0.5403023 − 2)2
=2 −
0.8961867 − 2(0.5403023) + 2
=2 − 1.173573 = 0.826427.
Thus,
1 (0)
(0) 2 (0)
(0)
2
(0)
1 − p1 = p 1 − 2p1 + 1, so 0 = p1 − 1.5p1 ,
2
(0) (0)
and p1 = 1.5 or p1 = 0.
11. b. Use Steffensen’s method to approximate the solution to within 10−5 of x = 0.5(sin x + cos x),
where g is the function in Exercise 11(f) of Section 2.2, that is, g(x) = 0.5(sin x + cos x).
30 Exercise Set 2.5
SOLUTION: With g(x) = 0.5(sin x + cos x), we have
(0) (0)
p0 =0, p1 = g(0) = 0.5,
(0)
p2 =g(0.5) = 0.5(sin 0.5 + cos 0.5) = 0.678504051,
2
(0) (0)
p1 − p0
(1) (0)
p0 =p0 − (0) (0) (0)
= 0.777614774,
p2 − 2p1 + p0
(1) (1)
p1 =g p0 = 0.707085363,
(1) (1)
p2 =g p1 = 0.704939584,
2
(1) (1)
p1 − p0
(2) (1)
p0 =p0 − (1) (1) (1)
= 0.704872252,
p2 − 2p1 + p0
(2) (2)
p1 =g p0 = 0.704815431,
(2) (2)
p2 =g p1 = 0.704812197,
2
(2) (2)
p1 − p0
(3) (2)
p0 =p0 = (2) (2) (2)
= 0.704812002,
p2 − 2p1 + p0
(3) (3)
p1 =g p0 = 0.704812002,
and
(3) (3)
p2 =g p1 = 0.704812197.
14. a. Show that a sequence {pn } that converges to p with order α > 1 converges superlinearly to p.
SOLUTION: Since {pn } converges to p with order α > 1, a positive constant λ exists with
|pn+1 − p|
λ = lim .
n→∞ |pn − p|α
Hence,
pn+1 − p
lim = lim |pn+1 − p| · |pn − p|α−1 = λ · 0 = 0
n→∞ pn − p n→∞ |pn − p|α
and
pn+1 − p
lim = 0.
n→∞ pn − p
This implies that {pn } that converges superlinearly to p.
1
b. Show that pn = nn converges superlinearly to zero, but does not converge of order α for any
α > 1.
Solutions of Equations of One Variable 31
SOLUTION: This sequence converges superlinearly to zero since
1/(n + 1)(n+1) nn
lim = lim
n→∞ 1/n n n→∞ (n + 1)(n+1)
n
n 1
= lim
n→∞ n + 1 n+1
1 1 1
= lim = · 0 = 0.
n→∞ (1 + 1/n)n n+1 e
However, the sequence does not converge of order α for any α > 1, since for α > 1, we have
1/(n + 1)(n+1) nαn
lim α = lim
n→∞ (1/nn ) n→∞ (n + 1)(n+1)
n (α−1)n
n n
= lim
n→∞ n + 1 n+1
(α−1)n
1 n 1
= lim = · ∞ = ∞.
n→∞ (1 + 1/n)n n+1 e
17. Let Pn (x) be the nth Taylor polynomial for f (x) = ex expanded about x0 = 0.
a. For fixed x, show that pn = Pn (x) satisfies the hypotheses of Theorem 2.13.
n 1 k
SOLUTION: Since pn = Pn (x) = k=0 k! x , we have
−eξ
pn − p = Pn (x) − ex = xn+1 ,
(n + 1)!
where ξ is between 0 and x. Thus, pn − p = 0, for all n ≥ 0. Further,
−eξ1 n+2
pn+1 − p (n+2)! x e(ξ1 −ξ) x
= = ,
pn − p −eξ
(n+1)! x
n+1 n+2
e(ξ1 −ξ) x
where ξ1 is between 0 and 1. Thus, λ = limn→∞ n+2 = 0 < 1.
2
b. Let x = 1, and use Aitken’s ∆ method to generate the sequence p̂0 , p̂1 , . . . , p̂8 .
SOLUTION: The sequence has the terms shown in the following tables.
n 0 1 2 3 4 5 6
n 7 8 9 10
Then reduce the polynomial to lower degree, and determine any complex zeros.
SOLUTION: Applying Newton’s method with p0 = 1 gives the sufficiently accurate approximation
p7 = −3.548233. When p0 = 4, we find another zero to be p5 = 4.381113. If we divide P (x) by
we find that
P (x) ≈ x2 − 0.832880x − 15.54521 x2 − 1.16712x + 2.57315 .
The complex roots of the quadratic on the right can be found by the quadratic formula and are
approximately 0.58356 ± 1.49419i.
SOLUTION: The following table lists the initial approximation and the roots. The first initial
approximation was used because f (0) = −40, f (1) = −37, and f (2) = −56 implies that there is a
minimum in [0, 2]. This is confirmed by the complex roots that are generated.
The second initial approximations are used to find the real root that is known to lie between 4 and 5,
due to the fact that f (4) = −40 and f (5) = 115.
The third initial approximations are used to find the real root that is known to lie between −3 and −4,
since f (−3) = −61 and f (−4) = 88.
Since x = 1 is quite easily seen to be a zero of f (x), the cubic equation can be reduced to a quadratic
to find the other two zeros: 2 and −1.5.
Since the quadratic formula applied to
y
60
40
20
22
23 21 x
1 2 3
220
SOLUTION:
a. Bisection method: For p0 = 0.1 and p1 = 1, we have p14 = 0.23233.
b. Newton’s method: For p0 = 0.55, we have p6 = 0.23235.
c. Secant method: For p0 = 0.1 and p1 = 1, we have p8 = 0.23235.
d. Method of False Position: For p0 = 0.1 and p1 = 1, we have p88 = 0.23025.
e. Müller’s method: For p0 = 0, p1 = 0.25, and p2 = 1, we have p6 = 0.23235.
Notice that the method of False Position was much less effective than both the Secant method and the
Bisection method.
34 Exercise Set 2.6
9. A can in the shape of a right circular cylinder must have a volume of 1000 cm3 . To form seals, the
top and bottom must have a radius 0.25 cm more than the radius and the material for the side must be
0.25 cm longer than the circumference of the can. Minimize the amount of material that is required.
V = 1000 = πr2 h,
we have h = 1000/ πr2 . The amount of material required for the top of the can is π(r + 0.25)2 ,
and a similar amount is needed for the bottom. To construct the side of the can, the material needed is
(2πr + 0.25)h. The total amount of material M (r) is given by
Thus,
M (r) = 4π(r + 0.25) − 2000/r2 − 500/(πr3 ).
Solving M (r) = 0 for r gives r ≈ 5.363858. Evaluating M (r) at this value of r gives the minimal
material needed to construct the can: