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/ 4
3.4 APPLICATION:
DIVISION USING
NEWTON’S METHOD
Exercises:
i. Test the method derived in this section by using it to approximate
1/0.75 = 1.333..., with x9 as suggested in the text. Don’t write a
computer program, just use a hand calculator.
Solution: We get the following sequence of values:
2, = 1.312500
@2 = 1.333007812
Es 1.333333254
4 = 1333339333
®5 = 1.333333333
2. Repeat the above for a = 2/3.
3. Repeat the above for a = 0.6.
Solution: This time we get:
71 = 1.656
2 = 1,6665984
23 = 1.666666664
4 = 1.666666667
ay = 1.6666666674, Based on the material in this section, write each of the following
numbers in the form
a=bx2*
€ [1h
where and then use Newton’s method to find the
reciprocal of b and hence of a,
(@a=7;
Solution: We have
a= (7/8) x 2,
so b= 7/8, Newton’s method produces b* = 1.142857149 in four
iterations, therefore a~* = bt 0.125 = 0.1428571429.
(b)a=7;
(@a=6;
@a=5;
Solution: We have
2") x 2) = 5/8 x B,
sob =5/8 = 0.625. From the text we take
— 2(0.625) = 1.75.
‘We get the results in Table 3.5. Notice that we converge must
faster than expected, and that we have
1/5 = 1/16 x 8 =0.2,
which is the correct result.
Table 3.5 Newton iteration for Problem 4¢, Sec. 3.4.
fm
ousSgeqE-o:
o.s5g088Eo2
0.160000E+04
|0.160000E+01
jo.s60000E+04
|0.160000E+01
ae ==) [=(@a=3.
Solution: We have
a=(3/4) xP,
so b = 3/4, Newton's method produces b-* = 1.333333333 in four
iterations, therefore a-* = b-! x 0.25 = 0.333333333-
Be sure to use the initial value as generated in this section and.
only do as many iterations as are necessary for 10~** accuracy.
‘Compare your values to the intrinsic reciprocal function on your
computer or calculator. Note this can be done on computer or
hand calculator.
5, Test the method derived in this section by writing a computer
program to implement it. Test the program by having it it eompute
1/0.75 = 1.333. With x, as suggested in the text, as well as 1/(2/3)
=15.
Solution: The following is a MATLAB seript that accomplishes
the desired task.
function r = recip(a)
x= 3 - 20a;
for kei:
= = xe(2 = ax);
end
r=x;
6. How close an initial guass is needad for the method to converge
to within a relative error of 10-4 in only three iterations?
Solution: To get the relative error after 3 iterations less than
10-4, we need to have
Therefore, the initial error |e,| must satisfy
Jeo] < a10~-™/ = 10- 4/5 = 0.0178.
7. Consider the quadratie polynomial
go(z) = 4.328427157 — 6.0588745832 + 2. 74516604827,
‘Whatis the error when we use this to generate the initial guess?
How many steps are required to get 10-*° accuracy? How many
operations?8. Repeat Problem 7, this time with the polynomial
go(x) = 5.742640783 — 12.110482522 + 11.142284882? — 3.767IGRSS2".
Solution: This time we are looking at the difference
oe) = 2 = qa(z) = 2 - s.rapesorss + 12.119489500 — 11.147284882"
+3,7679684532"
g(x) = (=1/2*) + 12.11948252 — 22.284569762 + 1.303902",
Setting this equal to zero and solving leads us to the polynomial
equation
—1 + 12.119482527? — 22.284569762" + 11.30390r" = 0.
Plotting this shows there are three roots on the interval [1/2, 1]:
a, = 0.56, a; = 0.73, and a, = 0.92. Using Newton’s method to
refine each of these values gives us.
@ = 5621750583, ay = .7285533588, ay = 9163783254.
‘These are our eritieal points, at which we need to evaluate the
error g(x) (along with the endpoints). We get
9(1/2) = .0025259136
gl) = .002525310
g(a) = =.0025259184
(a2) 002525312
g(as) = ~.002525321
thus showing that the maximum value of |g(x)| — hence, the
maximum value of the initial error using g, to compute x, —is
about 0.0025, To get 10-*° accuracy now requires only 3
iterations, and a total of 15 operations, again.
9. Modify your program from Problem 5 to use each of p., q,, and
q, to compute 1/a for a = 0.75 and a = 0.6. Compare to the values
produced by ordinary division on your computer. (Remember to
use Horner's rule to evaluate the polynomials!)
10. Modify the numerical method to directly compute the ratio b/a,
rather than just the reciprocal of a. Is the error analysis affected?
(Note: Your algorithm should approximate the ratio b/a without
any divisions at all.)
1. Test your modification by using it to compute the value of the
ratio 4/5 = 0.8.
seeen