Problem on Newton's Method

Document Sample
Problem on Newton's Method Powered By Docstoc
					                  \




                                 Problem on Newton's Method
Newton's Method for computing a square root B = square root(X) uses iteration. Beginning with the initial estimate
B0 = X/2, successive estimates are made from the equation Bi = ½ (X/Bi-1 + Bi-1). For example, when X = 5, the
successive estimates are 2.5, 2.25, 2.2361, 2.236068, .... The process terminates when the change in estimate, | Bi -
Bi-1 |, is sufficiently small.
          (a) Draw a flowchart delineating this method.
          (b) Draw the program graph corresponding to your flowchart.
          (c) In your flowchart, how is "sufficiently small" interpreted? In other words, use an unambiguous specific
criterion for the terminating condition.
          (d) What are the restrictions on the inputted number X? Must it be an integer? Can it be negative? Can it
be irrational? Can it be transcendental? Can it be imaginary or complex? Can it be zero? Can it be very large (e.g.,
10100 )? Can it be very small (e.g., 10-100) ? Can it be close to unity? Justify your answers with the sequences of
estimates B0, B1, B2, ... for sample numbers X. [It is interesting, but only tangential to the focus of this course,
to consider how fast the estimation process converges to a result. Is the result ever exact?]
          (e) Write a module using Newton's method in pseudocode, or in any programming language with which you
are familiar. Document your module with comments, limiting the length of your comments to no more than twice the
number of lines in your pseudocode, or to one page, whichever is shorter.
          (f) How would you modify your flowchart of answer (a) if you wanted to eliminate some of the
"exceptions" that you discovered in answering part (d)?

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:10/4/2012
language:English
pages:1