Solve Differential Equation dy/dx=xe^-y

In this tutorial we shall evaluate the simple differential equation of the form \frac{{dy}}{{dx}}  = x{e^{ - y}}, we shall use method of separating the variables.

Given differential equation of the form

\frac{{dy}}{{dx}}  = x{e^{ - y}}

Separating the variables, the given differential equation can be written as

\begin{gathered} \frac{1}{{{e^{ - y}}}}dy = xdx \\ \Rightarrow {e^y}dy = xdx\,\,\,\,{\text{  -  -   - }}\left( {\text{i}} \right) \\ \end{gathered}

By separating the variable technique we must keep the terms dy and dx in the numerators with their respective functions.
Now integration both sides of the equation (i), we have

\int  {{e^y}dy = \int {xdx} }

Using the formulas of integration \int {{e^x}dx = {e^x}} and \int {{x^n}dx = \frac{{{x^{n + 1}}}}{{n + 1}}} , we get

\begin{gathered} {e^y} = \frac{1}{2}{x^2} + c \\ \Rightarrow y = \ln \left( {\frac{1}{2}{x^2}  + c} \right) \\ \end{gathered}

Which is the required solution of the given differential equation.