Answer
$y=(y_0-5).e^t+5$
Work Step by Step
To solve this DE, we need to separate variables and then put the initial problem to solve the IVP. We have:
$\frac{dy}{dt}=-y+5$
Separating variables by multipling numbers and infinitesimals, we get:
$\frac{\frac{dy}{dt}}{-y+5}=1$
In this case, we multiply both sides by $\frac{1}{-y+5}$
Using the Chain Rule in the left side, we get the derivative of $ln|-y+5|$, then:
$\frac{d[ln(-y+5)]}{dt}=1$
By integrating both sides, we get:
$ln|-y+5|=\int(1)dt=t+k$
Using definition of log, we have:
$|-y+5| = e^{t+k}=e^t\times e^k = C.e^t$
And so
$-y+5 = \pm C.e^t$
Finally
$y=\pm C.e^t + 5$
$y=c.e^t+5$
Where $c=\pm C$
Now, we use the fact of $y(0)=y_0$, putting $t=0$ and $y=y_0$ we get the constant. Then:
$y_0=c.e^0+5 = c.1+5$
Finally
$c=y_0-5$
The solution of IVP is:
$y=(y_0-5).e^t+5$
For each $y_0$ we have a different exponential function modelled by the solution of DE. For example:
$y_0=5 \Rightarrow y=5$ (constant)
$y_0=0 \Rightarrow y=-5.e^t+5$ (exponential function)