Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Try Newton's method on (use np.cbrt), which has the root . Its derivative is . Start at and print the first six guesses. What happens, and why?
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. Write the step: . For this function, , so the step is . Every step doubles the distance from the root and changes the side.
Check. The guesses are 1, , 4, , 16 and . They jump from side to side and go farther from the root at every step. This is the opposite of convergence.
Answer: the method diverges. The curve is so steep at the root that the tangent always points beyond the root. Newton's method needs a function that is smooth enough near the root. A bracket method such as bisection or brentq would find this root without trouble.
Log in to join the discussion.
Loading…