One numerical method for calculating the cubic root of a number, 3P is in iterations. The process

Question:

One numerical method for calculating the cubic root of a number, 3√P is in iterations. The process starts by choosing a value x1 as a first estimate of the solution. Using this value, a second, more accurate value x2 can be calculated with x2 = (P/x21 + 2x1)/3, which is then used for calculating a third, still more accurate value x3, and so on. The general equation for calculating the value of xi+1 from the value of xi is xi+1 = (P/x2i + 2xi)/3. Write a MATLAB program that calculates the cubic root of a number. In the program use x 1 = P for the first estimate of the solution. Then, by using the general equation in a loop, calculate new, more accurate values. Stop the looping when the estimated relative error E defined by E = |xi+1 - xi| is smaller than 0.00001. Use the program to calculate:
(a) 3√100
(b) 3√53701
(c) 3√19.35
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: