0% found this document useful (0 votes)
144 views41 pages

Solution - Manual For Numerical Analysis - VIEWER XDOCS

solution_manual for numerical analysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
144 views41 pages

Solution - Manual For Numerical Analysis - VIEWER XDOCS

solution_manual for numerical analysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 41
STUDENT STUDY GUIDE FOR Numerical Analysis Eighth Edition Richard L. Burden J. Douglas Faires YOUNGSTOWN STATE UNIVERSITY COPYRIGHT © 2005 Richard L. Burden and J. Douglas Faires Contents Preface Mathematical Preliminaries Exercise Set LL Exercise Set 2 Exercise Set 1.3 Solutions of Equations of One Variable Exercise Set 2.1 Exercise Set 22 Exercise Set 23, Exercise Set 24 Exercise Set 2.5 Exercise Set 2.6 Interpolation and Polynomfal Approximation Exercise Set3.1... . ‘ Exercise Set 3.2 Exercise Set 33 Exercise Set 34 Exercise Set 3.5 ‘Numerical Differentiation and Integration, Exercise Set 4.1 Exercise Set 4.2 Exercise Set 4.3 Exercise Set 44 Exercise Set 4.5 Exercise Set 4.6 Exercise Set 4.7 Exercise Set 48 Exercise Set 4.9 Initial-Value Problems for Ordinary Differential Equations Exercise Set 5.1 Exercise Set 5.2 Exercise Set 5.3 ii CONTENTS Exercise Set 4 50 Exercise Set 8.5 93 Exercise Set 5.6 95 Exercise Set 5.7 ake 25 99 ee vente . . 100 Exercise Set 59 . 102 Exercise Set 5.10 105 ‘Direct Methods for Solving Linear Systems um Exercise Set6.1 oo. see ccs eeeeeeeseeeee . . 1 Exercise Set 62 116 Exercise Set 6.3 120 Exercise Set64.. 2. . cee ee cece 125 Exercise Set 6.1 128 Exercise Set 6.6 . 134 Iterative Techniques in Matrix Algebra oy Exercise Set 7.1 1 Exercise Set7.2.. 2.00.05 cece eens veces wees 2 Exercise Set 7.3 144 Exercise Set 7.4 146 Exercise Set7.5 147 Approximation Theory 158 Exercise Set 8.1 . 135 Exercise Set 82 137 Exercise Set8.30. 2. 000s ccs eveee esse eens . : 158 Exercise Set 84 : 159 Exercise Set 8.5 . 161 Exercise Set 8.6 let Approximating Eigenvalues 167 Exercise Set 9.1 167 Exercise Set 9.2 169 Exercise Set 9.3 m Exercise Set9.4 173, ‘Numerical Solutions of Nonlinear Systems of Equations 7 Exercise Set 10.1 seaeerteer son eaes 7 Exercise Set 10.2 179 Exercise Set 103... ee 2ay 182 Exercise Set 10.4 18s Exercise Set 10.5, 188 CONTENTS Boundary-Value Problems for Ord Exercise Set 11.1 Exercise Set 11.2 Exercise Set 11.3, Exercise Set 114. Exercise Set 11.5 ‘Numerical Solutions to Partial Differential Equations Exercise Set 121... ¢ Exercise Set 122. Exercise Set 123° Exercise Set 12.4 ww 191 193 195 198 199 205 2u1 213 Preface Preface ‘This Stadeat Study Guide for Nnmerical Analysis, Eighth Edition, by Burden and Faires contains worked ‘out representative exercises forthe all the techniques discussed in the book. Although the answers tothe 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 tobe those requiring insight into the methods sliscussed in the text. ‘We have also added a number of exercises tothe text that involve the use of a computer algcbra system, ‘We chose Maple as our standard, bat any ofthese systems can be used. In our recent teaching ofthe course ‘we found that students understood the concepts beter when they worked through the algorithms step-by-step, ‘at let the computer algebra system do the tedious computation. thas 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 ina 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 forthe algorithms inthe book. Ia the Sixth edition we placed the disk in the text itself, and added C programs, as well as worksheets in Maple and Mathematica, forall the algorithms. ‘We continued ths 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 ‘fom the original Lina package to the more modem 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, Ltp/Avww.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 o reflect any modifications that might be made. For example, we will place there any responses to {questions from users ofthe book concerning interpretations of the exercises and appropriate applications of the techniques, vi Preface ‘We hope our supplement package provides flexibility for instructors teaching Numerical Analysis. If ‘you have aay suggestions for impeovements 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 mal atthe addzesses listed below. ‘Youngstown State University Richard L. Burden [email protected] December 27, 2004 J.Douglas Faires [email protected] Mathematical Preliminaries Exercise Set 1.1, page 14 4. d. Show that the equation 2 ~ (In:r)* = 0 has a least one solution inthe iaterval [4,5] SOLUTION: It is not possible to algebraically solve for the solution , but this is not required in the problem, we must only show that a solution exists. Let Sle) = 2— (nz) = x —exp(e(In(lnz))). Since fis continuous on [4 5] with f(4) ~ 0.3006 and f(5) = —5.790, the Intermediate Value Theorem implies that a number x must exist in (4,5) with O= f(x) =~ (In-z)* 2. ¢ Find intervals thet contain a solution tothe equation x* — 2s? — 4r-+3=0. SOLUTION: Let f(x) = * 22% — 4 +3. The critical points of f occur when = s'() =429 —4r—4= (Br + )(2-2); that is, when r= ~3 and x = 2. Relative maxiomm and minimum valves of f ean occur only at these Values, There are a most thee solutions to f(x) = 0, sine f(z) isa polynomial of degree three. Since f(—2) = —6 and f (3) a 4.48; #(0) = 3 and f(1) = —2: and f(2) = —5 and J(4) = 19; solotions lie in the intervals [-2, —2/3]. 0, 1), and [24 4. a Find maxocect [f(#)| when f(x) = (2 + 2x) /3. SOLUTION: First note that /"(x) = (—e* + 2) /3 50 the only critical point of f occurs at r — In 2, ‘hich lies inthe interval (0, i], The maximum for |f(2}| must consequentiy be ‘max(|f(0)],|f(in2)|, |F(1)]} = max{1/3, (21n2)/3, (4 — 0)/3} = (21n2)/3. 9. Find the second Taylor polynomial for f() = e eos x about ro = 0. SOLUTION: Since S(2)=A(cosz—sine), f"(x)=—2e(sin-z), and f"(x) = —2*(sinz + e082), we have f(0) = 1, /"(0) = 1. and f"(0) = 0. S0 2c Po2)= 1+ and Role) == e086) pa at Exercise Set 1.1 4-UseP(05) to apron (05), find an wpe bound for (05) — P05). an compare this to the actual error, SOLUTION: We have P(0.5) = 140.5 = 1.5 and = Peking + 0086) (9 5 (1105) POS) < amas, = i < 1015)? ma. lef(cing +con 5 3009)" mar. le (eing + con8)) ‘To maximize this quantity on [00.5], first note that Dge"(sin x + cost) = 2e* cos:r > 0, forall rin [00.5] This implies that che maximum and minimum values of "(sin + eos:z) on [0,0.5] occur at the endpoints of the interval, and (sin 0 + e080) = . Find a bound for the error | f(r) ~ Pa(x)}, for in (0, 1) SOLUTION: A similar analysis to that in part (a) gives [f(e) ~ Pa] < 2 (.0)%e4(in 1+ oos 1) = 1.282 ¢. Approximate Jp f(r) de-using Jp Pa(s) de. SOLUTION: : “ 4 apis ff terden [rvede= [ert] <5 4. Find an upper bound forthe enor ia pt (0 SOLUTION: From part), [ecoiaes [Stout rsinttac~ [aie de ost (cour bins) S(eost +sin1) ~ 5(1-+0) = 1.378, 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 © 2 10 approximate sin 1° SOLUTION: First we need to convert the degree measure forthe sine function to radians. We have 180° = rains, 30 1° = 45 radians. Since, f(z) — sin, f"(z) = cos, f"(2) = ~sin, and J"2) = ~cosz, we have f(0) = 0, and f"(0) = 0. The approximation sine m2 is aiven by f(x) = Py(z) and a(x) = —885r. Tf we use the bound [eos é| < 1, then |=(iz)| ae | 586 x 10-7 |=" si5 a y samen im . Use Maple to determine the third Maclaurin polynomial Ps(:r). SOLUTION: Define f() by (072) in (12 , ( xp (x¢/2) #sim (x/3) ; ‘Then find the first three tems of the Taylor series with Extract the third Maclaurin polynomial with >p3:=convert (g, polynem) + a, Bp 2+ i+ oat b. £02) and bound the eror|f(«) — P,()] 00 (0,1). SOLUTION: Determine the fourth derivative. af isdi ft (£,2,,%,2) 7 = 19 601720 gin (1 Sam —yogpelt/? sin (52) + Find the fifth derivative ofsisdift (fax): f= 8 an (42) +e (40) a at) * a See ifthe fourth derivative has any critical points in (0, 1. feolve(f5=0,x,0..2); >» p= 0047389076 The extreme values ofthe fourth derivative will occur at x = 0,1, or p. ol = 00787176213 pe? :=evalf (subs (x=0, £4)) ; 2 = o92so2s0259 3c3 :seval£ (subs (: LEAD): 4 = oneTa3463 ‘The maximum absolute value of f(r) is e, and the error is given by serror:=c1/24; ‘error == .004077990080 4 Exercise Set 1.2 26. Suppose that f is continuous on fab) thet ry andr are in [a,b], and that ey and e» are postive constants. Show that a number € exists between ry and. with cafes) + caf (2a) ate HO SOLUTION: Let and m < f(2) 2000, >, How many terms are required to ensure the 10° accuracy needed for an approximation 10 x? SOLUTION: In this case, we need 4 2n+)-1 Clearly, a more rapidly convergent method is needed for this approximation. < 10 or 4000 < 2n +1 < 10 on > 20,000,000,000. 3. a, How many calculations are needed to determine a sum of the form, Ld aws SOLUTION: For each i, the ianer sum 5 total of ‘aby requires i multiplications and i — 1 additions, for n(n +1) 7) smuhiptications and BOD additions 2 Once the m inner sums are computed, » ~ 1 additions are required forthe final sun. ‘The final total is: ‘multiplications and fittest) additions », Re-express the series in a way that will reduce the number of calculations needed to determine this SOLUTION: By rewriting the sum as n(n 1) 2 ‘ve can significantly reduce the amount of calculation, For each é, we now need i — 1 additions to sum y's fora total of n(n+0) Fn additions (Once the b's are summed, we need n multiplications by the a's followed by n — 1 additions of the products, The total additions by this method is still }(n+ 2)(1— 1), bat the numberof multiplications has been reduced from }n(n +1) ton. Mathematical Preliminaries 10. Devise an algorithm to compute the ral ots 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 23, 22 Step LIF A= 0 then if B= 0 then OUTPUT (‘NO SOLUTIONS’); STOR, else sen = —C/B: OUTPUT (‘ONE SOLUTION’. 7)): STOP, Step 2 Set D = B? — 440. Step 3 If D = Othen set:r; = ~B/(2A); ‘OUTPUT (‘MULTIPLE ROOTS", 1): STOP. Step 41F D < O then set b= V=D/(2A); a= —B/2A), OUTPUT (‘COMPLEX CONJUGATE ROOTS’); Step 6 OUTPUT (1,22): STOP. Suppose that as r approaches zero, Fa) = 1140) and F(x) = 12 +0 (24) Let ey and ep be nonzero constants, and define Fe)= aha) +eF(2) and Cle) = F(a) + Fler). ‘Show that ify = minimum {a, 8), then as 2 approaches 2er0, 10 Exercise Set 1.3 a. Fle) =erla + enka +(e) bG(x) = Ty +1a+0(07) SOLUTION: Suppose for suficiently small |r| we have positive constants ky and ky independent of sr for which Re) Lal 0, and define rq = Fy41/ Fr. Assuming that lity.» ty = converges, show that the limit isthe golden ratio: 2 — (1+ V8) /2. SOLUTION: Since Jim te= imeem aa 4 2, weave r=1+4, which implies that ‘The only positive solution to this quadratic equation is x = (1 + v5) /2. 17, The Fbonaei sequence also satisfies the equation on-al()-( a Write a Maple procedure to calculate Foo, SOLUTION: Fy u n=08 fal aot >for i from 1 ton do >as t9:f:s:8:sLiod; 1 :=218022005834555160026 Jf =135301852344706746049 1 :=218922005834555160026 1 = 854224848179261915075 ', Use Maple with the default value of Digits followed by eval to calculate Fo. SOLUTION: F100 ( (ange (5) /2)7200-((1-agre (5) /2°200) fog (511 ym) rom = 3 ((j +398) - (3-44) \ws o.3542208538 x 102 evalf (F100) ; . Why is the result from pat (a) more accurate than the result from part (b)? R 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 atthmetic. 44. Why isthe 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. What results when you use the command simp1ify instead of eval f to compute Foi SOLUTION: The result is the same as the result in part (a, Solutions of Equations of One Variable Exercise Set 2.1, page 51 4. Use the Biseetion method to find ps for f(2) = y@ — cox on (0,1). SOLUTION: Using the Bisccton method gives ox = 0 and b 4(b)) = 0.45970, We have p and f(p1) = -0. f(p1) < 0, we assign az = p; LL. Thus, f(a2) 75. Since f(p2) so f(a1) = —1 and ‘DHS <0, Since f(a) < Oand 0.17048 < 0, 13434 > 0, we have as = 0.5: 2. alLet f(2) = 3(e+1) (#— $) (2-1). Use the Bisection method on the interval [~2, 1.5] find SOLUTION: Since wwe have the following sign graph for f(2) eH “OFTHE EEE HEHEHE a4 Otte ee rot ereererees Jo) ~-----o444steo-oreeesee tee weave f(ps) > 0. 1.125 and 0.6875. Thus, a Wea: Sle.) < with f(a) < 0, and by = 1.5, with f(y) > 0. Since py = — ‘ay = ~2, with (a2) <0, and bp = —3, with f(b) > 0. Thus, p Heace, we assign a 1.195 and by = 0.25. Then ps AL Let f(z) = (£ +2)(2 + I)2(# ~ 1)°(e —2). To which zero of f does the Bisection method converge forthe following intervals? SOLUTION: Since Sle) = (2+ Met Yele- M22), B “ 2. 4. 1. Exercise Set2.1 \ve have the following sign graph for f() xe? Motttteteteteeet eet eet te e-P (voreeereres eon - ~nobtteee fo - ote tobe +0999 —_¢—_} > 3 2 9 6 f & 3 8 a[-3,25] SOLUTION: The interval {—5,2.5] contains all § zeros of f. For ay = —8, with f(a) <0, and by =2.5, with /(by) > 0, we have py = (~3-+ 2.5)/2 = ~0.25,s0 f(py) <0. Thus we asian on =0.25, with faa) <0, and bp 5, with f(b1) > 0. Hence, pa = (025 +2.5)/2 = 1.125 and f(g) < 0. Then we assign ay — 1.125, with f(ag) <0, and by =2.5, with f(by) > 0. Since [1.125,2.5] contains only the zero 2, the method couverges to 2. (1.75, 1.5) SOLUTION: The interval {—1.75, 1.5] contains the zeros —1, 0,1. For = ~1.78, with f(a) > 0, and by = 1.5, with f(b) < 0, We have p; = (~1.75 + 1.5)/2 = —0.125 and fim) < 0. Then we assign ag = ay = ~1.75, with f(a) > 0. and by =p, = -0.125, with f(b) <0. Since [-1.75, 0.125] contains only the 2er0 ~1, the method eoaverges to —1. Use the Bisection Algorithm to find an approximation to V3 that is accurate to within 10~* SOLUTION: The function defined by f(2) = 2* ~ has V3 its only positive root. Appling the Bisection method to this function onthe interval [1,2] sives V-~ mq = 1.7320. Using smaller stating interval would decrease the aumber of tertions tht ar required Use Theorem 2.1 to find @ bound for the number of iterations needed to approximate a solution to the equation 2 +r — 4 =0 on the interval [1,4] an accuracy of 10% SOLUTION: First note thatthe particular equation plays no part in finding the bound: all that is ceded isthe interval and the accuracy requirement, To find an approximation that is accurate to within 10-8, we need to determine the number of iterations so that that is, 3x10 <2" ‘Asa consequence, a bound for the number of iterations is n > 12. Applying the Bisection Algocitum gives pi2 = 1.3787. Define the sequence {p,} bY Pn = Ep. sequence {pn} diverges. 4. Show that img sc Pa — Pat 0, even though the Solutions of Equations of One Variable 1s SOLUTION: Since a — Pat = 1/mn, We have itn u(y — Pn) = O- However. the nth partial sum ofthe divergent harmonic series. The harmonic series isthe classic example ofa series whose tems go o zero, but not rapidly enough to produce a convergent series. There ae many proofs of divergence ofthis series, ny calculus text shoud give at east two. One proof wil simply analyze ‘he partial suns ofthe series an another based on the Tateatl Test. The pont ofthe problem not the fact that his particular sequence diverges itis that a est for an approximate solution ta oot based on the condition that [fn — pu i amall should always be suspect. Consecutive terms of 2 sequence may be close to each other, but not sufficiently close to the actual solution you are seeking. 19, A tough of water of length J. = 10 feet has cross section inthe shape ofa semicscle with radius foot. When filled with water to within a distance h of te top, the volume V = 12.4 "of the water is given by the formula 12 10 [o.sx— resin kh (1 a2)" Determine the depth ofthe water to within 0.01 fet. SOLUTION: Applying the Bisection Algorithm on the interval (0, 1] tthe function 10) = 124~10 on ~asexin—H(1=12)"7] o.t61 0.895 fet. ives hss pis = 0.1617, so the depth sr — 1 Exercise Set 2.2, page 61 3. The following three methods are proposed to compute 21"/3. Rank them in order, based on their apparent speed of couvergence, assuming py SOLUTION: a. Since we have 16 2. Exercise Set 2.2 «Since we have : and _ Set — 6822 — de + Btr9 — 204 + 255 - (ay 21° +24 + 8Ar5 (= 21)" Tha, g/ (214/4) = 5.706 > 1 @.Since Thus, ¢ (2109) ‘The order of convergence should be (b), (d), (a). Choice (c) does not converge. Use fixed-point iteration method to detemnine an approximation to V3 tat i accurate to within wrt 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 21, we need to convert the root-finding problem f(z) = x? ~ 3 into a fixed-point problem. One successful solution is to write 0 then add to both ses ofthe Inter equation and divide by 2. This gives g(x) = 0.5 (x + 2), and for o= 1.0, we have V8 = py = 1.73205, «. Determine a fixed-point funetion g and an appropriate interval that produces an approximation to a positive solution ofr? — e* = 0 that is accurate to within 10-* SOLUTION: There are numerous poss [ye 00 [0 1] with 7p 1032? on [3,4] with po Solutions of Equations of One Variable v7 18. Show that (a) Theorem 22 is tue if |g/(x)| < kis replaced by the statement “y’(x) 0. SOLUTION: First let g(x) = 1/2 + 1/.For x £ 0, we have g(x) = 1/2—1/a2.1Ex > v3, then 1/22 <1/2,0 (2) > 0. Also, g (V2) = v3. Suppose, as is the assumption given in part (a) that ro > V3. Thea a1 — V3 = alo) ~ 9 (V3) = 9116) (co - v2), where V2 < £ and x1 > V2 Further, yt 2a and V3 < 21 < sro. By an inductive argument, we have V2 < 2mt1 < tm <1 < 20. “Thus, (>) is a decreasing sequence that has a lower bound and must therefore converge. Suppose = lity, no Zu Then Pp A 7 Thus, 1 =P 4) pageh ‘which implies that a =p 42, sop= 42. Since ty > V2 or all m, Jim_ tm = V3. 18 m Exercise Set 2.3, ‘Now cousider the situation when 0 < «ry < /2, which is the situation in part (b). Then we have 0< (29 v3)" =23-200V/2-+2, Qrov2 < 2h +2 and Va< Be To complete the problem, we consider the thee possiblies ey > 0 Case I: xp > 2, which by pat (amples that ite = V2. Case 2: xo = V2, which implies that tm = V2 for all m and that limtm_ao tm = v2. Case 3: 0 < zo < v2, which implies that v2 < 21 by part (b). Thus, O< myc VE camp Ste Sony and lim tm = v3. In any situation, the sequence converges to V3, and rapidly, as we will discover in the Seetion 23. Suppose thatthe function g has a fixed-point at p, that g € Ca, band that g exists in (a,b). Show that if |g'(p)| > 1, then the fixed-point sequence will fil 10 converge for any initial choice of po, except if pm = p for some value of 7, SOLUTION: Since gis continous st p and l'(p)| > I. by letting e = |/(p)| — 1 there exists a saumber 6 > 0 such that We)-s@l< whenever 0 < |x —p| < 6, Since lg’) — 1, Wee)-9'@l> for any « satisfying 0 < [x — pl < 6, we have lov) lah, Lal) > La) — I) — 9) > W@)|- I I -D Ifpo is chosen so that 0 < |p — pol <6, we have by the Mean Value Theorem that ter — Pl = la(eo) — a(p)| = lo’(E) Ilo — a, for some £ between po and p. Thus, 0 < |p ~ | <5 and ter —Pl = 198) |lp0 — P| > leo — PI. ‘This means that when an approximation gets close top, but is not equal top, the succeeding terms of the sequence move away from p. Solutions of Evatioas of One Variable 1» Exercise Set 2.3, page 71 1. Let fw ~ 6 and py = 1. Use Newton's method to find p>. SOLUTION: Let f(z) 1. Then f(x) = 2x, and Newton's method becomes With pp = 1, we have m= and ~ Se 7200714, 3. Let f(x) =x? ~6, With pp = 3 and py ~ 2, find py 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 — £00n1)\Pu-1 = Pua) Pee Pet" lpn) — Fn-2) The Secant method With »p = and pr = 2, we have f(7») = 9-6 =3 and f(p1) =4—6 = 2. The Secaut method sives = Side me Fox) — Fee) and f(p2) = 24? 6 = 024, Then we have py LeaNra— Pr) _ gg (0224-2) _g, -1.006 _ 5 yg = Fon)— Fin) 4 Coma) 4 ae The method of Flee Position With pp = 3 and p1 = 2, we have f(pp) = 3 and J(p:) =—2. As in the Secant method (part (a)), p= 24 and f(p2) = ~0.24. Since f(y) < Oand f(p2) <0 the method of False Postion requires, ‘reassignment of py. Then p, is changed to py $0 that py = 3, with f(p1) = 3,and pp = 2.4, with ‘S{gn) = 0.24. We calculate ps by — 5, Slealm—m) 44 (0224-3) _, 0. PsP "Fm)— Fn) 4 on A ag € Since V6 2.44949, the approximation (a) is better. 20 Exercise Set 2.3, 5. ¢. Apply Newion’s method to find a solution to ~ cos:r = 0 inthe interval [0, 7/2] that is aceurate towithia 10-4 SOLUTION: With f¢ ‘Newton's method is coor, We have f(x) = 1 sin, and the sequence generated by com Pp Tsing For po = 0, we have p; = 1, pp = 0.75036, py = 0.73911, and the suficiently accurate Pa = 0.73909. «. Apply the Seeant method fo finda solution to x — cos.x = 0 in the interval {0,/2| that is accurate to within 10-4 SOLUTION: The Secant method approximations are generated by the sequence Pa = Po — 1 Pa = Pra (oa = ©057m-1) (Pa — 008 ma) Using the endpoints ofthe intervals as yy and py, we have the entries inthe following tables. Forthe Secant method: For the method of False Position: n nm oo oo 1 L.sro7o6s 1 Lsvo796a 2 ost101ss 2 06110155 3 0.7282005, 3 0,7232605 4 0.7395671 4 07372659 5 0,739084 5 O7S8S77S 6 0.7300851 6 0.7390615 7 0.739085 9. c. Apply the method of False Postion to find a solution to: —eos.r = O in the interval (0, x /2] that is accurate to within 1 SOLUTION: The method of False Postion approximations are generated using tis 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 «that produces the closest point on the graph of y = 1” to the point (1,0) SOLUTION: The distance between an arbitrary point (2) on the graph of y ~ c* andthe point (1,0) is d(x) = ye 1)? + (2? —0) = Vt Be ‘Because a derivative is needed to find the critical points of dit is easier to work with the square of this function, Sa) = (dle)? = 428 2244, Solutions of Equations of One Variable a 16. 19, 2. ‘whose minimum will occu tthe same value of asthe minimum of d(x). To minimize f() we need: so that O= f(x) = 49 422-2 Applying Newton's method fo find he root of this equation with po ~ 1 gives ps point on the graph of y = 2? that is closest to (1, 0) has the approximate coordinates: (o.ssorss,o-trstn) 580755. The ‘Use Newton's method to solve for roots of SOLUTION: Newton's method with py ~ § gives pis ~ 1.895488 and with py ‘9 = 1.895489. With py = 10x, the sequence does not converge in 200 iterations. Sx gives ‘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 ‘ith small magnitude, which increases the round-off error. Explain why the iteration equation forthe Secaut method should not be used inthe algebraically esuivaleat form $(0n-1)Pe=2~ H(Pn-2)Pn—a Tl0m-1)~ Sn-2) SOLUTION: This formula incorporates the subtraction of nearly equal numbers in both the ‘numerator and denominator when py and py are uearly 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. ‘Use Maple to determine how many iterations of Newtoa’s method with pp root of f(z) cto within 10-10, 15/Aare needed to find SOLUTION: We first define f(r) and f(x) with >£:=x-2e08 (x) “x: fen ost) — and >Ep:=x->(D) (£) (x); Ip 2+ —sin(z)—1 ‘We wish to use 100-digit rounding arithmetic so we set spigits po efor n from 1 to 7 do > pl:sevalf (pO-£ (0) /£p (po) ); 2 Exercise Set 2.3, Py = -T398085133321'516064165531208767387340401341175890075746406 1568063577312846548835475945903761069317065319, hich is accurate to 10-1 23, The function defined by f(r) = In (2? + 1) —e cow x has an infinite aumber of zeros. Approximate, to within 10-*, (2) the only negative 210, (@) the four smallest positive zeros, and (@ the 25th smallest positive zero, SOLUTION: The key to this problem i recognizing the behavior of ¢°4*, When is negative, this term goes to ero, so f(z) is dominated by In (x2 + 1). However, when xis positive, "dominates the calculations, and /(c) willbe zero approximately when tis term makes no contibuton; that is, when eos re = 0. This oceurs when 1 = 1/2 for a positive integer n. Using this information to determine initial approximations produces the following results For part (a), we can use pp = —0.5 to find the sufficiently accurate ps = ~0.4341431 For past (b), we can use: 0.510 give py ~ 04506567; pp — 1.510 give py — L.TAA7381; Po = 25 to give ps = 2.238319; and po = 35 to give pe = 3.709042. In general, a reasonable initial approximation forthe nth postive rot is ~ 0.5. To salve part (4), wwe let py = 24.5 to produce the suiciently aecurate approximation pz Graphs for vatious parts ofthe region are shown below. 600 400 200 26, Determine the minimal annual interest rte at which an amount P = $1500 per month can be invested to accumulate an amount A = $750, (00 at the end of 20 years based on the annuity due equation Fiasar- Solutions of Equations of One Variable 2B 28. Let Fle SOLUTION: This is simply a rootfinding problem where the function is given by 1500. y(12)(20) eon — 280 Fr sry —] ‘Notice that » 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 teh won bes iel choice The ial sal nr appoint 67% fi Pras A drug administered toa patient produces a concentration in the blood stream given by e(t) = Ate~‘/* mg/mL, t hours after A units have been administered, The maximum safe concentration is! mg/mL, 8) What amount should be injected to reach this safe level, and when does this cur? bb) When should an additional amount be administered, ift is administered when the level drops to 025 mg/mL? ©, Assuming 75% ofthe original amount is administered in the second injestion, when should a third injection be given” SOLUTION: The maximum concentration occurs when w=a(-Je This happens when t = 3 hours, and since the concentration at this time will be e(3) = Site, we need to administer A — Le unit For part (b) ofthe problem, we need to determine ¢ so that 0 oas-a=(ejie This occurs when is 11 hours and 5 minutes; that is, when t = 11.083 hows The solution to part (c) requires finding ¢ so that Ge) te! 40.75 () (611.083) e~(t-1.08578, This occurs after 21 hours and 14 minutes, 0.25 = e(t gett 7. 52 a. Use the Maple commands solve and feoLve 0 try to find al roots off. SOLUTION: First define the funetion by pf pKco3" (Bextl)-74957 (2030 5 f a 90H) _ 7g psolve (£ (x)=0,x) 5 (3/7) “in @T/25) Exercise Set 2.3, >fsolve(E (x)=0,x) feolve(g(*e+!) — 7 5128) 0.) ‘The procedure solve gives the ext ston, nd fool ve fis bose he neptive ai ian asymplote forthe gapiof (2) Plot f(t ind intial approximations to oot off. SOLUTION: Using the Maple command >plot ({£ (x) },x=10.5..11.5) ; produces the following graph. «. Use Newton's method to find roots off to within 10. SOLUTION: Define (x) using >£psax->(D) (£) (x); Sp 2+ 83%") In(a) — 145 In(5) Digits = 18 wall >for i from 1 to 5 do >pl:zevalf (po-£ (po) /£p(po)) : perr:sabs(pl-p0) ; >p0:=pli 30a; ‘The results are given in the following table Dy be peal 11,0007380401552508 .0007380401552503 111,0094380350662827 0002001041889676 ‘11.0004386442681488 2016978339 10-* TLOoONBSEAADSITIG «2772 10-2 11, 0094386442681716 0 Solutions of Equations of One Variable 2s 4. Find the exact solutions of f(x) = 0 algebraically. SOLUTION: We have 34"! = 7.52%, Taking the natural logarithm of both sides gives (r+1)In3=n7-+2rIn5, ‘Thus, eln3 — 2rln5 =In7 —in3, 1? 2(3ln3—2In5) In, and n7/3 In7/8__ 3/7 5 In 27/25. ‘In 27/25" This agrees with par), Exercise Set 2.4, page 82 1, a. Use Newton’s method to find a solution accurate to within 10~° for x? — 2re~* + e~™* = 0, where Oo <1 SOLUTION: Since . 2 are pe Ste) and Sa) = Br — De + Dee — 2e™, the iteration formula is S(Pn-a) FOr. Pa =Pa- Pat Boga — 2ePat + Dpy pe Pont — Det With pp = 0.5, i= 0.5 ~ (0.01134878)/(-0.3422805) = 0.5331965, [567135 is accurate to-within 10 Continuing inthis manner, pry = 3. a, Repest Exercise I(a) using the modified Newton-Raphson method described in Eq. (2.11). Is there ‘an improvement in speed or accuracy ver Exercise 1? SOLUTION: Since See L@ and 10. - a. Show that the sequence yn — 1/n converges linearly to p Exercise Set 24 the iteration forma is my flea Ons) Pe PI Fas) Ln)" Ons) With py = 0.5, we have f(po) = 0.011348781, f"(po) = ~0.342280542, f"(pp) = 5.201100744 and (0.01134878)(—0.512280542) (COsiaN06 12)? — (O.ULLSASTSI)(5.201T09744) =0.5680137. 05 — Continuing inthis manner, py = 0.567143 is accurate to within 10-* ‘and determine the number of tems sequited t have [py — n| <5 10-2 SOLUTION: Since tig Pm —al yg Wt py 8. pa ple nT we have linear convergence. To have py ~ pl < 5 x 10-%, we need 1/n < 0.05, which implies that n>, 3. Show that (a) the sequence pm = 10?" converges quadratically to zero, but that (b) pa = LO-"* does not converge to 2er0 quadratically, regardless of the size of k > 1. SOLUTION: a. Since bas -0| wo oe a) ER, Gone Te 0 en = OF the sequence is quadratically convergent. b, However, for any k > 1, tome rome Boney A goa = ag me diverges. So the sequence p,, = 10-"* does not converge quadratically for any positive value of k Show that the fixed-point method mf(x) To az) has o/(p) = 0, fp isa zero of f of maltiplicity SOLUTION: If f has a zero of multiplicity r at p, then a function q exists with S(@)=(2—p)"a(2), where lim af) #0. Solutions of Equations of One Variable cy 2. since Si(2) = mle — pale) + (4 — pI (2), wehave is) =e 40) n(x ~ p) ale) . Fe) ~*~ mle pyr-tqla) + (2 PPT) which reduces to m(x~ pale) ingle) +(e pate)" Differentiating this expression and evaluating at x = p gives ae) =2— ma(n)(matp)] [nato) If f'" is continous, Theorem 2.8 implies that this sequence produces quadratic convergence once We are lose enough tothe solution p. ge) = ‘Suppose that f has m continuous derivatives. Show that f has a zero of multiplicity m at p if and only if O= 0) =F) == FM), but FW) #0. ‘SOLUTION: If f has a zero of multiplicity m at p, then f can be written as fle) =(e— pr)" ale), for # p, where Thus, F(a) = mle — By" "ale) + (ep) (a) and f"(p) = 0. Also, ie and J"(p) =0. In general, for k o, Thos, Lam AYleg So Jen A CAMA HV Since the powers of jen] must agree, +1a and = ‘This number is called the Golden Ratio. It appears in mumerous situations in mathematics and in art. Exercise Set 2.5, page 86 2. Apply Newton's method to approximate a oot of f(z) =e + 3(ln2)%e™* — Inse"* — (In2)" = 0. Generate tems until py+1 ~ pn| < 0.0002, and construct the Aitken’s A? sequence {fn} SOLUTION: Applying Newton's method with py = 0 requires finding pyg = ~0.182888. For the Aiken's A? sequence, we have sufficient accuracy with fig = ~0.183:387, Newton’s method fails to converge quadratically because there is « multiple root. Solutions of Equations of One Variable 2» ‘cos(z ~ 1) and pf? = 2, Use Steffensen’s method to find p}”, Let oe) SOLUTION: With g() = coo ~1) and p( 2, we have (06?) = eon 1) = cont and 110) =9 (4) = en(ostoaoas — 1) = oso6ts Tass, (0) _(0))? 0 =”) ee es es 1a — 2p” 308 (05103023 — 2)? OpoIsGT — 2(0.5100023) +2 =2— 1.173578 = 0.826427. ‘5. Steffensen’s method is applied to a function g(r) using p{0” What could "be? SOLUTION: Steffensen's method uses the formula » ey = ee PoP ( i Substnting for pl, p.®),and p62 gives wr 3-2 +1 o and 7 = 1.5009 = 11, b. Use Steffensen’s method to approximate the solution to within 10-* of = 0.5(sin-x + eos-x), where gis the function in Exereise 11(f) of Section 2.2, thats, g(x) = 0.5(sin x + cos:). 30 Exercise Set2.5 SOLUTION: With (2) =0.5(sin r+ eon), we have .5(sin 0.5 + e0s0.5) = 0.678503051, (0 @)? (ot — of ) wy = O.TTTOIATTA, ry ross, rots, (1) Pa raisin, = 0.704872252, =o.704812197, (Ga = wy To1812002, =0.701812002, Toas12197. 1 <9 (0?) Since 7, p), and (all agree to within 10-, we accept p62 = 0.704812197 as an answer that is accurate 0 within 10> 14, a. Show that a soquence {7a} tnt converges top with onder > 1 converges sperinsey top SOLUTION: Since {nn} converges to pwith order a > 1, positive constant \ exists with A= Tim Pats al ww Hence, lnmss —p| e _ pet =a-0 in Fe enol and fan Pett—P Li This implies that {p,} that converges supertinearly to. by. Show that py = ;b converges suprlineary to zero, but doesnot converge of order a for any a> Solutions of Equations of One Variable 31 SOLUTION: This sequence converges superlinearly to zero since ae ene) (Ga) ai ya =, (Geyer) att eo-& However the sequence doesnot converge of order for ay a > 1 ice for a > 1, we have tin WY ne i Tae = GT tn. (Ga) eer 1) ni =i, (Gi) wel 17. Let Pa() be the nth Taylor polynomial for f(x) = e expanded about r» = 0. a. For fixed x, show that rm = Py () satisfies the hypotheses of Theorem 2.13, SOLUTION: Since py = Pq(t) = — b.Let.r = 1, and use Aitken’s A? method to generate the sequence fn, is. ++ sD SOLUTION: The sequence has the terms shown inthe following tables. no 1 2 3 4 5 6 mm 1 2 25 26 2.7083 _B71G 2.71805 fn 3 275 272 271875 2TISR 2.718287) 2.718283 nT 8 9 10 Py 27182539 2.7182787 2.7182815 2.7182818 Bq 27182818 27182818 32 Exercise Set 2.6 ¢, Does Altken’s A? method accelerate the convergence in this situation? SOLUTION: Aitken’s A? method gives quite an improvement for this problem. For example, is accurate to within 5 x 10-7. We need po to have this accuracy. Exercise Set 2.6, page 96 2. b. Use Newton's method to approximate, to within 10-5, the real zeros of 25 — 122" +160 — 40. P(e) ‘Then reduce the polynomial to lower degree, and determine any complex zeros. SOLUTION: Applying Newton's method with po = ‘pr = —8.548283, When py = 4, we find another zero to be ps, ives the sufficiently seeurate approximation ‘381113. If we divide P(x) by (e+ 3.548283)(o — 4.381113) =r? —0,8928800 — 15.5451 wwe find that P(e) = (22 — 0.832880 ~ 15.5451) (2? — L.16TI2 + 2.57915) ‘The complex roots of the quadratic on the right can be found by the quadratic formula and are approximately 0.58350 + 1494195, 4. b. Use Miller's method to find the real and complex zeros of — 2x4 — 122" + 16x — 40, Pls) SOLUTION: The following table lists the initial approximation and the roots. The fst initial approximation was used because f(0) = —40, f(1) = —87, and f(2) = —56 implies that there is a rinimam in (0,2). Ths is confirmed by the complex roots tha are generated, ‘The second initial approximations are used to ind the real rot that is known tole between 4 and 5, dive tothe fact tat f(4) = ~40 and f(5) = 115 ‘The third inital approximations are used to find the ral root that is known fo lie between — and — since f(-3) = 61 and f(~4) = 88. Po PL P2—Approximated Roots Complex Conjugate Root 583560 — 14941881 0.582560 + 1494188 Pe = 4.381113 3.518233 Solutions of Equations of One Variable 33 S. by Find the 2eros and critical points of S(e) = 0 ~20* 52? + 122-5, ‘and use this information to sketch the graph of f. SOLUTION: There are at most four real zeros of f and f(0) < 0, f(1) > 0, and f(2) <0. This, together with the fact that litig-.2o f(z) = oo and lite oo f(z) = co, implies that these zeros lie inthe intervals (~2c,0), (0,1), (1,2), ad (2,00). Applyig Newton’ method oc varios intial approximations in these intervals gives the approximate zeros: 0.5708, 1521, 2.282, and —2.492. To find thecal points, we need the zeros of Se) = 42" — 6x? — 108 + 12. Since = 1 is quite easily seen to bea zero of /"(x) the cubic equation ean be reduced to a quadratic to find the other two zeros: 2 and —1.5. Since the quadratic form applied to 0= f"(@) = 122 — 122-10 ives « = 0.5 + (/39/6), we also have the point of inflection AA sketch of te graph of f is given below, 7. Find a solution, accurate to within 10, o the problem 600." — 5500 + 2000? — 200 — 0, ford1

You might also like