Given the first-order differential equation: $$\frac{dy}{dx} = -6xy$$ The textbook says you cannot differentiate both sides as $y$ is on the right side and you have to use separation of variables. However, I did integrate both sides and arrived at this: $$\int{\frac{dy}{dx}dx} = \int{-6xydx}$$ $$y = -6y\int{xdx}$$ $$y = -6y\left(\frac{x^2}{2} + C\right)$$ $$y = -3yx^2 + C$$ $$y + 3yx^2 = C$$ $$y(1 + 3x^2) = C$$ $$y(x) = \frac{C}{1+x^2}$$
And the second last step is valid since $1 + 3x^2$ can never be zero. However, this is not the correct answer, which is: $y(x) = Ce^{-3x^2}$. Why is this?