= Solution
For this <homogeneous first-order differential equation>, set $v=y/x$, with $x\ne0$. The <product rule> gives $y'=v+xv'$, and substitution simplifies the equation to
$$
(1+2ve^v)xv'=2(1-v^2e^v).
$$
The useful further substitution is $w=e^{-v}-v^2$. Its <chain rule> <derivative> satisfies
$$
x\frac{dw}{dx}=-(e^{-v}+2v)xv'=-2(e^{-v}-v^2)=-2w.
$$
Thus $(x^2w)'=0$. Replacing $v$ and $w$ gives the <implicit solution>
$$
\boxed{x^2e^{-y/x}-y^2=C,\qquad x\ne0.}
$$
No division by $w$ was needed, so the level $C=0$ is included. A direct verification also identifies the <integrating factor for a differential one-form>:
$$
d\bigl(x^2e^{-y/x}-y^2\bigr)=e^{-y/x}(2x+y)\,dx-(xe^{-y/x}+2y)\,dy.
$$
Setting this <exact differential> to zero recovers precisely the original equation after multiplication by the nonzero factor $e^{y/x}$. The coefficient $1+2ve^v$ never vanishes for real $v$, since $ve^v\geq-1/e$ implies $1+2ve^v\geq1-2/e>0$. Hence these <level sets> give local <function graphs> $y(x)$ everywhere with $x\ne0$.
Back to article page