Solving polynomial differential equation I have $a(v)$ where $a$ is acceleration and $v$ is velocity. $a$ can be described as a polynomial of degree 3:
$$a(v) = \sum\limits_{i=0}^3 p_i v^i = \sum\limits_{i=0}^3 p_i \left(\frac{dd(t)}{dt}\right)^i,$$
where $d(t)$ is distance with respect to time. 
I want to solve (or approximate) this equation for $d(t)$, but it's been a few years since I graduated, and I seem to have forgotten most of my math skills :)
 A: Since the acceleration is the derivative of velocity, you can write
$$ \frac{\mathrm{d} v}{\mathrm{d} t} = p_0 + p_1 v + p_2 v^2 + p_3 v^3 $$
separating the variables we get the integral form
$$ \int \frac{\mathrm{d}v}{p_0 + p_1 v + p_2 v^2 + p_3 v^3} = \int \mathrm{d}t = t + c$$
Which we can integrate using partial fractions (also see this page). To summarise the method:
Using the fundamental theorem of algebra we can factor the polynomial
$$ p_0 + p_1 v + p_2 v^2 + p_3 v^3 = p_3 (v + \alpha_1)(v + \alpha_2)(v + \alpha_3) $$
where the $\alpha$s are the roots of the polynomial (assume they are distinct for now; repeated roots will require some additional work). Then we look for $\beta_1,\beta_2,\beta_3$ such that
$$ \sum \frac{\beta_i}{v+\alpha_i} = \frac{1}{(v+\alpha_1)(v+\alpha_2)(v+\alpha_3)} $$
Expanding the sum you see that this requires
$$\begin{align} \beta_1 + \beta_2 + \beta_3 &= 0 \\
 \beta_1 (\alpha_2 + \alpha_3) + \beta_2(\alpha_1+\alpha_3) + \beta_3(\alpha_1 + \alpha_2) &= 0 \\
\beta_1 \alpha_2\alpha_3 + \beta_2\alpha_1\alpha_3 + \beta_3 \alpha_1\alpha_2 &= 1 \end{align}$$
which is a linear system that can be solved. 
This way we reduce our integral equation to 
$$ t + c = \frac{1}{p_3}\int \frac{\beta_1}{v + \alpha_1} + \frac{\beta_2}{v+\alpha_2} + \frac{\beta_3}{v+\alpha_3} \mathrm{d}v $$
where the $\alpha$ and $\beta$ coefficients are determined from the polynomial you started with. This gives us the implicit solution
$$ p_3t + C = \beta_1 \ln (v+\alpha_1) + \beta_2 \ln(v+\alpha_2) + \beta_3 \ln(v+\alpha_3) $$
or
$$ e^{p_3 t + C} = (v+\alpha_1)^{\beta_1}(v+\alpha_2)^{\beta_2}(v+\alpha_3)^{\beta_3} \tag{*}$$
However, this is generally where one gets stuck. To obtain $d$ from $v$ you have to integrate $v$ one more time. But now equation (*) may not have nice analytic representation for $v$, nevermind a simple integral for you to obtain $d$. In those cases the best you can do is probably ask Mathematica. 
(Sometime you may get lucky. For example, if your polynomial is a perfect cube, then you have 
$$ \int \frac{\mathrm{d}v}{p(v+q)^3} = -\frac{1}{2p(v+q)^2} + C $$
then you get that
$$ v + q = \sqrt{2p t + C} $$
which one can easily integrate to get $d = \int v~\mathrm{d}t$. But those depends on special form of the coefficients $p_i$ which you have not specified.)
