32. One numerical method for calculating the cubic root of a number, is Halleys method. The solution
Question:
32. One numerical method for calculating the cubic root of a number, is Halley’s method. The solution process starts by choosing a value as a first estimate of the solution. Using this value, a second, more accurate value is calculated with , which is then used for calculating a third, still more accurate value , and so on. The general equation for calculating the value of from the value of is .
Write a MATLAB program that calculates the cubic root of a number. In the program use 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 is smaller than 0.00001. Use the program to calculate:
(a)
(b) (c)
Step by Step Answer: