# Thread: Gravitational attraction of particles

1. ## Gravitational attraction of particles

We have two particles m1 and m2, at positions x1 and x2. I am trying to come up with the equation of motion of particle m1 due to the gravitational atraction of particle m2, that is an equation that will give x1 as a function of time. (No other force acts on the particles.)

So we have F=m1*a and F=Gm1m2/(x2-x1)^2, from which we get a=-Gm2/(x2-x1)^2. Since the distance between the particles changes, the acceleration also changes, and so this must be solved analytically.

d^2x1/dt2 = -Gm2/(x2-x1)^2

Now, I know I have to integrate this once with respect to time to get velocity, and integrate velocity with respect to time to find displacement, but my calculus is quite rusty and I am not sure how to do this.

Any help would be appreciated.

2. Originally Posted by Gebar
We have two particles m1 and m2, at positions x1 and x2. I am trying to come up with the equation of motion of particle m1 due to the gravitational atraction of particle m2, that is an equation that will give x1 as a function of time. (No other force acts on the particles.)

So we have F=m1*a and F=Gm1m2/(x2-x1)^2, from which we get a=-Gm2/(x2-x1)^2. Since the distance between the particles changes, the acceleration also changes, and so this must be solved analytically.

d^2x1/dt2 = -Gm2/(x2-x1)^2

Now, I know I have to integrate this once with respect to time to get velocity, and integrate velocity with respect to time to find displacement, but my calculus is quite rusty and I am not sure how to do this.

Any help would be appreciated.
Actually we will have two equations. One for each particle.

$\displaystyle \frac{d^2x_1}{dt^2} = -\frac{Gm_2}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2x_2}{dt^2} = \frac{Gm_1}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2(x_1 - x_2)}{dt^2} = -\frac{G(m_1 + m_2)}{(x_2 - x_1)^2}$

Now sub $\displaystyle y = x_1 - x_2$,

$\displaystyle \frac{d^2y}{dt^2} = -\frac{G(m_1 + m_2)}{y^2}$

Now we have removed the coupling between the two equations. But I think solving this is still hard...

Then I will follow what Mr.F told you below:

$\displaystyle w = \frac{dy}{dt} \Rightarrow \frac{dw}{dt} = \frac{dw}{dy}\frac{dy}{dt} = w\frac{dw}{dy} = \dfrac{d\left(\frac{w^2}2\right)}{dy}$

So in our D.E:

$\displaystyle \frac{d^2y}{dt^2} = \dfrac{d\left(\frac{w^2}2\right)}{dy} = -\frac{G(m_1 + m_2)}{y^2}$

Integrating:

$\displaystyle \frac{w^2}2 = \frac{G(m_1 + m_2)}{y} + C$

As Mr.F pointed out, to eliminate C we need boundary conditions.

So continuing the integration:

$\displaystyle w = \pm \sqrt{\frac{2G(m_1 + m_2)}{y} + C}$

Choosing the positive solution(its actually for one of the particles. For the other, it is negative, since they are moving towards each other)

$\displaystyle \frac{dy}{dt} = \sqrt{\frac{2G(m_1 + m_2)}{y} + C}$

$\displaystyle \int \frac{dy}{\sqrt{\frac{2G(m_1 + m_2)}{y} + C}} = t + C'$

The above integral can be solved with a trigonometric substitution: $\displaystyle y = -\frac{2G(m_1 + m_2)}{C \sin^2 t}$ to get a very ugly answer

P.S: Thank you Mr.F. I did not see that trick coming

3. Originally Posted by Isomorphism
Actually we will have two equations. One for each particle.

$\displaystyle \frac{d^2x_1}{dt^2} = -\frac{Gm_2}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2x_2}{dt^2} = {\color{red}+} \frac{Gm_1}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2(x_1 - x_2)}{dt^2} = {\color{red}-} \frac{G(m_1 {\color{red}+} m_2)}{(x_2 - x_1)^2}$

Now sub $\displaystyle y = x_1 - x_2$,

$\displaystyle \frac{d^2y}{dt^2} = {\color{red}-} \frac{G(m_1 {\color{red}+} m_2)}{y^2}$

Now we have removed the coupling between the two equations. But I think solving this is still hard...
I think there needs to be a small erratum ...... Since each particle moves along the same line but in the opposite direction to the other, their accelerations have to be the negative of each other. So I've made some edits (in red). The opposite choice can also be made without loss of generality.

The DE has the form $\displaystyle \frac{d^2y}{dt^2} = f(y)$.

Make the substitution $\displaystyle w = \frac{dy}{dt}$ and the DE becomes $\displaystyle \frac{d}{dy} \left[\frac{w^2}{2}\right] = f(y)$.

This DE is readily solvable for $\displaystyle w = \frac{dy}{dt}$ and the solution for y follows. Boundary conditions will be required in order to remove arbitrary constants.

4. Originally Posted by Isomorphism
Actually we will have two equations. One for each particle.

