# Differentiating both sides of a differential equation introduces an extra constant?

$$y'=y^2$$
This differential equation can be solved by dividing both sides with $$y^2$$ and integrating both sides to obtain $$y=\frac{1}{c_1-x}$$

But if I differentiate both sides instead, I get $$y''=2yy'=2y^3=2y'^\frac{3}{2}$$
This is a Bernoulli DE that can be solved with the substitution $$u=y'^\frac{-1}{2}$$ and results in
$$y'=\frac{1}{(-x+c_1)^2}$$
$$y=\frac{1}{c_1-x}+c_2$$

Is the method of differentiating both sides of the DE correct?
It resulted in an extra constant and I'm not sure what went wrong.

• Compare this with how $x=5 \implies x^2=25$, but $x^2=25$ does not imply $x=5$. – Joe Dec 11 '20 at 21:41
• Nothing went wrong, it's just that differentiating both sides is not an invertible operation. You can't distinguish $y' = y^2$ from $y' = y^2 + c$. – Qiaochu Yuan Dec 11 '20 at 21:43

What surprises you? Differentiating the differential equation $$y'= 0$$ introduces another constant: you have linear solutions in addition to the constants.