## shawnf 2 years ago Newton's Method The problem using newton's method to determine the root of a poly has a quirk--it doesn't always converge. Using the example given in the problem set, my program returns the correct answer using the same number of loops, but if you use poly tuple (1,2,3) for example, you will get a noncovergent loop.

1. NoSoul

I had to program the same method to draw an implicit curve ... welcome to hell... however a hell with a solution. f(x,y) = 0 <=> y^2 + x^2 - c^2 = 0 (the circle as an example) with h a value like 1/10 of the interval you are interpolating roots dfx(x,y) = (f(x + h, y) - f(x,y)) / h (x variable, y fixed) dfy(x,y) = (f(x, + h) - f(x,y)) / h (x variable, y fixed) w_n+1 = w_n - f(x,y) / f'(x,y) (w because it can either be estimated in y or x) you stop if -a w_n+1 is outside the interval you are considering (not converging) -the value of the absolute value of the funtion for the new value w_n+1 < tol or|w_n - w_n+1| < tol - you try this for some iterations because newtons method converges fast as hell if the root is in the interval bur otherwise it does weird stuff. tolerance = 10^-3 or 10^-5 or 10^-7

2. NoSoul

Hope it helps

3. shawnf

Maybe bisection then newton's would be simpler? One nice thing about programs for engineering is that we can throw a million darts and one of them will hit, rather than figuring out how to actually throw darts.