Answer
$\displaystyle y=-\ln|\frac{x^2}{2}+C|$
Work Step by Step
$\displaystyle y'+xe^y=0$
$\displaystyle y'=\frac{dy}{dx}=-xe^y$
Seperation of variables:
$\displaystyle e^{-y}dy=-xdx$
Integrate both sides
$\displaystyle \int e^{-y}dy=\int -x$ $dx$
$\displaystyle -e^{-y}=-\frac{x^2}{2}+C$
$\displaystyle e^{-y}=\frac{x^2}{2}+C$
$\displaystyle -y=\ln|\frac{x^2}{2}+C|$
$\displaystyle y=-\ln|\frac{x^2}{2}+C|$
The reason why the answer has $\displaystyle \frac{x^2}{2}+C$ and not $\displaystyle \frac{x^2}{2}-C$ when $-1$ is multiplied on both sides is because $C$, the constant of integration, has not taken on a definite value and therefore remains the same.