I am solving following diff eqn using laplace transform: \begin{eqnarray} y''+y= \begin{cases} 0, & \text{if 0<t<2 $\pi$}\\ \sin t, & \text{t>$2\pi$} \end{cases} \end{eqnarray} where $y(0) =1 \space and \space y'(0) =0$.
My attempt: I converted above equation into
\begin{eqnarray} y''+y= \sin t H(t-2\pi) \end{eqnarray}
Now using the formula the laplace transform of RHS is:
$\frac{e^{-2\pi}}{s^2+1}$. This will be used in while changing the laplace transform of above diff eqn and we get
$s^2Y(s) -sy(0) -y'(0) + Y(s) =\frac{e^{-2\pi}}{s^2+1}$
where $\mathcal{L}y(t) =Y(S)$. This gives
$Y(S) = {e^{-2\pi}}[\frac {s(s^2+1) +1}{ ({s^2+1})^2 }]$.
Now I have to find inverse laplace. Is my solution till now correct? How to proceed further to find the answer. Thanks a lot for the help.
It would be much easier if you solve the equations independently and then stitch them together
We solve $ y'' + y = 0 $ have a unique solution $ \cos t $ that satisfy the initial conditions.
Next, we solve $ y'' + y = \sin t $ have a solution $ A \sin t + B \cos t -\frac{t \cos t}{2} $, in order for this to be continuous with the previous solution, we can solve for $ B = 1 + \pi $
In order for the first derivative to be continuous, we can solve for $ A = \frac{1}{2} $.
So we get the solution to be
$ y = \cos t $ when $ 0 < t < 2\pi $
$ y = \frac{1}{2}\sin t + (1 + \pi) \cos t - \frac{t\cos t}{2} $ when $ t \ge 2\pi $