find a 4th order linear, non-homo ODE whose general solution: How to find a fourth order, linear, not homogenous ODE with general solution:
$y=c_1+c_2 x+c_3 e^{2x}\cos x+c_4e^{2x}\sin x-x e^{-x}$?
Is there a specific method? I feel like it is guesswork to a certain degree. I can tell some parts such as the $c_1$ term will originally have had to be some sort of degree $4$ polynomial, and the $\sin,\cos$ terms will be some linear combination  $a\cos +b\sin$ (I think)  as well. but the other ones aren't as obvious to me. Any help would be appreicated. thank you!

Looking at the solution you know that the characteristic equation of the homogeneous equation has the double root $0$ and the complex conjugate roots $2\pm i$. The characteristic equation is then
$$
r^2((r-2)^2+1)=r^4-4\,r^3+5\,r^2=0.
$$
The equation will be
$$
y''''-4\,y'''+5\,y''=f(x).
$$
You also know that $y=-x\,e^x$ is a solution. Plug it into the equation to find $f$.
