Finding a particular solution to a differential equation what is the particular solution for the following differential equation?
$$D^3 (D^2+D+1)(D^2+1)(D^2-3D+2)y=x^3+\cos\left(\frac{\sqrt{3}}2x \right)+xe^{2x}+\cos(x)$$
I tried Undetermined Coefficients and it took so long to solve it,not to mention it was on an exam. I was wondering if there could be any faster and simpler solution. 

For the term $x^3$, use the indeterminate coefficients method ($6^{th}$ degree polynomial).
For the terms $\cos\left(\frac{\sqrt{3}}2x \right)$ and $\cos(x)$ use the complex exponential form and keep the real part of $e^{i\lambda x}/Y(i\lambda)$.
For the term $xe^{2x}$, also use indeterminate coefficients. Rewriting the characteristic polynomial as a function of $D-2$ coud help as
$$(D-2)x^ke^{2x}=kx^{k-1}e^{2k}+2x^ke^{2x}-2x^ke^{2x}=kx^{k-1}e^{2x}.$$
