Answer
See below
Work Step by Step
We are given that $y'2-y=f(t)$
and $y(0)=2$
where $f(t)=t+(1-t)u_1(t)+(2-t)u_2(t)+(t-3)u_3(t)$
We take the Laplace transform of both sides of the differential
equation to obtain:
$[sY(s)-y(0)]-2Y(s)=\frac{1}{s^2}-\frac{e^{-s}}{s^2}+\frac{e^{-2s}}{s^2}+\frac{e^{-3s}}{s^2}$
Substituting in the given initial values and rearranging terms yields
$Y(s)(s-2)=\frac{1}{s^2}-\frac{e^{-s}}{s^2}+\frac{e^{-2s}}{s^2}+\frac{e^{-3s}}{s^2}\\
Y(s)(s-2)=\frac{1}{s^2}-\frac{e^{-s}}{s^2}+\frac{e^{-2s}}{s^2}+\frac{e^{-3s}}{s^2}$
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^2(s-2)}-\frac{e^{-s}}{s^2(s-2)}+\frac{e^{-2s}}{s^2(s-2)}+\frac{e^{-3s}}{s^2(s-2)}\\=
(1-e^{-s}-e^{-2s}+e^{-3s}[-\frac{1}{4s}-\frac{1}{2s^2}+\frac{1}{4(s-1)}]$
Now,$f(t)= L^{-1}[(1-e^{-s}-e^{-2s}+e^{-3s}[-\frac{1}{4s}-\frac{1}{2s^2}+\frac{1}{4(s-1)})]\\
=-\frac{1}{4}-\frac{t}{2}+\frac{e^{2t}}{4}+(\frac{1}{4}+\frac{t-1}{2}-\frac{e^{2(t-1)}}{4})u_1(t)+(\frac{1}{4}+\frac{t-2}{2}-\frac{e^{2(t-2)}}{4})u_2(t)+(\frac{1}{4}+\frac{t-3}{2}-\frac{e^{2(t-3)}}{4})u_3(t)$