I tried to solve this type of differential equation
$$y'' + y = \delta + \delta' .$$
I tried using the Laplace Transform, but I'm stuck at that $\delta$ (Dirac function). The only thing I know is the solution
$$(\cos (t) + \sin (t)) \, u(t)$$
with $u(t)$ being Heaviside's step function.
EDIT : $$y'' + y = \delta + \delta' .$$ not $$y'' + y' = \delta + \delta' .$$
$$y''(t)+y'(t)=\delta(t)+\delta'(t)$$ $\delta(t)$ is the Dirac function.
First integration : $$y'+y=u(t)+\delta(t)+c_1$$ $u(t)$ is the Heaviside function.
Seconf integration :
The solution of the homogeneous ODE $y'+y=0$ is $y=c\:e^{-t}$
Let $y(t)=f(t)e^{-t}$
$(f'-f)e^{-t}+fe^{-t}=u(t)+\delta(t)+c_1$
$f'=(u(t)+\delta(t)+c_1)e^t$
$f=(e^t-1)u(t)+u(t)+c_1e^t+c_2$
$y=\left( (e^t-1)u(t)+u(t)+c_1e^t+c_2\right)e^{-t}$
$$y(t)=u(t)+c_1+c_2e^{-t}$$
COMMENT :
The expected solution $y=\cos(t)+u(t)\sin(t)$ cannot be obtained from the given ODE alone because :
First : the boundary conditions are missing. So, what we can obtain is a formula including two constants $c_1$ and $c_2$.
Second : Sinusoidal terms cannot be present in the solution for an ODE of this kind. Probably there is a typo. May be $y''+y$ instead of $y''+y'$ ?
NOTE :
if the ODE is $\quad y''+y=\delta(t)+\delta'(t)\quad$ the solution can be obtained by the classical method of solving the homogeneous ODE and variation of parameters method. Also, it can be solve thanks to the Laplace transform. The result is : $$y(t)=\left(\sin(t)+\cos(t)\right)u(t)+c_1\sin(t)+c_2\cos(t)$$ Some boundary conditions are missing in the wording of the question in order to determine the values of $c_1$ and $c_2$.