PDA

View Full Version : newtons method.


jvignacio
Oct29-08, 12:40 AM
when it asks to find the largest solution to 5 decimals, whats the initial value i start with for Xo and how many iterations should i do?

thank you

Integral
Oct29-08, 02:25 AM
Start with a reasonable guess, iterate until you reach the desired precision.

Compare each iterate with the previous, when the difference is small enough you are done.

Oberst Villa
Oct30-08, 05:08 PM
Start with a reasonable guess, iterate until you reach the desired precision.

Compare each iterate with the previous, when the difference is small enough you are done.

One word of caution: Although Newtons method normally converges very fast, there is no guarantee that it will converge at all ! If you see the difference getting bigger instead of smaller (or some sort of oscillation), you know that Newton is running amok. Try to guess a new initial value and start again.

If you have written a little program to do the job (and you should do so, doing this stuff manually is boring), the easiest solution to the non-convergence problem is to count the number of iterations. If you are not done after, say, 30 iterations, stop the program and ask the user for a new initial value.