Suppose you didn’t know that 3√64 = 4. Write down Newton’s method for solving f (x) =x3 − 64 = 0. Choose x0 = 5 as your initial guess for the solution of this equation and iterateuntil the first 5 significant figures of your solution are correct.
Question
Suppose you didn’t know that 3√64 = 4. Write down Newton’s method for solving f (x) =x3 − 64 = 0. Choose x0 = 5 as your initial guess for the solution of this equation and iterateuntil the first 5 significant figures of your solution are correct.
Solution
Newton's method is a root-finding algorithm which produces successively better approximations to the roots (or zeroes) of a real-valued function. The method starts with a function f defined over the real numbers x, an initial guess x0 for a root of f, and the derivative f' of f.
The function f we're trying to find the root for is f(x) = x^3 - 64. The derivative of this function, f'(x), is 3x^2.
Newton's method formula is: x_n+1 = x_n - f(x_n) / f'(x_n)
Let's start with x0 = 5.
-
First iteration (n=0): x1 = x0 - f(x0) / f'(x0) = 5 - (5^3 - 64) / (3*5^2) = 5 - (125 - 64) / 75 = 5 - 61 / 75 = 5 - 0.813333333 = 4.186666667
-
Second iteration (n=1): x2 = x1 - f(x1) / f'(x1) = 4.186666667 - ((4.186666667)^3 - 64) / (3*(4.186666667)^2) = 4.186666667 - (73.17911111 - 64) / 52.49377778 = 4.186666667 - 9.17911111 / 52.49377778 = 4.186666667 - 0.174931111 = 4.011735556
-
Third iteration (n=2): x3 = x2 - f(x2) / f'(x2) = 4.011735556 - ((4.011735556)^3 - 64) / (3*(4.011735556)^2) = 4.011735556 - (64.56411111 - 64) / 48.14111111 = 4.011735556 - 0.56411111 / 48.14111111 = 4.011735556 - 0.011711111 = 4.000024444
-
Fourth iteration (n=3): x4 = x3 - f(x3) / f'(x3) = 4.000024444 - ((4.000024444)^3 - 64) / (3*(4.000024444)^2) = 4.000024444 - (64.00029496 - 64) / 48.00029496 = 4.000024444 - 0.00029496 / 48.00029496 = 4.000024444 - 0.000006144 = 4.0000183
-
Fifth iteration (n=4): x5 = x4 - f(x4) / f'(x4) = 4.0000183 - ((4.0000183)^3 - 64) / (3*(4.0000183)^2) = 4.0000183 - (64.0000002 - 64) / 48.0000002 = 4.0000183 - 0.0000002 / 48.0000002 = 4.0000183 - 0.00000000416 = 4.000018296
After 5 iterations, the first 5 significant figures are correct (4.0000).
Similar Questions
Change sqrt (including its Javadoc comments) so it also works when x = 0. Note: if your code from Newton1 appears to work without any changes, but it is such that it might execute a division by 0, then it is not correct. Division by 0, in general, is undefined and you should not write code that attempts to compute it.
Minimize f (x) = x4 − x + 1 using Newton’s method with initial point x0 = 3.
Find the cube root of 12 using the Newton Raphson method assuming x0 = 2.5.
Consider the following nonlinear equation: 𝑓(𝑥)=𝑥^3−2𝑥^2−2𝑥+1=0 Solve for the root using interval halving with 𝑥=0 and 𝑥=1 Solve for the root using false position with 𝑥=0 and 𝑥=1 Solve for the root using fixed point with 𝑥_0=0 Solve for the root using Newton’s method with 𝑥_0=1
√x+3=0,Solve and choose the correct value of
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.