# What is the general solution of the differential equation? :  dy/dx + 3y = 3x^2e^(-3x)

Jul 24, 2017

$y = \left({x}^{3} + C\right) \cdot {e}^{- 3 x}$

#### Explanation:

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

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

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

$y \cdot {e}^{3 x} = {x}^{3} + C$

$y = \left({x}^{3} + C\right) \cdot {e}^{- 3 x}$

Note: This differential equation is first order and linear one.

1) I multiplied both sides with ${e}^{3 x}$ for converting left side to the exact differential equation.

2) I integrated both sides.

3) I multiplied with ${e}^{- 3 x}$ for solving $y$.

Jul 25, 2017

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

#### Explanation:

We have:

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

We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{\mathrm{dy}}{\mathrm{dx}} + P \left(x\right) y = Q \left(x\right)$

Then the integrating factor is given by;

$I = {e}^{\int P \left(x\right) \mathrm{dx}}$
$\setminus \setminus = \exp \left(\int \setminus 3 \setminus \mathrm{dx}\right)$
$\setminus \setminus = \exp \left(3 x\right)$
$\setminus \setminus = {e}^{3 x}$

And if we multiply the DE  by this Integrating Factor, $I$, we will have a perfect product differential;

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

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

Which we can now directly integrate to get:

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

$\therefore {e}^{3 x} y = {x}^{3} + C$

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

$\therefore y = {x}^{3} {e}^{- 3 x} + C {e}^{- 3 x}$