I need help on the Newton question (#3) on the problem set 2!
I use the eval_poly and compute_deriv function from the first few questions. Those check out, but I just can't get the while loop to work. It runs forever, for reasons I don't understand. Here's the code:
deriv = compute_deriv(poly)
numguess = 0
while abs(eval_poly(poly, x_0)) >= epsilon:
numguess += 1
x_0 = x_0 - (eval_poly(poly, x_0))/(eval_poly(deriv, x_0))
else: print (eval_poly(poly, x_0), numguess)
return

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

btw it should return the root x_0, not eval_poly(poly, x_0)

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.