# What is a solution to the differential equation dy/dx=2e^(x-y) with the initial condition y(1)=ln(2e+1)?

Jul 31, 2016

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

#### Explanation:

this is separable

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

So

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

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

$\int \setminus \frac{d}{\mathrm{dx}} \left({e}^{y}\right) \setminus \mathrm{dx} = \int \setminus 2 {e}^{x} \setminus \mathrm{dx}$

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

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

applying IV: $y \left(1\right) = \ln \left(2e+1\right)$

$\ln \left(2e+1\right) = \ln \left(2 e + C\right) \implies C = 1$

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