Using Laplace Transform to solve$$y''+4y=f$$ Where $y(0)=0, y'(0)=-1,$ and:$$f(t)=\begin{cases}\cos(2t)&\text{if $0\le t \lt \pi$}\\0 &\text{otherwise}\\\end{cases} $$
Do I need to solve the question on different interval of $f$? If so, how to tansform back? what is the integral interval for $s$ in the inverse transform?
The Laplace transform for $f(t)$ is defined as
$$F(s) = \int_0^\infty f(t) e^{-st}\ dt.$$
For your function, $f(t) \equiv 0$ for $t \ge \pi$. As such, $\int_\pi^\infty f(t)e^{-st}\ dt - \int_\pi^\infty 0\ dt = 0.$