# Solve the following differential equation: {eq}e^x y \frac{\mathrm{d}y}{\mathrm{d}x} = e^{-y} + e^{-2x - y} {/eq}.

## Question:

Solve the following differential equation: {eq}e^x y \frac{\mathrm{d}y}{\mathrm{d}x} = e^{-y} + e^{-2x - y} {/eq}.

## Using Separation of Variables to Solve a First-Order Differential Equation:

Suppose we have a differential equation of the form {eq}f(x, y) \displaystyle\frac{dy}{dx} = g(x, y). {/eq} If we are able to solve the equation for {eq}\displaystyle\frac{dy}{dx} {/eq} so that the right hand side of the equation is the product of a function of {eq}x {/eq} and a function of {eq}y, {/eq} then the equation is separable. We can then separate the variables using multiplication and division, and determine the solution by using integration.