# What is a particular solution to the differential equation dy/dx=e^(x-y) with y(0)=2?

Jul 18, 2016

$y = \ln \left({e}^{x} + {e}^{2} - 1\right)$

#### Explanation:

this is separable

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

${e}^{y} \frac{\mathrm{dy}}{\mathrm{dx}} = {e}^{x}$

$\int \setminus {e}^{y} \frac{\mathrm{dy}}{\mathrm{dx}} \setminus \mathrm{dx} = \int \setminus {e}^{x} \setminus \mathrm{dx}$

$\int \setminus {e}^{y} \setminus \mathrm{dy} = \int \setminus {e}^{x} \setminus \mathrm{dx}$

${e}^{y} = {e}^{x} + C$

$y \left(0\right) = 2 \implies {e}^{2} = 1 + C \implies C = {e}^{2} - 1$

${e}^{y} = {e}^{x} + {e}^{2} - 1$

$y = \ln \left({e}^{x} + {e}^{2} - 1\right)$