TITLE: Motion of a body given acceleration as a function of velocity
QUESTION [5 upvotes]: I'm having trouble figuring this out. I'm trying to determine the final time and final velocity for the motion of a vehicle over a given distance along a straight line.
$t$ is time
$v$ is velocity
$a$ is acceleration
$r$ is displacement
$m$ and $c$ are constant
Known:
$t_0$, $v_0$, $r_0$, $\Delta r$
Acceleration of the vehicle is described by:
$a=\frac{f(v)-c}{m}$
I want to derive expressions for:
$\Delta t$, and $v$
$f(v)$ is a function which returns the force which the engine can apply at a given velocity. This is essentially a lookup against a table of values from the vehicle manufacturer. I can perform an accumulation over this if required.
I'm currently estimating a result to this problem by iteratively calculating using small intervals of time.
Any help would be greatly appreciated.

REPLY [2 votes]: I think you can get much farther with explicit methods than the other answers suggest.
First, given $a$ as a function of $v$, we can find $t$ as a function of $v$ by integration:
$$\begin{gather}
\frac{\mathrm dv}{\mathrm dt}=a=\frac{f(v)-c}m.\\
\frac m{f(v)-c}\,\mathrm dv=\mathrm dt.\\
\int_{v_0}^{v_1}\frac{m\,\mathrm dv}{f(v)-c}=\int_{t_0}^{t_1}\mathrm dt=t_1-t_0.
\end{gather}$$
Since $f(v)-c$ is piecewise linear, $\int_{v_0}^{v_1}m\,\mathrm dv/(f(v)-c)$ is piecewise logarithmic and you can compute it explicitly. This gives us $t$ as an increasing function of $v$, which I'll call $\tau$:
$$t_1=\tau(v_1):=t_0+\int_{v_0}^{v_1}\frac{m\,\mathrm dv}{f(v)-c}.$$
Now we get $r$ by integrating again:
$$\begin{gather}
\tau(v)=t.\\
\frac{\mathrm dr}{\mathrm dt}=v=\tau^{-1}(t).\\
r_1-r_0=\int_{t_0}^{t_1}\tau^{-1}(t)\,\mathrm dt.
\end{gather}$$
It appears we have to integrate $\tau^{-1}$, which seems complicated. But not too complicated: let $t_0=\tau(v_0)$ and $t_1=\tau(v_1)$, and then we have
$$\int_{t_0}^{t_1}\tau^{-1}(t)\,\mathrm dt=(t_1v_1-t_0v_0)-\int_{v_0}^{v_1}\tau(v)\,\mathrm dv,$$
and integrating the piecewise logarithmic $\tau$ can also be done explicitly. So now we have $r$ as another explicitly known, increasing function of $v$. Your problem amounts to finding the $v$ for the given $r$, which you will have to do via a numerical procedure, but something really simple like bisection search should work just fine.