Finding Xo & Iterations for 5 Decimal Solutions

  • Thread starter Thread starter jvignacio
  • Start date Start date
Click For Summary
To find the largest solution to five decimal places, start with a reasonable initial guess for Xo and iterate until the desired precision is achieved. Each iteration should be compared to the previous one, and the process continues until the difference is sufficiently small. Caution is advised, as Newton's method may not always converge; if the differences increase or oscillate, a new initial guess should be tried. Implementing a program can streamline this process, and it's recommended to limit iterations to around 30 to avoid endless loops. If convergence isn't reached within this limit, users should be prompted to choose a new starting value.
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.
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
2K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
9
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K