# Solution for a non linear ODE

How do you solve the fallowing ode?

$$u'=u^2$$

What I did was:

$$\frac{du}{dt}=u^2 \rightarrow du=u^2dt\rightarrow\int du=\int u^2dt\rightarrow u=u^2(t+c)\rightarrow u=\frac{1}{t+c}$$

but the correct answer is $$u=\frac{1}{-t+c}$$ Where was I wrong?

-
$u=0$ is also a solution, but it's not an interesting solution. –  Ilya Melamed Feb 21 '12 at 19:19

Here is the correct way to do it:

First, divide by $u^2$ to get

$u'/u^2=1$.

Then integrate both sides to get

$-1/u=t+d$.

Finally, rearranging and letting $c=-d$ yields

$u=\frac{1}{c-t}$

as desired.

-
As Ilya mentioned $u=0$ is also a solution. –  chango Feb 21 '12 at 19:28

Use the method of separation of variables:

$$\frac{du}{dt}=u^2\Longrightarrow u^{-2}du=dt,$$ $$\int u^{-2}du=\int dt\Longrightarrow -u^{-1}=t+c_1\Longrightarrow u=\frac{1}{c_1-t}.$$

Remember that $c_1$ can 'absorb' the negative sign.

-