Physics – Solving a Gravitational Field Differential Equation

ordinary differential equationsphysics

This is the equation I'm having trouble with:

$$G \frac{M m}{r^2} = m \frac{d^2 r}{dt^2}$$

That's the non-vector form of the universal law of gravitation on the left and Newton's second law of motion on the right. I assume that upon correctly modeling and solving this, I will have a function of time that gives the distance from a spherical mass in space (e.g. distance from the Earth from an initial condition of $r(0) = 10,000 \mathrm{km}$).

However, WolframAlpha gives a hell of an answer, which leads me to believe that I'm modeling this equation completely wrong. Can anyone shed some light on this problem?

Best Answer

Yes you're modeling it wrong. Gravity is an attractive force, so if the mass is at r = 0, and r is nonnegative, then the gravity force should point towards zero, i.e. negative.

$$ - \frac{GMm}{r^2} = m\ddot r$$

(This assumes $m\ll M$ so we don't need to consider reduced mass. See the other answers for the more general case.)

But now Alpha even refuses to solve it. That's fine, because Mathematica can't solve many things. The usual approach is to notice that

$$ \frac{d^2r}{dt^2} = \frac{dv}{dt} = \frac{dv}{dr}\frac{dr}{dt} = v \frac{dv}{dr} $$

to convert that 2nd-order ODE to a 1st-order ODE:

$$ -GM \frac{dr}{r^2} = v \,dv $$

This gives the solution v(r).

$$ \frac{GM}r + \text{constant} = \frac{v^2}2 \qquad (*) $$

But recall $v = dr/dt$. So we have another 1st-order ODE to solve, which gives r(t). The solution should look like that “hell of answer” because of the square root.

 

Note: If you rearrange the terms you should see that Equation (*) is just conservation of energy.