= Solution
An <integrating factor> for $u'+P(x)u=Q(x)$ is a nonzero function $\mu(x)=\exp(\int P(x)dx)$, chosen so that $(\mu u)'=\mu Q$. Integrating this total derivative reduces the first-order <linear ordinary differential equation> to one quadrature.
For the given nonlinear equation, let $u=y^2$, so $u'=2yy'$. Multiplication by $2y$ gives $u'+u=x^2+2x$. Using the <integrating factor> $e^x$, or recognizing the particular solution $u=x^2$, yields $u=x^2+Ce^{-x}$. The initial value gives $C=1$ and selects the positive branch:
$$
\boxed{y(x)=\sqrt{x^2+e^{-x}}.}
$$
The radicand is strictly positive for every real $x$. This solution never reaches the singular denominator $y=0$ of the original equation, so multiplication by $y$ has introduced no forbidden crossing. The negative branch would violate $y(0)=1$.
Back to article page