Question: Q (Finding a cube root with Newton's formula.) Recall that we approximated the square root of a given number using a loop. Newton's method can
Q (Finding a cube root with Newton's formula.) Recall that we approximated the square root of a given number using a loop. Newton's method can also be used to compute the cube root of positive number using an iterative process. We start with some iniial guess (any positive number) and compute subsequent guenses using the following formula: nowGuess = 1/3(2 + oldGuess +input/ oldGuess )
For example, to find the cube root of 27, lets say we start with 27 as the first guess. Second guess = }(2 *27 +27/27^2) = 18.01
Third gues= 1/3(2* 18.01 + 27/18.91^2) = 12.03 and so on. Subsequent guessies are 8.08, 5.52 and 3.97
(a) What criterion will you use to decide when to stop the iterations?
(b) List the sequence of operations that will be performed when this method is applied.
(c) Find the repetition in this sequence and create a flowchart for the process.
(d) Encode the flowchart into C++ code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
