non-linear ordinary differential equation

Studying some Newtonian mechanics, I've encountered this differential equation :

$y'+a y^2=b$

where $a,b$ are constants.

how could we solve it ? (I trying to get an algebraic solution)

-
Separation of variables? – enzotib Jan 31 '13 at 11:31

Yes you can. Rewriting the differential equation as $y' = -ay^2 + b$, we see that this is a separable differential equation; that is, it is of the form $y' = f(x,y)$ where $f(x, y) = g(x)h(y)$ (here $g(x) = 1$ and $h(y) = -ay^2+b$). The technique for solving such differential equations in well-known.
Provided $h(y) \neq 0$,
\begin{align*} y'&=g(x)h(y)\\ \frac{y'}{h(y)} &= g(x)\\ \int\frac{y'}{h(y)}dx &= \int g(x)dx\\ \int\frac{1}{h(y)}dy &= \int g(x)dx\qquad \text{(as $dy=y'dx$).} \end{align*}
You end up getting $$\int\frac{y^{\prime}(t)}{b-ay^2(t)}dt = t + C,$$ which you can integrate by means of simple fraction factorization. Be careful, though, with the values $a$ and $b$ can take, as depending on them, the polynomial $b-ay^2$ is going to have real or complex roots.