- #1

- 69

- 1

## Homework Statement

Euler method : Plot the trajectory of a body moving under the influence of the suns gravity from initial conditions x=1, y=0, v

_{x}=0, v

_{y}=1.

My trouble is figuring out my function.

## Homework Equations

d

^{2}

__r__/ dt

^{2}= -

__r__/r

^{3}

## The Attempt at a Solution

What I have been doing previously is breaking the function into x and y components, so for finding v

_{x}(i+1) I use Fx, as for v

_{y}and Fy.

So for this case;

Fx = -(x+0)/(SQRT(x

^{2}+ 0)

^{3}

Fy = -(0+y)/(SQRT(0 + y

^{2})

^{3}

Is this right?