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