I have to solve the differential equation using Laplace and find a solution on $[0,\infty)$. the equation is: \begin{equation} y''(t) + y(t) = \delta(t-\pi)\cos(t) \end{equation} With the initial conditions: $y(0) = 0$ and $y'(0) = 1$.
I've tried to solve this by considering the right-handside to be a convolution. I get:
\begin{equation}
Y(s)(s^2+1) = \mathcal{L}[\delta_\pi * \cos(t)] + 1
\end{equation}
Now, I evaluate the convolution as:
\begin{equation}
\mathcal{L}[\delta_\pi * \cos(t)] = \mathcal{L}[\delta\pi]\mathcal{L}[\cos(t)] = e^{-{\pi s}}*\frac{s}{s^2+1}
\end{equation}
This gives me:
\begin{equation}
Y(s) = \frac{se^{-\pi s}}{(s^2+1)^2} + \frac{1}{s^2+1}
\end{equation}
From here, I've tried partial fraction decomposition but the first term is in its simplest form. I don't know how to continue from this point.
NB: My teacher did a one-liner and solved it like this: $\mathcal{L}(y''+y) = (s^2+1)\mathcal{L}[y]-1 = \mathcal{L}[\delta_\pi \cos(t)]$ "which can be rewritten" $\mathcal{L}[y] = \mathcal{L}(\sin(t)+\delta_\pi \cos(t)*\sin(t)$ --(I have no clue what happened after "which can be rewritten") Thanks!
Unfortunately the s-domain expression $Y(s)$ is wrong (provided by @zeeko see above).
Therefore i would like to provide the correct solution.
The laplace transform of the ODE is
$$s^2 Y(s)-s y(0)+Y(s)+e^{-\pi s}-y'(0)=0$$
This results in s-domain $Y(s)$
$$Y(s)\to \frac{e^{-\pi s} \left(e^{\pi s} y'(0)+e^{\pi s} s y(0)-1\right)}{s^2+1}=\frac{y'(0)}{s^2+1}+\frac{s y(0)}{s^2+1}+\frac{e^{-\pi s}}{s^2+1}$$
By inverse Laplace transform we obtain
$$y(t) \to\sin (t) \left(\theta (t-\pi )+y'(0)\right)+y(0) \cos (t)$$
Substituting the initial conditions $y(0)=0$ and $y'(0)=1$ we finally get
$$y(t) \to\sin (t) \left(\theta (t-\pi )+1\right)$$
or as a piecewise function
$$y(t) \to \begin{cases} \sin(t), & 0 \le t < \pi \\ 2\sin(t), & t \ge \pi \\ \end{cases}$$
with $\theta(t)$ as the Heaviside Theta step function.