# Solve the positions of two masses gravitating toward each other

• I

## Main Question or Discussion Point

Consider two stationary masses, each 1 kg, placed a distance ##d_0## apart. Find the position ##x(t)## of each mass in terms of time ##t##. Consider only gravitation without relativistic effects.

Let the distance between the two masses at time ##t## be ##d(t)##. If we set the origin of our coordinate system at the centre of mass of the system, then ##d(t)=2\,x(t)## since the system is symmetrical about the origin.

Gain in kinetic energy = loss in gravitational potential energy
$$\frac{v^2}{2}=\frac{G}{d}-\frac{G}{d_0}$$
Substituting ##d=2x## and ##d_0=2x_0##,
$$v^2=\frac{G}{x}-\frac{G}{x_0}$$, where ##x_0=x(0)## is the initial ##x##.

$$\int\frac{1}{\sqrt{\frac{G}{x}-\frac{G}{x_0}}}dx=\int dt$$

Q1. We expect ##x<x_0## for ##t>0##. But when ##x<x_0##, LHS is complex while RHS is real. What's wrong?

Integration on LHS: http://www.wolframalpha.com/input/?i=integrate+(G/x-G/u)^(-1/2)dx (where ##u## represents ##x_0##)

Q2. When I solve the question using forces, I get a different expression for ##v^2## (shown below). What's wrong?

$$\ddot{x}=-\frac{G}{d^2}$$
Substituting ##d=2x##,
$$\ddot{x}=-\frac{G}{4x^2}$$
$$\frac{dv}{dt}=\frac{dx}{dt}\frac{dv}{dx}=-\frac{G}{4x^2}$$
$$\int vdv=\int-\frac{G}{4x^2}dx$$
$$\frac{v^2}{2}=\frac{G}{4x}-\frac{G}{4x_0}$$
$$v^2=\frac{G}{2x}-\frac{G}{2x_0}$$, which differs from the above equation by a factor of ##\frac{1}{2}##.

Last edited:

Related Other Physics Topics News on Phys.org
Gain in kinetic energy = loss in gravitational potential energy
$$\frac{v^2}{2}=\frac{G}{d}-\frac{G}{d_0}$$
Substituting ##d=2x## and ##d_0=2x_0##,
$$v^2=\frac{G}{x}-\frac{G}{x_0}$$, where ##x_0=x(0)## is the initial ##x##.

$$\int\frac{1}{\sqrt{\frac{G}{x}-\frac{G}{x_0}}}dx=\int dt$$
Your first equation is not dimensionally consistent, it looks like you're missing a factor of ##m##.
We expect x<x0x<x0xt>0t>0t>0. But when x<x0x<x0x LHS is complex while RHS is real
Mathematica is treating this integral as a contour integral in the complex plane. This is why you are seeing i's everywhere. For ##x<x_{0}## however, the integral should be real. Try and solve the integral by hand instead of relying on wolfram.

Q2. When I solve the question using forces, I get a different expression for ##v^2## (shown below). What's wrong?

$$\ddot{x}=-\frac{G}{d^2}$$
Substituting ##d=2x##.
$$\ddot{x}=-\frac{G}{4x^2}$$
$$\frac{dv}{dt}=\frac{dx}{dt}\frac{dv}{dx}=-\frac{G}{4x^2}$$
$$\int v\frac{dx}{dv}=\int-\frac{G}{4x^2}dx$$
$$\frac{v^2}{2}=\frac{G}{4x}-\frac{G}{4x_0}$$
$$v^2=\frac{G}{2x}-\frac{G}{2x_0}$$, which differs from the above equation by a factor of 2.
Use ##\ddot{d}## instead of ##\ddot{x}## in the first line. Also, I'm not sure if the integral is correct: one of the derivatives is inverted.

Your first equation is not dimensionally consistent, it looks like you're missing a factor of ##m##.
I let ##m=1## kg. If you like, you could take it that ##m## is absorbed into ##G## such that ##G## now has a dimension of its usual dimension ##\times## the dimension of ##m##.

