Answer
See below
Work Step by Step
We are given that $y'+3y=f(t)$
and $y(0)=1$
We take the Laplace transform of both sides of the differential
equation to obtain:
$[sY(s)-y(0)]+3Y(s)=\frac{1}{s}-\frac{e^{-s}}{s}$
Substituting in the given initial values and rearranging terms yields
$Y(s)(s+3)-1=\frac{1-e^{-s}}{s}\\
Y(s)(s+3)=\frac{1-e^{-s}}{s}+1$
Thus, we have solved for the Laplace transform of $y(t)$. To find y itself, we must take the inverse Laplace transform. We first decompose the right-hand side into partial fractions to obtain:
$Y(s)=\frac{1}{s(s+3)}+\frac{1}{s+3}-\frac{e^{-s}}{s(s+3)}\\
=\frac{1}{3}(\frac{1}{s}-\frac{1}{s+3})+\frac{1}{s+3}-\frac{e^{-s}}{3}(\frac{1}{s}-\frac{1}{s+3})$
Now,$f(t)= L^{-1}[\frac{1}{3}(\frac{1}{s}-\frac{1}{s+3})+\frac{1}{s+3}-\frac{e^{-s}}{3}(\frac{1}{s}-\frac{1}{s+3})]\\
=\frac{1}{3}(1-e^{-3t}-u_1(t)+e^{-3(t-1)}u_1(t))+e^{-3t}$