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)}}$$ using the method of separating the variables.

The differential equation of the form is given as
\[\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)\]

In the separating the variables technique we must keep the terms $$dy$$ and $$dx$$ in the numerators with their respective functions.

Now integrating 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} \]

This is the required solution of the given differential equation.