How is this ODE solution correct? I just want to solve $\frac{dy}{dt} = 2y^2.$ Should be easy right? The answer should be $y=\frac{-1}{2t_0+2t}.$ Somehow this doesn't work when I'm trying to solve my problem, somehow what works is $y=\frac{y_0}{1-2y_0t}$ and I have no idea why. The only possible explanation can be traced back to this differential equation, which as far as I know I did correctly, yet somehow it's not correct. Is there some magical way I can turn what I have into the second form?
 A: (this is the answer to the original question:)
With $y(t_0)=y_0$, separation of variables yields $$\int_{y_0}^y dy' = \int_{t_0}^t 2 t'^2 dt'$$ and thus
$$y(t)=y_0+ \frac{2}{3}(t^3-t_0^3)$$.
A: $$\int \frac{dy}{y^2} = \int 2 \, dt$$
$$-\frac{1}{y} = 2t + \textrm{const.}$$
$$y=\frac{1}{\textrm{const.}-2t}$$
If $y(0)=y_0$, then $\textrm{const.}=\frac{1}{y_0}$ and
$$y= \frac{1}{\frac{1}{y_0}-2t}=\frac{y_0}{1-2 y_0 t}$$
A: Both of your answers solve the differential equation, it's just a  matter of checking initial values. In general the solutions look like $$
y(t) = \frac{-1}{c + 2t}
$$
The first answer you gave is the solution if you have initial value $y(0) = \frac1{t_0}$ and the second if $y(0) = y_0$. If for example you want to have $y(t_0) = y_0$, then you could take the equation $$
y_0 = \frac{-1}{c + 2t_0}
$$
and solve for $c$ to determine $y$ with that initial value.
A: With $y(t_0)=y_0$, separation of variables yields $$\int_{y_0}^y y'^{-2}dy' = \int_{t_0}^t 2  dt'$$, $$-1/y+1/y_0= 2t-2t_0$$ and thus $$y=\frac{1}{2t_0+y_0^{-1}-2t}$$
so there is only a missing sign somewhere.