$\displaystyle \frac{d^2x_1}{dt^2} = -\frac{Gm_2}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2x_2}{dt^2} = \frac{Gm_1}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2(x_1 - x_2)}{dt^2} = -\frac{G(m_1 + m_2)}{(x_2 - x_1)^2}$

Now sub $\displaystyle y = x_1 - x_2$,

$\displaystyle \frac{d^2y}{dt^2} = -\frac{G(m_1 + m_2)}{y^2}$

Now we have removed the coupling between the two equations. But I think solving this is still hard...

Then I will follow what Mr.F told you below:

$\displaystyle w = \frac{dy}{dt} \Rightarrow \frac{dw}{dt} = \frac{dw}{dy}\frac{dy}{dt} = w\frac{dw}{dy} = \dfrac{d\left(\frac{w^2}2\right)}{dy}$

So in our D.E:

$\displaystyle \frac{d^2y}{dt^2} = \dfrac{d\left(\frac{w^2}2\right)}{dy} = -\frac{G(m_1 + m_2)}{y^2}$

Integrating:

$\displaystyle \frac{w^2}2 = {\color{red}+} \frac{G(m_1 + m_2)}{y} + C$ Mr F edit in red. What follows might need a slight change.

As Mr.F pointed out, to eliminate C we need boundary conditions.

So continuing the integration:

$\displaystyle w = \pm \sqrt{-\frac{2G(m_1 + m_2)}{y} + C}$

Choosing the positive solution(its actually for one of the particles. For the other, it is negative, since they are moving towards each other)

$\displaystyle \frac{dy}{dt} = \sqrt{-\frac{2G(m_1 + m_2)}{y} + C}$

$\displaystyle \int \frac{dy}{\sqrt{-\frac{2G(m_1 + m_2)}{y} + C}} = t + C'$

The above integral can be solved with a trigonometric substitution: $\displaystyle y = \frac{2G(m_1 + m_2)}{C \sin^2 t}$ to get a very ugly answer

P.S: Thank you Mr.F. I did not see that trick coming
You're welcome. It's a handy one I often borrow from kinematics problems.

I think there's a small mistake that might have consequences but I have to rush off now ......

Originally Posted by mr fantastic
I think there's a small mistake that might have consequences but I have to rush off now ......
Any idea what the mistake may be?

6. Originally Posted by Gebar

Quote:
Originally Posted by mr fantastic
I think there's a small mistake that might have consequences but I have to rush off now ......

Any idea what the mistake may be?
The mistake is flagged in red in post #4 (the red edit). Making the appropriate corrections to the working that follows should be straightforward.

7. All right, I understand, thanks.

I had discussed this with someone else also, who came up with the following:

If we consider only the motion of m1 with respect to m2:

v = Int[(Gm2/(x1-x2)^2)dt = [Gm2/(x1-x2)^2]*t - v0

If we define the boundary-condition, v0 = 0, then

v = [Gm2/(x1-x2)^2]*t

d = Int[Gm2/(x1-x2)^2]*tdt = [Gm2/(x1-x2)^2]*(t2)/2 - d0

If we define the boundary-condition, d0 = 0, then

d = [Gm2/(x1-x2)^2]*(t^2)/2
Now, it seems to me that this solution gives the same answer that you would get if you solved the problem algebraically, a*(t^2)/2, which means perhaps that it assumes a constant acceleration, while in fact acceleration is changing. Is this correct? Or what is the mistake here?

8. Originally Posted by Gebar
We have two particles m1 and m2, at positions x1 and x2. I am trying to come up with the equation of motion of particle m1 due to the gravitational atraction of particle m2, that is an equation that will give x1 as a function of time. (No other force acts on the particles.)

So we have F=m1*a and F=Gm1m2/(x2-x1)^2, from which we get a=-Gm2/(x2-x1)^2. Since the distance between the particles changes, the acceleration also changes, and so this must be solved analytically.

d^2x1/dt2 = -Gm2/(x2-x1)^2

Now, I know I have to integrate this once with respect to time to get velocity, and integrate velocity with respect to time to find displacement, but my calculus is quite rusty and I am not sure how to do this.

Any help would be appreciated.
Is this a system with zero angular momentum (about the barycentre)?

(The other posters seem to be treating it as such)

If there in some initial angular momentum you have a rather different problem as point masses will then never collide, while if there is zero angular momentum the particle will try to pass through a point of zero seperation.

If you have angular momentum I would suggest you use barycentric polars for this (2-D if the initial velocities are coplanar 3-D otherwise).

RonL

9. Originally Posted by CaptainBlack
Is this a system with zero angular momentum (about the barycentre)?

(The other posters seem to be treating it as such)

If there in some initial angular momentum you have a rather different problem as point masses will then never collide, while if there is zero angular momentum the particle will try to pass through a point of zero seperation.

If you have angular momentum I would suggest you use barycentric polars for this (2-D if the initial velocities are coplanar 3-D otherwise).

RonL
Yes, the system has zero angular momentum.