• Support PF! Buy your school textbooks, materials and every day products Here!

Fixed point iteration to find the roots of 0=x-tan(x)

  • Thread starter Brendy
  • Start date
  • #51
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
683
That algorithm doesn't converge. I just took your code from post #17; it stopped after 50 iterations because it failed to converge.

Look at it this way: [itex]\tan x \approx x(1 - x^2/3)[/itex] for small x. All setting [itex]x=\arctan(x)[/itex] does when x gets even close to zero is to scale x by a factor that is nearly equal to 1.
 
  • #52
38
0
After rewriting it so that x_new... line is now x_new= atan (pi + x_old) it converged within 6 iterations. So is that just a fluke then? It is giving me the correct number to find the roots though.
I don't follow post #51 at all I'm sorry.
 

Related Threads on Fixed point iteration to find the roots of 0=x-tan(x)

Replies
17
Views
11K
Replies
9
Views
477
Replies
1
Views
19K
Replies
2
Views
10K
Replies
1
Views
929
Replies
3
Views
3K
  • Last Post
Replies
1
Views
596
  • Last Post
Replies
2
Views
1K
Replies
1
Views
615
Top