# Position as a function of time through a varying gravitational field

1. Jul 22, 2010

### JJfortherear

I've been trying to figure this out for a while, since my first semester of physics ended. It's not a homework problem, just something I've been doing for fun. I've spoken with a few people about it and they all say it's just a diff. equation but they can't remember how to solve it, and, unfortunately, I haven't taken diff. equations yet. So the furthest I get is:

x=1/2at^2
a=gmm/(r-x)^2

so plug in a to the first eq. The r-x is the initial radius minus the distance x traveled due to acceleration.

I'm sure this case has been extensively closed, but I just stumbled upon this website and I could find no solution to this problem anywhere else (could just ask one of my soon to be physics professors, but I'd rather know now). Thanks.

Last edited: Jul 22, 2010
2. Jul 23, 2010

### JJfortherear

just wanted to clarify, one object is considered stationary (mass of something like a planet, but considered as a point, so x approaches r and the acceleration becomes infinite). I'm just looking for how to solve the two equations for x (and i realize that should be gm not gmm for acceleration)

3. Jul 23, 2010

### K^2

Your first equation is wrong. It's only valid for constant a, which is not the case. It should read d²x/dt² = a. And your second equation is greatly simplified if you shift your x variable to be relative to origin. That way, the equation you are trying to solve is this.

d²x/dt² = -g/x²

I found a solution, which is x = bt^(2/3), but it is obviously the parabolic escape solution, and you need an elliptical one. I'll keep thinking.

4. Jul 23, 2010

### gabbagabbahey

There's a clever trick to solving this type of ODE, just make use of the chain rule by noticing

$$\frac{d^2 x}{dt^2}=\frac{d}{dt}\left(\frac{dx}{dt}\right)=\frac{dx}{dt}\frac{d}{dx}\left(\frac{dx}{dt}\right)=\frac{1}{2}\frac{d}{dx}\left(\frac{dx}{dt}\right)^2$$

This gives you a very simple separable ODE for $\left(\frac{dx}{dt}\right)^2$ as a function of $x$.

$$\frac{d}{dx}\left(\frac{dx}{dt}\right)^2=-\frac{2g}{x^2}$$

5. Jul 23, 2010

### K^2

Huh. That is nifty.

v² = 2g/x+c

Not that much improvement, though... Separable, but the integral for it is NOT pretty.

Edit: I think it might be easier to start with Kepler's laws and take the limit of angular momentum going to zero.

Last edited: Jul 23, 2010
6. Jul 23, 2010

### gabbagabbahey

The integral is readily computed and can also be looked up in a table of integrals.

7. Jul 23, 2010

### JJfortherear

is it really possible to simplify the distance by moving the origin? I've thought about it and any time I try it seems to change the setup.