Solution (source code)

= Solution

Integrate the equation without dividing by $y$:
$$
\frac{d}{dx}\left(\frac{y^2}{2}\right)=1-\frac1{x+1},\qquad
\boxed{y^2=2x-2\log|x+1|+C.}
$$
This holds on a connected interval excluding $x=-1$. The real solutions are differentiable branches of this implicit curve. Where the radicand is positive, $y=\pm\sqrt{2x-2\log|x+1|+C}$, with a locally fixed sign.

A zero of $y$ can belong to a classical solution only at $x=0$, since the original equation then requires $x/(x+1)=0$. For $C=0$ near zero, $2x-2\log(1+x)=x^2+O(x^3)$; the smooth continuations have slopes $+1$ or $-1$ and switch between square-root signs across zero. Keeping the principal nonnegative <square root> across zero instead gives a cusp. Thus the implicit expression requires a smooth branch choice, not an unrestricted global choice of one square-root sign.