Solve the IVP using Laplace transform: $$y'' + 4y = g(t); \hspace{5 pt}y(0) = 1, \hspace{5 pt} y'(0) = 3$$ and $$g(t) = 3 \sin (t), 0 \leq t < 2\pi; \hspace{10 pt} 0, 2\pi \leq t$$
Take step function of $g(t)$ to get $$g(t) = 3 \sin (t) - 3 \sin ((t - 2\pi) + 2\pi)u_{2\pi}(t).$$
Thus for my Laplace transform of the LHS and RHS I got
$$Y(s)[s^2 + 4] - (s + 3) = \frac{3}{s^2+1}\left(3-e^{-2\pi(s)}\frac{s\cdot \sin(2t)+\cos(2t)}{(s^2+1)(s^2+4)}\right)$$
Which looks ridiculously awful. Am I going down the wrong path?
Since $g(t) = (1-u_{2\pi}(t))3\sin t=3\sin t-3u_{2\pi}(t)\sin(t-2\pi)$, the ODE should transform as follows:
$$\begin{aligned} y^{\prime\prime}+4y=g(t) &\implies s^2 Y(s)- s y(0) -y^{\prime}(0) + 4Y(s) = \frac{3}{s^2+1}-3e^{-2\pi s}\frac{1}{s^2+1}\\ &\implies (s^2+4)Y(s) = 3 + s +\frac{3(1-e^{-2\pi s})}{s^2+1}\\ &\implies Y(s) = \frac{3}{s^2+4} + \frac{s}{s^2+4} + \frac{3(1-e^{-2\pi s})}{(s^2+1)(s^2+4)}\end{aligned}$$
Now, I'll leave it to you to verify that you can rewrite $Y(s)$ as follows:
$$Y(s)=\frac{2}{s^2+4} + \frac{s}{s^2+4} + \frac{1}{s^2+1} -\frac{e^{-2\pi s}}{s^2+1} + \frac{e^{-2\pi s}}{s^2+4}$$
The computation of the inverse Laplace transform should be straightforward from here.