Solve the Differential Equation dy/dx=e^(x-y)

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

Given differential equation of the form

\begin{gathered} \frac{{dy}}{{dx}} = {e^{x - y}} \\ \Rightarrow \frac{{dy}}{{dx}} = {e^x}{e^{ - y}} \\ \Rightarrow \frac{{dy}}{{dx}} = \frac{{{e^x}}}{{{e^y}}} \\ \end{gathered}

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

{e^y}dy = {e^x}dx\,\,\,\,{\text{ - - - }}\left( {\text{i}} \right)

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 {{e^x}dx} }

Using the formulas of integration \int {{e^x}dx = {e^x}} , we get

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

Which is the required solution of the given differential equation.