Question: P 3 . The 'divide and average' method, an iterative method for obtaining the square root of a positive number a , can be formulated

P3. The 'divide and average' method, an iterative method for obtaining the square root of a positive number a, can
be formulated as:
xi+1=(xi+axi)2
where the subscript i indicates iteration i to i+1. Write a PYTHON program based on a while loop to
implement this algorithm and then find the square root of 21, correct up to five significant digits. Use the
approx. relative error criterion to assess convergence. Note, the approx. relative error in this case is defined as
ea=|xi+1-xixi+1|100%.
Hint: You have to pick an initial value of x. A simple and effective guess could be x=a2.
P 3 . The 'divide and average' method, an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!