<s>[INST] Solve $y’’ – 4y’ + 5y = 4e^{2x}\sin(x)$ using $\mathcal D$ operator Hello – I am working through the following question and get stuck at step 6. Could someone please advise in simple terms which I can hopefully understand. Thanks
$$y'' – 4y' + 5y = 4e^{2x}\sin(x)$$
Step one – Order equation so that differential operator is in front of the RHS of the equation
$\newcommand{\D}{\mathcal D}$
$$1 = \frac 1 {\D^2 – 4\D + 5}  \cdot 4e^{2x}\sin(x)$$
Step two – move constant and exponential in front of the $\D$ operator
$$1 = 4e^{2x}\cdot \frac 1 {\D^2 – 4\D + 5}\cdot \sin(x)$$
Step three – calculate $a$
Because of $e^{2x}$, $a = 2$, and because of $\sin(x)$, $a = 2 + i$.
Step four – insert $a$ into the $\D$ operator and then calculate to see if it equals zero
\begin{align}
1 &= 4e^{2x}\cdot \frac 1 {(2+i)^2 – 4(2+i) + 5}\cdot \sin(x)
\\
&= 4e^{2x}\cdot \frac 1 {(4+4i+4-8-4i+5)}\cdot\sin(x)
\\
&= 4e^{2x}\cdot \frac 1 {(0)}\cdot \sin(x)
\end{align}
Step 5 – because there is a zero, note $a = 2$ therefore make it $\D+2$
\begin{align}
1 &= 4e^{2x}\cdot \frac 1 {(\D + 2)^2 – 4(\D + 2) + 5}\cdot \sin(x)
\\
&= 4e^{2x}\cdot\frac 1 {\D^2 + 1}\cdot\sin(x)
\end{align}
What do I do for step 6? Please explain in simply terms and assume my calculus knowledge is low.
 [/INST] For simplicity, we denote the particular solution as $y_p(t)$.
Then
$$
y_p(t) = {1 \over D^2 - 4 D + 5} \left( 4 e^{2 x} \sin x \right) =
4 {1 \over D^2 - 4 D + 5} \left( e^{2 x} \sin x \right) 
$$
Thus, we have
$$
y_p(t) = 4 e^{2 x} {1 \over (D + 2)^2 - 4 (D + 2) + 5} \ \sin x
= 4 e^{2 x} {1 \over (D^2 + 4 D + 4) - (4 D + 8) + 5} \ \sin x
$$
Simplifying, we get
$$
y_p(t) = 4 e^{2 x} {1 \over D^2 + 1} \ \sin x = 
4 e^{2 x} \left[ -{x \over 2} \cos x \right]
$$
(Using the standard formulas)
Hence,
$$
\boxed{y_p(t) = - 2 x e^{2 x} \ \cos x}
$$
Finally, I have added a reference for the general formula
$$
y_p(t) = - {x \over 2 a} \ \cos(a x)
$$
for a particular integral of $(D^2 + a^2) y = \sin(a x)$.
Proof for the Particular Integral of $(D^2 + a^2) y = \sin(a x)$ 
</s>