I have this ODE:
$$ y'' + y = \begin{cases} \cos t, &\text{ if }0\le t \lt \pi\\ t-\pi,&\text{ if }\pi \le t \lt \infty \end{cases} $$
The initial values are: $$ y(0)=0 \\ y'(0)=0 $$
I want to solve it using Laplace and reverse Laplace transform.
I know that the left part of the equation will become:
$$ s^2L(y) - sy(0) -y'(0)+ L(y) $$ and because of the inital values are zeroed out, we are left with:
$$ s^2L(y) + L(y) $$
For the right part, i will have to break it into two integrals. The one will be from $$ [0,π] $$
and the other one will be from $$ [π, \infty] $$
Finally, i know from the Laplacian identities that the Laplace transform of $$ cos(at) = \frac{s}{s^2 + a^2} $$
So what is left is to compute the Laplace transform of $$ t-π $$
Unfortunately at this point i am stuck. Even if i found the answer somewhere, i am afraid that i might be stuck at the reversal of the procedure, in order to calculate the inverse Laplace transform of
$$ t-π $$
You are correct that you should break the right-hand-side into two pieces, but you will end up with (RHS=Right Hand Side) $$ \int_0^{+\infty}e^{-st}\cdot \text{RHS}\,dt= \int_0^\pi e^{-st}\cos t\,dt+\int_\pi^{+\infty}e^{-st}(t-\pi)\,dt. $$ Then just evaluate those integrals with your favorite method (mine would be integrating by parts).