# Question #da059

Jan 8, 2017

The general solution is $y = {e}^{x} / \left(a + 1\right) + C {e}^{- a x}$

#### Explanation:

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

Multiply both sides by the integrating factor

$= {e}^{\int a \mathrm{dx}} = {e}^{a x}$

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

$\frac{d}{\mathrm{dx}} \left(y {e}^{a x}\right) = {e}^{a x + x}$

Integrating both sides

$y {e}^{a x} = \int {e}^{a x + x} \mathrm{dx} = {e}^{x \left(a + 1\right)} / \left(a + 1\right) + C$

Dividing both sides by ${e}^{a x}$

$y = {e}^{x \left(a + 1\right)} / \left({e}^{a x} \left(a + 1\right)\right) + C {e}^{- a x}$

$y = {e}^{x} / \left(a + 1\right) + C {e}^{- a x}$

Jan 8, 2017

$y = {C}_{1} {e}^{- a x} + {e}^{x} / \left(a + 1\right)$

#### Explanation:

This is a non-homogeneous linear differential equation. The solution can be obtained as the sum of a particular solution ${y}_{p}$ plus the homogeneous solution ${y}_{h}$.

The homogeneous solution obeys

$\frac{{\mathrm{dy}}_{h}}{\mathrm{dx}} + a {y}_{h} = 0$ This equation is separable giving

$\frac{{\mathrm{dy}}_{h}}{y} _ h = - a \mathrm{dx}$ and the solution is

$\log {y}_{h} = - a x + C \to {y}_{h} = {C}_{1} {e}^{- a x}$

The particular solution is obtained with the "Constants Variation" method due to Lagrange.

Supposing ${y}_{p} = {C}_{1} \left(x\right) {e}^{- a x}$ and substituting into

$\frac{{\mathrm{dy}}_{p}}{\mathrm{dx}} + a {y}_{p} = {e}^{x}$ we obtain

${C}_{1} ' \left(x\right) {e}^{- a x} = {e}^{x}$ then

${C}_{1} \left(x\right) = {e}^{\left(a + 1\right) x} / \left(a + 1\right)$

Finally the solution is

$y = {y}_{h} + {y}_{p} = {C}_{1} {e}^{- a x} + {e}^{\left(a + 1\right) x} / \left(a + 1\right) {e}^{- a x} = {C}_{1} {e}^{- a x} + {e}^{x} / \left(a + 1\right)$

Jan 8, 2017

$y \left(x\right) = {e}^{x} / \left(a + 1\right) + C {e}^{- a x}$

#### Explanation:

This is a linear differential equation, so first we have to find the integrating factor:

$u \left(x\right) = {e}^{\int a \mathrm{dx}} = {e}^{a x}$

We have then that:

$\frac{d}{\mathrm{dx}} \left({e}^{a x} y \left(x\right)\right) = {e}^{a x} \frac{\mathrm{dy}}{\mathrm{dx}} + a {e}^{a x} y \left(x\right) = {e}^{a x} \left(\frac{\mathrm{dy}}{\mathrm{dx}} + a y \left(x\right)\right)$

Now we start from the original equation, multiply both sides by the integrating factor and use the identity here above:

$\frac{\mathrm{dy}}{\mathrm{dx}} + a y \left(x\right) = {e}^{x}$

${e}^{a x} \left(\frac{\mathrm{dy}}{\mathrm{dx}} + a y \left(x\right)\right) = {e}^{a x} {e}^{x} = {e}^{\left(a + 1\right) x}$

$\frac{d}{\mathrm{dx}} \left({e}^{a x} y \left(x\right)\right) = {e}^{\left(a + 1\right) x}$

Now we can separate variables:

${e}^{a x} y \left(x\right) = \int {e}^{\left(a + 1\right) x} \mathrm{dx}$

${e}^{a x} y \left(x\right) = \frac{1}{a + 1} {e}^{\left(a + 1\right) x} + C$

$y \left(x\right) = {e}^{- a x} / \left(a + 1\right) {e}^{\left(a + 1\right) x} + C {e}^{- a x} = {e}^{x} / \left(a + 1\right) + C {e}^{- a x}$