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?

$$\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}$$
