# Calculating gravity when taking into account the change of gravitational force

This is a problem that has bothered me for a couple of weeks now, and I can't seem to wrap my head around it and understand it.

Let's say we have a planet with a mass of m. We also have an object of relatively small mass (so small that its gravitational field would not affect the planet), and we know that at time 0 it is at position h.

If we know the acceleration due to gravity (g), we can calculate the position y at time t:

$y = h - { g \; t^2 \over 2 }$

And we know that the acceleration due to gravity could be calculated:

$g = G { m \over y^2 }$

But since the acceleration depends on the position of the object relative to the planet, and the position of the object is dependent on the acceleration, this would obviously mean that the first formula won't work when we are working with displacement so large that it would change the acceleration significantly.

So, in essence, my question is, what formula can we use to calculate the position of an object, taking into consideration the change in acceleration due to gravity?

-

You are correct that the "normal" formula $y = h - gt^2/2$ doesn't work when the gravitational acceleration changes, so you need a different formula. The mathematical expressions are a little ugly, though. Steven laid the groundwork for this, but I'm going to point you to an earlier answer of mine where I did the calculation. The result comes out to be

$$t_f - t_i = \frac{1}{\sqrt{2G(m_1 + m_2)}}\biggl(\sqrt{r_i r_f(r_i - r_f)} + r_i^{3/2}\cos^{-1}\sqrt{\frac{r_f}{r_i}}\biggr)$$

$r_i$ and $t_i$ are the initial position (height) and time, respectively, and $r_f$ and $t_f$ are the corresponding final values. This equation is a little "backwards" in the sense that instead of expressing position as a function of time, it expresses time as a function of position. You can invert it to express position as a function of time, but you won't find a single nice function for it. You would have to do the inversion numerically, by plugging it into a computer, or by computing a power series or something like that.

-

I think that your paradox results from the first equation assuming constant acceleration, which won't be the case if you calculate gravity using the inverse-square law of Universal Gravitation as opposed to just assuming a constant g.

As for what formula you could use to calculate the position of your object when taking into account Universal Gravitation...let's just say the calculations I tried out weren't too pretty.

Here's the problem: since you can't use the formulas for kinematics that assume constant acceleration anymore, you have to go back to Newton's Second Law and plug in the law of Universal Gravitation directly (NOTE: in the equations below I call the distance between the two bodies r instead of y, and I write that your "little" mass has mass M...no worries though, as it will indeed get cancelled out!): $$-GmM/r^2 = Ma_r$$

This gives you the following second-order nonlinear ordinary differential equation:

$$\ddot{r} + Gm/r^2 = 0$$ Wolfram Alpha found an analytical solution to this, but it is cumbersome to the point of uselessness. So I guess that's the formula you are looking for (minus needing to include the necessary constants)...like I said, though, it isn't too pretty!

-
I do understand part of what you're getting at, but I still have a bit of a problem understanding the part about differential equations - probably because that's somewhat beyond my mathematical knowledge. Could you please explain me how you came up with that equation? – Frxstrem Jan 22 '12 at 5:53
Dear @Frxstrem, differential equations are equations for whole functions $r(t)$ which relate the so-called "derivatives". The equation with $\ddot{r}$ is actually the right way to write your equation for the acceleration. I think that if you don't know at all what differential equations are, this thread on Physics SE isn't the right arena to learn this rather extensive subdiscipline of maths. Steven: I disagree that the analytic solution to the Kepler problem etc. is useless and infinitely contrived; after all, Newton mastered it to explain Kepler's laws, the first big success of his theory. – Luboš Motl Jan 22 '12 at 6:35
Let me say Steven's lesson in different words. The first equation of yours, using $gt^2$, is only OK if the acceleration $g$ is constant, i.e. in the "uniform" gravitational field. For example, on the surface of Earth, the field and acceleration are approximately uniform. The accuracy is so high that we don't need to talk about $g$ being height-dependent in any everyday applications. However, $g$ does depend on $r$ and therefore on $t$, so $y=gt^2/2$ for a fixed $g$ isn't the right description anymore. Instead, it must be replaced by the solution of the differential equation, $g\to\ddot y$. – Luboš Motl Jan 22 '12 at 6:39
@LubošMotl That makes quite a lot of sense, though I guess I will have learn differential equations to understand what all this actually means. – Frxstrem Jan 22 '12 at 6:45
@LubošMotl: I just now saw your reply (regarding the Kepler/Newton example). Thank you very much for the correction: it appears I fell victim to the fallacy of confusing mathematical convenience with usefulness! – Steven D. Oct 18 '13 at 6:35