# Formula for gravity path of two objects

1. Oct 31, 2013

### zrek

Please help me to find a formula to determine the actual position of two objects, depending on time.

Imagine two identical (mass, size, etc) object, no other effect on them only the gravity of each other (Newton). Let's imagine these objects are non corporal, so they will not collide.

The begining state: speed, v=0, distance between them: 2*a;

If there would be constant acceleration, we could use the f(t)=x=v0*t+(a/2)*t^2 to determine their actual position depending on time.

But our case is different, the acceleration is changing.
F=G*(m*m)/(d*d)

Is there a simple formula now to determine the positions of the objects?

I tried to thinking this way:

Unlike by the constant acceleration, now we will get a periodic path.
The two objects are the special case of a circle/elliptic path (the objects are circulating around each other)
The formula for the ellipse:
x=a*cos(q)
y=b*sin(q)

In our case b=0.

But now I'm stucked, because I think that the q is not representing the time. (Am I right?)

2. Oct 31, 2013

### mathman

q tells you how far apart they are. q = 0,π,2π are max. q = π/2, 3π/2 are min (0 separation). q is a function of time, depending on physical parameters (initial condition, acceleration).

3. Nov 1, 2013

### K^2

You can't really solve this as a 1d problem, because the gravitational attraction diverges at zero separation.

As a 2D problem, you end up with both objects moving along elliptical paths whose foci are at the baricenter of the system. If you look up orbital motion on Wikipedia, it will give you some equations to work with.

4. Nov 1, 2013

### zrek

Yes, I agree that the q is some kind of an "angle" and is a function of time, but what is the exact formula of the dependency? I'm sure that all the necessary data is given. For example the actual acceleration is also depends on the actual position of the path. I have a feeling that there should be a simple solution.

5. Nov 1, 2013

### voko

If $z$ is the normalized distance from the barycenter to a mass (normalized so that $z = 1$ corresponds to the initial position), the equation of motion is given by $$\arccos \sqrt z + \frac 1 2 \sqrt {z - z^2} = pt$$ where $p$ is a parameter that includes the masses, the initial distance, etc.

Last edited: Nov 1, 2013
6. Nov 1, 2013

### zrek

Isn't it help if we say that b approaches 0?
In our case if we taking "time steps" then we can easily jump over the problematic "too close" areas by saying that the two objects just "exchanged", "mirrored". I mean that the problematic forces and/or values somehow neutralizes each other, so finally if I'd like to find out the position (which is never infinite or problametic anyway) there should be a simple formula. (maybe I'm wrong)

Thanks, I'll try to find there some equations that fit to this case.

7. Nov 1, 2013

### zrek

Looks great!
So if I reverse this formula, I can get the Z as function of time (t).
I'll check it thank you!

8. Nov 1, 2013

### zrek

Sorry, I made a mistake in the formula. This is the correct formula: $$\arccos \sqrt z + \sqrt {z - z^2} = pt$$