[Math] How to calculate the position of an object with respect to time given an acceleration dependent on position

calculusphysics

Here an example of a question that would explain it:

$a$ is acceleration, $v$ is velocity, $r$ is the distance between the initial position of the object and it's current position.

There is an object (represented by the gray square) that is being attracted to a point (represented by the purple circle) by a force. The point doesn't have a mass and cannot be affected by forces (its just theoretical). This force causes an acceleration on the object. In the situation on the left there is a constant acceleration towards the the purple circle on the gray square, say $a = 1$

If $a = 1$, then $v = \int a = at = t$

If $v = t$, then $r = \int v = \frac{1}{2} at^2 = \frac{1}{2} t^2$

So, $r = \frac{1}{2} at^2 = \frac{1}{2} t^2$

Okay, so that's simple. Now, what if there is a situation where acceleration is dependent on $r$. If you take a look at the right side of the diagram, $r_{gp}$ is the distance between the gray and purple objects and $r_i$ is the initial distance between the objects. I forgot to mention that the maroon square is the initial position of the square object. In this situation, $a$ is going to be dependent on $r_{gp}$. They are going to be inversely proportional. So, $a = \frac{1}{r_{gp}}$.

Because $a = \frac{1}{r_{gp}}$ and $r_{gp} = r_i – r$, $a = \frac{1}{r_i – r}$

This is all good, but when you try too figure out an equation for $a$ with respect to $t$, time, it becomes very tricky because $r$, as seen above, is calculated by integrating acceleration with respect to time and not position.

My question is, is it possible to calculate an equation for $a$ with respect to $t$, and if so, what would that equation be?

Thanks!

Here's the diagram

Best Answer

You can try using $a=\frac{dv}{dt}=\frac{dv}{dx}\frac{dx}{dt}=v\frac{dv}{dx}=f(x)\Rightarrow \int vdv=\int f(x)dx$ (I have used chain rule above. Alternatively if you're in a system where only conservative forces are acting, you can write$F=\frac{\partial V}{\partial x}\Rightarrow \frac{1}{m} \frac{\partial V}{\partial x}=f(x)\Rightarrow \int dV=m\int f(x)dx$ (for the part where you can treat partial as normal derivative) where V is potential,m is mass and F is force.