Finding Xo & Iterations for 5 Decimal Solutions

  • Context: Undergrad 
  • Thread starter Thread starter jvignacio
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
jvignacio
Messages
7
Reaction score
0
when it asks to find the largest solution to 5 decimals, what's the initial value i start with for Xo and how many iterations should i do?

thank you
 
Physics news on Phys.org
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.
 
Integral said:
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.