# How do you solve y'+3y=0 given y(0)=4?

Dec 13, 2016

$y = 4 {e}^{- 3 x}$

#### Explanation:

We have $y ' + 3 y = 0$, or:

$\frac{\mathrm{dy}}{\mathrm{dx}} + 3 y = 0$

This is a first order linear ordinary differential equation and so we can derive an Integrating Factor using:

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

So multiplying the DE by the IF gives:

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

Thanks to the product rule this can now be written as the derivative of a single product:

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

Which can now easily be solved to give;

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

We know that $y \left(0\right) = 4 \implies A {e}^{0} = 4 \implies A = 4$

Hence, the solution is:
$y = 4 {e}^{- 3 x}$

Dec 13, 2016

$y = 4 {e}^{- 3 x}$

#### Explanation:

We have the separable differential equation:

$y ' + 3 y = 0$

Which can be rearranged as:

$\frac{\mathrm{dy}}{\mathrm{dx}} + 3 y = 0$

$\frac{\mathrm{dy}}{\mathrm{dx}} = - 3 y$

Rearranging this by separating the variables, that is, treating $\frac{\mathrm{dy}}{\mathrm{dx}}$ as division and getting the $y$ terms on one side and the $x$ terms on the other, we see that:

$\frac{\mathrm{dy}}{y} = - 3 \mathrm{dx}$

Integrate both sides:

$\int \frac{\mathrm{dy}}{y} = - 3 \int \mathrm{dx}$

$\ln \left\mid y \right\mid = - 3 x + C$

Use the initial condition $y \left(0\right) = 4$ to solve for $C$:

$\ln \left\mid 4 \right\mid = - 3 \left(0\right) + C$

$C = \ln \left(4\right)$

Then:

$\ln \left\mid y \right\mid = - 3 x + \ln \left(4\right)$

Solving for $y$:

$\left\mid y \right\mid = {e}^{- 3 x + \ln \left(4\right)}$

Rewriting using exponent rules:

$\left\mid y \right\mid = {e}^{- 3 x} {e}^{\ln} \left(4\right)$

$\left\mid y \right\mid = 4 {e}^{- 3 x}$

$4 {e}^{- 3 x}$ is positive for all real values of $x$, so the absolute value bars are not necessary.

$y = 4 {e}^{- 3 x}$