## Separation of Variables

Separation of variables is a technique used to rearrange a first order differential equation into a form that can be integrated.
$\frac{y}{x+2} \frac{dy}{dx}=e^y$
.
Every factor containing
$x$
is moved to the side contain
$dy$
and all the occurrences of
$x$
are moved to the other side. Multiply both sides by
$x+2$
and divide both sides by
$e^y$
to obtain
$ye^{-y}dy=(x+2)dx$
. Now integrate.
$\int ye^{-y}dy= \int (x+2)dx$

The left hand side is integrated using the Integration By Parts method.
$-ye^{-y}-e^{-y}= \frac{x^2}{2}+2x+c$