Solving ode with complex numbers

1. Mar 25, 2014

cragar

I want to solve $y''+y'+y=(sin(x))^2$ and try to use
$y=Ae^{ix}$ but then when I square it I get $A^2 e^{2ix}$
I found y' and y'' and solved for A and it didn't work I guess I could use the formula for reducing powers but I would like to try and get around that.

2. Mar 26, 2014

lurflurf

hint
$$(D^3+4D)(\sin(x))^2=0$$
or
(sin(x))^2 is a solution of y'''+4y

chose the particular solution from those solutions