Second order non-linear ode - am I on the right path? I've found this to be difficult to solve:
$$ \frac{d^2 x }{dt^2} + (a x + b) \frac{dx}{dt} = 0 $$
I've done some reading, and I guess I could write this as:
$$ \frac{d^2 x }{dt^2} +  b \frac{dx}{dt} + ax \frac{dx}{dt} = 0 $$
If I then treat $v(x) = \frac{dx}{dt}$ as an independent variable, I would get:
$$ \frac{dv}{dt} + bv +  axv = 0 $$
This is sort of like a nonhomogenous equation. If I take the homogenous solution, I would get:
$$ v(t) = A e^{-bt}$$
I think.... I'm not sure where to go from here though. 
 A: We know the solution you have is wrong by putting it back in
$$
v' = -bv
$$
so we have in your original equation
$$
-bv + bv + axv = axv = 0
$$
this is in general not true.
Your issue was not converting the $x$ in terms of $v$. 
To give a hint.
$$
x'' = \frac{dx}{dt}\frac{dv}{dx}
$$
this leads to
$$
\frac{dx}{dt}\frac{dv}{dx} + b\frac{dx}{dt} + ax\frac{dx}{dt} = \left(\frac{dv}{dx} + b + ax\right)\frac{dx}{dt} = 0
$$
In general $x' \neq 0$, so we can try to solve
$$
\frac{dv}{dx} + b + ax = 0
$$
This is a first order ode with the correct variables to solve nicely.
A: The substitution $p=\frac{dx}{dt}$, so $\frac{d^2x}{dt^2}=p \frac{dp}{dx}$ and this gives
\begin{eqnarray*}
dp = -(ax+b) dx \\
\frac{dx}{dt} = -ax^2/2-bx+c.
\end{eqnarray*}
To integrate further depends upon the discriminant of the quadratic in $x$.
A: $$\frac{d^2 x }{dt^2} + (a x + b) \frac{dx}{dt} = 0$$
$$x'' + (a x + b) x' = 0$$
$$x'' + a xx' + bx' = 0$$
$$x'' + \frac a 2 (x^2)' + bx' = 0$$
Integrate
$$x'+ \frac a 2 x^2 + bx = K$$
$$(x+\frac ba)'+ \frac a 2 (x^2 + \frac {2b}ax+\frac {b^2}{a^2}) = C$$
Substitute $z=x+\frac ba$
$$z'+ \frac a 2 z^2 = C$$
This last equation is separable
