# What is a solution to the differential equation e^xdy/dx+2e^xy=1?

Jul 11, 2016

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

#### Explanation:

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

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

this is non-separable, we use an integrating factor (IF)

$I F = {e}^{\int 2 \mathrm{dx}} = {e}^{2 x}$

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

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

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

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

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

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

Jul 11, 2016

$y = {C}_{0} {e}^{- 2 x} + {e}^{- x}$

#### Explanation:

Dividing by ${e}^{x}$

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

this linear non-homogeneus differential equation has as solution

$y = {y}_{h} + {y}_{p}$

such that

$\frac{{\mathrm{dy}}_{h}}{\mathrm{dx}} + 2 {y}_{h} = 0$

and

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

For the homogeneus we obtain easily ( variables grouping)

${y}_{h} = {C}_{0} {e}^{- 2 x}$

and for the particular, ${y}_{p} = {e}^{- x}$ verifies the differential condition.

so the solution is

$y = {C}_{0} {e}^{- 2 x} + {e}^{- x}$