Differential equation using differential operator method

113 Views Asked by At

$$ y"-2y'+y=x\sin x\\ (D^2-2D+1)y= x\sin x\\ y= \frac{x \sin x}{(D^2-2D+1)} \\ \mathrm{Im} { {\frac{x e^{ix}}{(D+i)^2-2(D+i)+1}}}= \mathrm{Im}{\frac{x e^{ix}}{D^2+2(i-1)D-2i}} = \\ =\mathrm{Im}\left({\frac{-x}{2i}- \frac{1+i}{2i}e^{ix}}\right). $$

I'm stuck, can someone give me hint how can I change the complex number $ \mathrm{Im}{\frac{x e^{ix}}{D^2+2(i-1)D-2i}}$ to $\mathrm{Im}\left({\frac{-x}{2i}- \frac{1+i}{2i}e^{ix}}\right)$?

And for this problem do you prefer using variation of parameter / undetermined coefficient / differential operator method? I tried using variation of parameter, the integral is so messy.

Thank you!