If I have a linear, non-homogeneous differential equation with a function like $e^{2x}$ on the right-side, one of the standard methods is to use an annihilater to transform it to a homogeneous equation.
The operator $(D-\alpha)$ annihilates functions of this form. However, it's also true that $[D^2-2\alpha D+\alpha ^2+\beta ^2]^n$ annihilates fucntions of the form $x^{n-1}e^{\alpha x}cos(\beta x)$. Using $\alpha=2$ and $\beta =0$ and $n=1$ gives the annihilater $(D^2-4D+4)=(D-2)(D-2)$, so the corresponding auxiliary equation will contain 2 repeated roots for these factors. However, the annihilater $(D-2)$ implies one root.
EDIT: Wait, $\beta >0$ is an assumption when deriving the operator, so what I'm doing doesn't make any sense. It also applies to the case that the function is a sine instead of a cosine, which would require a different value of $\beta$ too. However, The differential operator I obtained still seems to work. I tested it.