How to solve a differential equation with a distributional free term? 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' .$$
 A: $$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$.
A: I assume that the OP actually wants to solve the following ODE
$$y'' + y = \delta + \delta'$$
rather than $y'' + y' = \delta + \delta'$. Assuming zero initial conditions and taking the Laplace transform of both sides,
$$s^2 Y (s) + Y (s) = 1 + s$$
and, thus,
$$Y (s) = \dfrac{s+1}{s^2+1} = \dfrac{s}{s^2+1} + \dfrac{1}{s^2+1}$$
Taking the inverse Laplace transform,
$$y (t) = ( \cos (t) + \sin (t) ) \, u (t)$$
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$

The Question: $\ds{\mathrm{y}''\pars{x} + \mathrm{y}\pars{x} = \delta\pars{x} + \delta'\pars{x}}$


Lets $\ds{\xi\pars{x} \equiv \mathrm{y}'\pars{x} + \mathrm{y}\pars{x}\ic}$ such that $\ds{\xi'\pars{x} - \xi\pars{x}\ic = \delta\pars{x} + \delta'\pars{x}}$ and
$\ds{\mathrm{y}\pars{x} = \Im\pars{\xi\pars{x}}}$. Then
$\pars{~\Theta\ \mbox{is the}\ Heaviside\ Step\ function~}$,
\begin{align}
\totald{\bracks{\expo{-\ic x}\xi\pars{x}}}{x} & =
\expo{-\ic x}\bracks{\delta\pars{x} + \delta'\pars{x}}
\\[3mm] \imp\ \expo{-\ic x}\xi\pars{x} - \xi\pars{0^{-}} & =
\pars{1 + \ic}\Theta\pars{x}\,,\qquad  x \not= 0
\\[3mm] \imp\ \xi\pars{x} & = \expo{\ic x}\xi\pars{0^{-}} +
\bracks{\expo{\ic x} + \ic\expo{\ic x}}\Theta\pars{x}
\end{align}

$$
\color{#f00}{\mathrm{y}\pars{x}} =
\color{#f00}{\Im\pars{\expo{\ic x}\bracks{\mathrm{y}'\pars{0^{-}} + \mathrm{y}\pars{0^{-}}\ic}} +
\bracks{\sin\pars{x} + \cos\pars{x}}\Theta\pars{x}}\,,\qquad x \not= 0
$$

Note that $\ds{\mathrm{y}\pars{x}}$ is not defined at $x = 0$ as expected.

