Torsten
Posts:
1,531
Registered:
11/8/10


Re: looping codes for iterative equation
Posted:
May 23, 2012 2:34 AM


On 23 Mai, 08:18, "relgn ng" <dream_win...@hotmail.com> wrote: > Hi, > > I have a equation which requires iteration to solve, can show me how the code should be like. > > The equation is like x' = x + 0.002512  ((sin a/cos a)  1)^1.5 > SO i will require to assume a random angle of x first > Then working out the eqn and get x' > Input x' answer as x into the eqn and get a new x' > and keep repeating the above until x' = x > > Thanks in advance!!!
Say 0.002512  ((sin a/cos a)  1)^1.5 = c. Then the iteration reads x_(n+1) = x_(n) + c, thus x_(n) = x_(0) + n*c This iteration won't converge unless c=0 .
Best wishes Torsten.

