Deriving separable differential equation when velocity is function of position

calculusintuitionkinematicsordinary differential equationsphysics

In one chapter of my book they introduce velocity and acceleration as functions of position instead of functions of time. They also show a way how to solve these problems using a differential equation, when acceleration is given.

The differential equation was introduced rather briefly and only using Leibniz notation, which I find convenient to use, but sometimes omits details. I tried to derive the differential equation myself, but got stuck.

It follows my work, trying to expand the $dx$ ect. using full function names including parameters, that makes it easier to see for me what is a function of which quantity.


Say that instead of velocity being a function of time, let velocity be a function of position. Then:

$$v=v(x(t))$$

Now we differentiate both sides with respect to time $t$. Since $v$ is a composition of two functions, we use the chain rule:

$$\frac{d v(x(t))}{dt} = \frac{d v(x(t))}{dx(t)} \cdot \frac{dx(t)}{dt}$$

Since it's defined that the first derivative of velocity is acceleration, we can rewrite the left hand side:

$$a(x(t)) = \frac{d v(x(t))}{dx(t)} \cdot \frac{dx(t)}{dt}$$

Also we know that the first derivative of position $x$ is velocity, that is $\frac{dx(t)}{dt} = v(t)$, we can rewrite parts of the right hand side:

$$a(x(t)) = \frac{d v(x(t))}{dx(t)} \cdot v(t)$$

Now here is where I'm stuck. We can separate the differential equation from above like so:

$$a(x(t)) dx(t) = v(t) dv(x(t))$$

Assuming we know the acceleration, we can integrate both sides and find $v$, BUT, isn't it true that we find $v(t)$, that is, velocity as a function of time? But we actually started out saying that velocity is a function of position?

I thought the whole point of solving the differential equation was to find a explicit function $v(x(t))$ (a function of position), assuming we know the acceleration.

Best Answer

I'll continue based on my comments. I assume that the task at hand is that you're given the acceleration as a function of position, and you want to figure out what the velocity is as a function of position?

And I guess you've seen an argument something like the following: \begin{align} a &= \dfrac{dv}{dt} \\ &= \dfrac{dv}{dx} \cdot \dfrac{dx}{dt} \tag{chain rule}\\ &= \dfrac{dv}{dx}v \\ &= \dfrac{d}{dx} \left( \dfrac{v(x)^2}{2}\right) \end{align} Hence, \begin{align} v(x) &= \pm \sqrt{2 \int a(x)\, dx + C} \end{align} where the $\pm$ is to be decided based on the sign of the velocity for the given problem at hand, and the arbitrary constant $C$ is to be determined based on initial conditions


While the above argument is very quick, it completely mixes up the roles played by different functions by hiding it all inside Leibniz's notation and avoiding writing out the compositions involved.

A more "behind the scenes" calculation might proceed along the following lines. We assume that we're given a function $\alpha: x \mapsto \alpha(x)$, which we interpret as the acceleration as a function of position. Now, the key step which is left implicit in the above discussion is that we actually have an invertible function $t\mapsto \gamma(t)$ which we interpret as giving for each time $t$, the position at time $t$. Also, for each position $x$, we interpret $\gamma^{-1}(x)$ as being the time elapsed while travelling a position $x$.

Note that it is crucial that $\gamma$ be invertible for this all to make sense; it is precisely because this function is invertible that it is "acceptable" to be so imprecise as to whether we think of velocity/acceleration as functions of time or position. Let me now make a list of all the functions with everything made explicit:

  • $\gamma$ is position as a function of time (which like I said, means that for each time $t$, $\gamma(t)$ is the position at time $t$)
  • $\gamma^{-1}$ is time as a function of position
  • $v := \gamma'$ is the velocity as a function of time
  • $\nu := v \circ \gamma^{-1}$ is velocity as a function of position
  • $\alpha$ as I defined above is the acceleration as a function of position (which we assume is given)
  • Lastly, $a:= \alpha \circ \gamma$ is the acceleration as a function of time. But also (by definition) we have $a = v' = \gamma''$

So, let's now carry out (almost) the same computation as above. In every equal sign that follows, we have an actual equality of functions (you might have to refer to the above list, and compose with $\gamma$ or $\gamma^{-1}$ where appropriate to get from one equal sign to the next): \begin{align} \alpha &= a \circ \gamma^{-1} \\ &= v' \circ \gamma^{-1} \\ &= (\nu \circ \gamma)' \circ \gamma^{-1} \\ &= [(\nu' \circ \gamma) \cdot \gamma'] \circ \gamma^{-1} \tag{chain rule} \\ &= (\nu' \circ \gamma \circ \gamma^{-1}) \cdot (\gamma' \circ \gamma^{-1}) \\ &=\nu' \cdot (v \circ \gamma^{-1}) \\ &= \nu' \cdot \nu \\ &= \left( \dfrac{\nu^2}{2}\right)' \end{align} Hopefully, now you can try to pattern-match each equality in these two derivations, and see where exactly the abuse of notation is going on (and how to fix it for yourself in future examples).

From here, we would have to integrate both sides, and solve for $\nu$ in terms of an integral of $\alpha$.


One final remark: very often in physics, people would use the notation $x(t)$ instead of $\gamma(t)$ to describe the position as a function of time. Most of the time, I would have absolutely no issue with such notation. So, they are considering the curve as $t\mapsto x(t)$ for what I wrote as $t \mapsto \gamma(t)$. But the trouble in this example is that we also have to consider the inverse function $\gamma^{-1}$, which we like to think of as a function of position. So, we like to use $x$ as the input, and write $\gamma^{-1}(x)$ as the output (the time elapsed for position $x$).

Clearly, there will be an issue if we choose to write $t \mapsto x(t)$ for the name of the curve, because then the inverse function would be $x^{-1}(\cdot)$, which people might refer to as $t(\cdot)$. But now what letter do we use for the arguments? $x$ again? so that we write $t(x)$? Clearly this would be very confusing because we're using the letters $t,x$ to mean both a function and also points in the domain. Thus, in this specific case, I chose to introduce a new letter $\gamma$ to keep the two concepts separate, so that we can free up the letters $t,x$ to simply mean points in the domain (of $\gamma$ and $\gamma^{-1}$ respectively).