# Finding x(t) of a particle subjected to gravitational force

1. Jul 11, 2014

### RaamGeneral

Hello everybody. I registered today in this forum and this is my first post.
I'm Italian, therefore sorry for my ugly english.

Studying physics (for my personal curiosity) I proposed myself two problems I couldn't solve.
One of these, is: at the point x=0 (of a one dimensional space) there is a fixed object of mass M and at distance x=x0 there is a second object.
I'd want to find the x(t) function for the second object subjected to the gravitational force of the first.

M - - - - - <--- m
x=0 . . . . . . . . x=x0

I obtained a(x) = - GM/x2, but from this I'm not able to get x(t).

Some advice to solve this problem?

2. Jul 11, 2014

### Staff: Mentor

How much calculus do you know? You can integrate acceleration as a function of time to get velocity as a function of time, and then integrate velocity to get position as a function of time. The two integrations will introduce two arbitrary constants, whose value you will determine from the initial distance between the two objects and the initial speed of the two objects.

This problem is appreciably easier if the mass of the first object is much larger than the second; then you can ignore its motion, calculate as if the position of the first object is fixed. I suggest that you solve that problem before you take on the more complicated general case.

3. Jul 11, 2014

### ModusPwnd

To do this requires a bit of calculus. Do you know how to integrate and differentiate?

If you don't know calculus this will be beyond your ability to do and understand. The reason you need calculus here is because the position as a function of time is non-linear. That is, in the first second it will move a distance but in the second second it will move a different distance. In fact, at every instant it is moving at a different rate. To deal with this continuous change you need calculus.

4. Jul 11, 2014

### RaamGeneral

I know I can integrate a(t) to get v(t), but I have here a(x). There is not variable t.
In some way I need to build the x(t) function.

I don't know what is the acceleration at time t.
Acceleration here changes constantly time after time. How can I get a(t) from a(x)?
What mathematical instrument I have to use for this purpose?

5. Jul 11, 2014

### ModusPwnd

Know that the "ma" from newtons law is also "dp/dt" where p is the momentum, mv.

6. Jul 11, 2014

### Delta²

you need to solve the differential equation $$\dfrac{d^2x}{dt^2}=-\frac{GM}{x^2}$$

7. Jul 11, 2014

### Staff: Mentor

You're right, I misread the problem - my mistake.
ModusPwnd and Delta got there ahead of me.

8. Jul 11, 2014

### RaamGeneral

But d2x/dt2 = a(t), and I have got a(x), or.. a(x(t)) or x''(x(t)).
Am I wrong?

I think a(t) has to be something like this:

a(t) = -GM/(x0-f(t))2

f(0) = 0 and in a certain time f(?) = x0; this means that the particle 2 arrived to "touch" the particle 1 at point x=0.

Last edited: Jul 11, 2014
9. Jul 11, 2014

### RaamGeneral

Ok, I tried this, but I don't know if it is corret to do; I used the conservation of mechanical energy principle.

K0 + U0 = Kt + Ut

m a(x0) x0 = 1/2 m x'(t)2 + m x''(t)x(t)

1/2 x'(t)2 + x''(t)x(t) = -GM/x0

I don't think I can solve this equation, but would it be correct this?

10. Jul 11, 2014

### Delta²

Well that equation from conservation of energy seems harder to me than x''(t)=-GM/x(t)².

To solve the latter we can put v(t)=dx/dt. Then we notice that x''(t)=dv/dt=(dv/dx)*(dx/dt) =(dv/dx)*v. So the differential equation can be written as
vdv/dx=-GM/x² or vdv=-GMdx/x². From that by integration by parts we can find v as function of x.

Then we can find dv/dx=A(x) and then x''(t)=(dv/dx)*(dx/dt)=A(x)*dx/dt=-GM/x² or equivalently

A(x)x²dx=-GMdt which we can integrate by parts to find x(t).

Last edited: Jul 11, 2014
11. Jul 12, 2014

### RaamGeneral

Delta, you were absolutely right, sorry for my insistence (and my ignorance).
F(x(t)) = -GMm/x(t)2 = mx''(t)

I can't understand why I fell in such stupid thing.

Let's forget about this (also because this ODE is impossible to solve and explicit x(t)) and concentrate ourselves in another very easy problem.

A mass m is attacched on a spring in an horizontal frictionless plane

|////////////////-m
. . . . .x=0 . . . .x=x0

In the same way as before, we get:

F(t) = -kx(t) = mx''(t)

The solution should be:

x(t) = v0 cos(t √(k/m) ) + x0 sin(t √(k/m) )

But, if I'd like to find this solution by mechanical energy consideration, how should I set up the equation?

I would do in such way, but it doesn't work:

E0 = K0 + U0 = Kt + Ut = Et

1/2 m v02 - 1/2 k x02 = 1/2 m x'(t)2 - 1/2 k x(t)2

Thank you.

12. Jul 12, 2014

### HallsofIvy

Staff Emeritus
There is a fairly standard method, called "quadrature" for problems like this.
$$a= \frac{dv}{dt}= \frac{dv}{dx}\frac{dx}{dt}$$
(the chain rule)
$$= v\frac{dv}{dx}$$

so $$a= \frac{dv}{dt}= v\frac{dv}{dx}= \frac{-GM}{x^2}$$
which can be written $$vdv= \frac{-GM}{x^2}dx$$
Integrating, $$\frac{1}{2}v^2=\frac{GM}{x}+ C$$
or $$\frac{1}{2}v^2- \frac{GM}{x}= C$$

You might recognize that as "conservation of energy"- the left side is the kinetic energy plus the gravitational potential energy.

13. Jul 12, 2014

### RaamGeneral

That seems cool, thank you.

14. Jul 15, 2014

### Cosmic Al

time-dependent position of object under sun's gravitation

In freshman physics, Newton's 2nd law & gravitational law are solved for the velocity as a function of position (distance of a non-orbital object from the sun) where it's given that the sun is stationary due to its enormous mass: V(r)=SQRT(Vo^2+2GM(1/r-1/ro) where Vo & ro are initial velocity & position. V(r)=dr/dt=SQRT(2GM/r + (Vo^2-2GM/ro). If B=Vo^2/(2GM)-1/ro & γ=SQRT(2GM) the equation becomes ∫dr/SQRT((1/r)+B)=γ∫dt with appropriate limits on integrals. You will never find a solution to the LHS integral in integral tables. This must be why the freshman physics books don't go past the first integration. But, like the orbital case, the substitution x=1/r yields -∫dx/(x^2*SQRT(x+B)) which can be found in tables. In terms of x, this integral is: SQRT(B+x)/Bx + 1/(2*B^1.5)*Ln((SQRT(B+x)-SQRT(B))/(SQRT(B+x)+SQRT(B))). Substituting r=1/x gives the integral in terms of r. The integrated equation can be used to calculate t for each given r once the initial conditions (B & γ) are specified. I've done it on Excel for some nice B's and the behavior of the object is good (starts slow and speeds up as it gets nearer the sun). However, due to the SQRT(B) terms there are lots of initial conditions (e.g. Vo=0) where the answer (time t for a position r) is not a real number. I've gone over every step more than 10 times and I'm quite sure I've found & corrected all the errors. So this initial value (B) problem puzzles me. Are there any constructive comments? I don't know any physics people in my town (Salt Lake City) to review this with, so I thought I'd join the Forum.