= Solution
For the solution through $x=0$, work on the connected domain $x>-1$. While $y>0$, <separation of variables> gives
$$
\frac{dy}{\sqrt y}=-\frac{dx}{1+x},\qquad 2\sqrt y=-\ln(1+x)+C.
$$
The <initial condition> gives $C=2$, so
$$
\boxed{y(x)=\left(1-\frac12\ln(1+x)\right)^2\quad(-1<x\leq e^2-1)}.
$$
The restriction matters: the unsquared equation requires $1-\frac12\ln(1+x)\geq0$. The solution reaches zero at $x_*=e^2-1$. Continuing the squared formula beyond that point would give a positive <derivative>, contradicting the original negative square-root right-hand side.
The nonnegative forward continuation is instead
$$
\boxed{y(x)=\begin{cases}
\left(1-\frac12\ln(1+x)\right)^2,&-1<x\leq e^2-1,\\
0,&x\geq e^2-1.
\end{cases}}
$$
The two pieces join with $y'=0$, and both satisfy the original equation. Because the right-hand side is nonpositive for $x>-1$, a nonnegative solution cannot leave zero in the forward direction. This is a finite-time extinction phenomenon for a <separable differential equation>.
Back to article page