Mathematica is treating this integral as a contour integral in the complex plane. This is why you are seeing i's everywhere. For ##x<x_{0}## however, the integral should be real. Try and solve the integral by hand instead of relying on wolfram.
I tried it. It is still complex.

I tried it. It is still complex.
How? The integrand is real for ##x<x_{0}##.

Use ##\ddot{d}## instead of ##\ddot{x}## in the first line. Also, I'm not sure if the integral is correct: one of the derivatives is inverted.
I think ##\ddot{x}## is correct, because I am using ##ma=F##, and ##a=\ddot{x}## and ##F## depends on ##d##, the distance between the two masses.

Oh yes, there was a typo in the third last line. It has been corrected. But the answer still differs by a factor of ##\frac{1}{2}##.

Last edited:
How? The integrand is real for ##x<x_{0}##.
The thing inside the log is complex. After applying log to it, we get a complex number with a non-zero real part. This real part when multiplied by the ##i## in front gives us a complex number.

I think ¨xx¨\ddot{x} is correct, because I am using ma=Fma=Fma=F, and a=¨xa=x¨a=\ddot{x} and FFF depends on ddd, the distance between the two masses.
##x## and ##d## are in different coordinate frames, I would be cautious of mixing them.
The thing inside the log is complex. After applying log to it, we get a complex number with a non-zero real part. This real part when multiplied by the ##i## in front gives us a complex number.
I mean how can you integrate a real function and end up with a complex value? If the integrand is real over the region of integration, then the integral must also be real.

##x## and ##d## are in different coordinate frames, I would be cautious of mixing them.
I thought ##x## and ##d## are in the same coordinate frame. No?

I mean how can you integrate a real function and end up with a complex value? If the integrand is real over the region of integration, then the integral must also be real.
I see. But it doesn't look like it can be integrated by hand easily. Can the math involved be done by a second-year undergraduate?

And how could Wolfram Alpha end up with a wrong answer? I thought its answer would still be correct as long as we use the correct domain of ##x##?

I thought ##x## and ##d## are in the same coordinate frame. No?

I see. But it doesn't look like it can be integrated by hand easily. Can the math involved be done by a second-year undergraduate?

And how could Wolfram Alpha end up with a wrong answer? I thought its answer would still be correct as long as we use the correct domain of ##x##?
d is meauserd with respect to the moving object, x is measured with respect to the center of mass.

You can do a few simple algebraic manipulations (like turn the integrand into the square root of a single fraction) to match an integral in an integral table.

It's not that mathematica is wrong but it is not giving the solution that you need or is useful. Mathematica is useful, but as you've just discovered, you shouldn't always trust it.

d is meauserd with respect to the moving object, x is measured with respect to the center of mass.
x is measured in the reference frame where the center of mass of the system (CMS) is stationary and in the coordinate system when the CMS is the origin, and x is measured from the origin to one of the masses.

d is measured in the same reference frame and coordinate system, but d is measured from one mass to the other mass, and by symmetry, ##d=2x##.

So I don't understand why you say x and d are measured in different reference frames or coordinate systems. And in both measurements of x and d, the object(s) is moving.

It's not that mathematica is wrong but it is not giving the solution that you need or is useful. Mathematica is useful, but as you've just discovered, you shouldn't always trust it.
But Mathematica's answer seems wrong because when I substitute ##x<x_0##, it gives me a complex number when it should be real.

d is measured in the same reference frame and coordinate system,
No because the origin of d's coordinate system moves with respect to the center of mass. The origin of x's coordinate system does not.
But Mathematica's answer seems wrong because when I substitute x<x0x<x0x
Right, so you need to just do it by hand.

No because the origin of d's coordinate system moves with respect to the center of mass. The origin of x's coordinate system does not.
I suppose you are taking the origin of ##d##'s coordinate system to be at one of the moving masses, right? But there is no need to. I am taking the origin of d's coordinate system to be at the centre of mass of the system (CMS) and always so at all times. The CMS never moves, but the left end and right end of ##d## are always moving (after the masses are released).

I've found the mistake! This equation is wrong.

Gain in kinetic energy = loss in gravitational potential energy
$$\frac{v^2}{2}=\frac{G}{d}-\frac{G}{d_0}$$