Why does the method of separation of variables fail to produce solution for this first order differential equation $dy/dx=-4xy^2$ when $y(0)=0?$ $\frac{dy}{dx}=-4xy^2$
Basically, the method just says:
Rewrite and integrate both side: $$\int{\frac{1}{y^2}}dy=\int{-4x}dx$$
And get: $$y=\frac{1}{2x^2-C}$$
The only reason my book gives is that by putting y in the denominator we assume y cannot be 0 and that the method fails because the integral becomes divergent when point x=0 is included in the integral.
Can someone elaborate (maybe correct the second reason because it's nothing about x but instead the problem is y)?
 A: The fact that $y(0)=0$ means you are working in some square $[-a,a]\times [-b,b]$ and on this square $\int{\frac{1}{y^2}}dy$ s not defined, simply because $g(y)=1/y^2$ is not defined if $y=0$
On the other hand, $y=0$ satisfies the differential equation and the initial condition, so by existence/uniqueness, it is $the$ solution.
A: The solution satisfying the differential equation and boundary conditions is just $y=0$.  So when you divide by $y^2$ during separation of variables, you end up dividing by zero and that is doomed to fail.  For this case separation of variables is valid only for nonzero solutions.  You must check separately for a zero solution, especially given your boundary condition.  See the comment by @imranfat.
A: (not a full answer)
A non-rigorous justification for the solution $y=0$ can be obtained by noting that if $y(0)\neq0$, the solution is $y(x)=\frac{1}{2x^2+\frac{1}{y(0)}}=\frac{y(0)}{1+2y(0)x^2}$, which tends to $y(x)=0$ as $y(0)$ tends to $0$.
Note that this line of reasoning does make some assumptions about continuity which don't necessarily apply here, but as a heuristic, it can be useful for obtaining solutions which don't fit the form of a general solution for whatever reason.
