Euler method : Plot the trajectory of a body moving under the influence of the suns gravity from initial conditions x=1, y=0, vx=0, vy=1.
My trouble is figuring out my function.
d2r / dt2 = -r/r3
The Attempt at a Solution
What I have been doing previously is breaking the function into x and y components, so for finding vx(i+1) I use Fx, as for vy and Fy.
So for this case;
Fx = -(x+0)/(SQRT(x2 + 0)3
Fy = -(0+y)/(SQRT(0 + y2)3
Is this right?