# Need help solving a differential equation for orbit.

I want to be able to map the position of a planet given initial position, velocity, and acceleration.

I know the equation for Gravitational force (Newtonian) is: F=-GMm/r^2

Using Newtons second law this gives: m(d^2x/dt^2)=-GMm/x^2

Then simple Algebra yields: (d^2x/dt^2)+GM/x^2=0

I understand you need initial conditions to solve this problem, so I'm going to say that
x(0)=a
x'(0)=b
x''(0)=c
Thank you very much to anyone who helps me out with this!

maajdl
Gold Member
Multiply the equation of motion by v=dx/dt and integrate.
This will lead you to the conservation of energy:

v²/2 - GM/x = Constant = b²/2 - GM/a

Solve for v = dx/t, and integrate once more.
(here you have a difficulty: there are two solutions)

I assumed you were asked to solve the 1-dimensional problem, not the more realistic 2-d problem.

If you want to solve the 2d problem, you should work whit polar coordinates.
Also you are giving more initial conditions that you need.