Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started