Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: looping codes for iterative equation
Replies: 16   Last Post: May 23, 2012 11:10 PM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,717 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
>

Say 0.002512 - ((sin a/cos a) - 1)^1.5 = c.
x_(n+1) = x_(n) + c,
thus
x_(n) = x_(0) + n*c
This iteration won't converge unless c=0 .

Best wishes
Torsten.

Date Subject Author
5/23/12 relgn ng
5/23/12 Torsten
5/23/12 Bruno Luong
5/23/12 relgn ng
5/23/12 Bruno Luong
5/23/12 relgn ng
5/23/12 Nasser Abbasi
5/23/12 relgn ng
5/23/12 Nasser Abbasi
5/23/12 relgn ng
5/23/12 Nasser Abbasi
5/23/12 Steven Lord
5/23/12 relgn ng
5/23/12 Nasser Abbasi
5/23/12 relgn ng
5/23/12 Nasser Abbasi
5/23/12 relgn ng