Example: barber

Solutions to Problems on the Newton-Raphson Method

Solutions to Problemson the Newton-Raphson MethodThese Solutions are not as brief as they should be: it takes work tobe brief. There will, almost inevitably, be some numerical errors. Pleaseinform me of them We will be excessively casual inour notation. For example,x3=3:141592654 will mean that the calculatorgave this result. It does not imply thatx3is exactly equal to 3 should always treat at least the nal digit of a calculator answerwith some skepticism. Indeed di erent calculators can give (mildly) di erentanswers.

2. Let f(x)=x2 −a. Show that the Newton Method leads to the recur-rence x n+1 = 1 2 x n+ a x n : Heron of Alexandria (60 CE?) used a pre-algebra version of the above recurrence. It is still at the heart of computer algorithms for nding square roots. Solution:Wehavef(x)=2x. The Newton Method therefore leads to the recurrence x n+1 = x n− f(x ...

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Solutions to Problems on the Newton-Raphson Method

1 Solutions to Problemson the Newton-Raphson MethodThese Solutions are not as brief as they should be: it takes work tobe brief. There will, almost inevitably, be some numerical errors. Pleaseinform me of them We will be excessively casual inour notation. For example,x3=3:141592654 will mean that the calculatorgave this result. It does not imply thatx3is exactly equal to 3 should always treat at least the nal digit of a calculator answerwith some skepticism. Indeed di erent calculators can give (mildly) di erentanswers.

2 In applied work, we need to pay heed to the fact that the standardtools, such as calculators and computer programs, work only to limitedprecision. In a complex calculation, minor inaccuracies may result in asigni cant Use the Newton-Raphson Method , with 3 as starting point, to nd afraction that is within 10 8ofp10. Show (without using the squareroot button) that your answer is indeed within 10 8of the :Thenumberp10 is the unique positive solution of the equa-tionf(x)=0wheref(x)=x2 10.

3 We use the Newton Method toapproximate a solution of this our initial estimate of the root, and letxnbe then-thimproved estimate. Note thatf0(x)=2x. The Newton Method re-currence is thereforexn+1=xn f(xn)f0(xn)=xn x2n 102xn:To make the expression on the right more beautiful, and calculationseasier, it is useful to manipulate it a bit. We getxn+1=xn xn2+102xn=12 xn+10xn :1 Compute, starting withx0=3. Thenx1=(1=2)(x0+10=x0)=(1=2)(3 + 10=3) = 19=6. Andx2=(1=2)(19=6+60=19) = 721= could go on calculating with fractions|and there is interestingmathematics involved|but from here on we switch to the we allow the = sign to be used sloppily, we getx1=3 (1=2)(x1+10=x1)=3:162280702, andx3=3:16227766,andx4=3 calculator says thatx3=x4to 8 decimal places.

4 We can thereforedare hope that 3:16227766 is close enough. One way of checking is toleta=3:16227765 andb=3:16227767. A quick calculation shows|ifthe squaring button can be trusted, and it is one of the ones that canbe|thatf(a)<0 whilef(b)> the functionf(x) changes sign asxgoes fromatob. It follows bythe Intermediate Value Theorem thatf(x)=0hasasolution(namelyp10) lies in the interval (a;b), and thedistance from 3:16227766 to eitheraorbis 10 8, it follows that thedistance from 3:16227766 top10 is less than 10 Letf(x)=x2 a.

5 Show that the Newton Method leads to the recur-rencexn+1=12 xn+axn :Heron of Alexandria (60 CE?) used a pre-algebra version of the aboverecurrence. It is still at the heart of computer algorithms for ndingsquare :Wehavef(x)=2x. The Newton Method therefore leads tothe recurrencexn+1=xn f(xn)f0(xn)=xn x2n a2xn:Bring the expression on the right hand side to the common denomi-nator +1=2x2n (x2n a)2xn=x2n+a2xn=12 xn+axn :3. Newton's equationy3 2y 5=0hasarootneary=2. Startingwithy0= 2, computey1,y2,andy3, the next three Newton-Raphsonestimates for the :Letf(y)=y3 2y 5.

6 Thenf0(y)=3y2 2, and theNewton Method produces the recurrenceyn+1=yn y3n 2yn 53y2n 2=2y3n+53y2n 2(there was no good case for simpli cation here). Start with the esti-matey0=2. Theny1=21=10 = 2:1. It follows that (to calculatoraccuracy)y2=2:094568121 andy3=2:094551482. These are almostthe numbers that Newton obtained (see the notes). But Newton ine ect used a rounded version ofy2,namely2 Find all Solutions ofe2x=x+ 6, correct to 4 decimal places; use theNewton :Letf(x)=e2x x 6. We want to nd wheref(x)= thatf0(x)=2e2x 1, so the Newton Method iteration isxn+1=xn e2xn xn 62e2xn 1=(2xn 1)e2xn+62e2xn 1:We need to choose an initial estimatex0.

7 This can be done in variousways. We can (if we are rich) use a graphing calculator or a graphingprogram to graphy=f(x) and eyeball where the graph crosses thex-axis. Or else, if (like the writer) we are poor, we can play aroundwith a cheap calculator, a slide rule, an abacus, or scrap paper and adull is easy to verify thatf(1) is about 0:389, and thatf(0:95) is about 0:2641, so by the Intermediate Value Theorem there is a root between0:95 and 1. And sincef(0:95) is closer to 0 than isf(1), maybe the rootis closer to 0:95 than to 1.

8 Let's make the initial estimatex0=0 calculator then givesx1=0:970870836, and thenx2=0 these two agree to 5 decimal places, we can perhaps concludewith some (but not complete) assurance that the root, to 4 deci-mal places, is 0:9709. If we want greater assurance, we can computef(0:97085) andf(0:97095) and hope for a sign change, which showsthat there is a root between 0:97085 and 0:97095. There is indeedsuch a sign change:f(0:97085) is about 2:6 10 4whilef(0:97095)is about 10 the problem asked forallthe Solutions .

9 Are there any others?3 Draw the graphs ofy=e2xandy=x+6. Thesolutionsofourequation are thex-coordinates of all places where the two curves a rough picture makes it clear that the curves meet at quite rapidly asxdecreases throughnegative values, it seems reasonable that there will be a single negativeroot, barely larger than 6. Certainly it cannot be smaller, since tothe left of 6,x+ 6 is negative bute2xis not. And it seems rst estimate the negative root. It is reasonable to start withx0= 6.

10 Thenx1= 5:999993856. We can guess that the root isindeed 6 to 4 decimal places. For certainty, we should check thatf(x) has di erent signs at 6and 5:9999. It 's check that there are no more roots. Note thatf0(x)=2e2x (x)>1whenx>0, and in particularfis increasing from0 on, indeed it starts increasing atx= (1=2) ln(2). Note also thatf(0)<0, and that, for example,f(1)>0. So there is at least one rootrbetween 0 and 1. But there can only be one root there. Forf(x)isincreasing in the rst quadrant, so can cross thex-axis only similar argument shows that there is a single negative root.


Related search queries