How to use undetermined coefficients to solve an equation? For this question, I'm having trouble solving this equation. Here is what I have so far. Can anyone please help me out?
$$u'' + u' + 2u = \sin^2t$$
$$ u'' + u' + 2u = 0$$
$$ m^2 + m + 2 = 0$$
$$ m = \frac{-1 +- \sqrt{1-4(1)(2)}}{2}$$
$$ m = \frac{-1}{2} + \frac{\sqrt{7}{i}}{2}$$
$$ u = e^\frac{-t}{2}(c_1\cos\sqrt{7}t + c_2\sin\sqrt{7}t)$$
 A: For the complementary solution it should be
$$u_c(t)=e^{-\frac{t}{2}}\big((c_1\cos\big(\frac{\sqrt{7}}{\color\red{2}}t\big)+c_2\sin\big(\frac{\sqrt{7}}{\color\red{2}}t\big)\big)$$
Then using the identity $\cos(2t)=1-2\sin^2(t)$ we have  $$u''+u'+2u=\sin^2(t)=\frac{1}{2}-\frac{\cos(2t)}{2}$$ So for the particular integral try $u_{p}(t)=A\cos(2t)+B\sin(2t)+C.$

 You should get $$u(t)=e^{-\frac{t}{2}}\big((c_1\cos\big(\frac{\sqrt{7}}{\color\red{2}}t\big)+c_2\sin\big(\frac{\sqrt{7}}{\color\red{2}}t\big)\big)+\frac{1}{8}\big(\cos(2t)-\sin(2t)\big) +\frac{1}{4}.$$


We have $$u_{p}=A\cos(2t)+B\sin(2t)+C$$
$$u_{p}'=-2A\sin(2t)+2B\cos(2t)$$
$$u_{p}''=-4A\cos(2t)-4B\sin(2t)$$
Substituting, we obtain
$$u_{p}''+u_{p}'+2u_{p}=-4A\cos(2t)-4B\sin(2t)$$
$$-2A\sin(2t)+2B\cos(2t)$$
$$+2A\cos(2t)+2B\sin(2t)+2C$$
$$=-2A\cos(2t)-2B\sin(2t)+2B\cos(2t)-2A\sin(2t)+2C$$
$$=(-2A+2B)\cos(2t)-(2A+2B)\sin(2t)+2C=\frac{1}{2}-\frac{1}{2}\cos(2t)$$
And comparing coefficients we have $$-2A+2B=-\frac{1}{2}$$
$$2A+2B=0$$
$$2C=\frac{1}{2}$$
$$\implies A=\frac{1}{8}, \space B=-\frac{1}{8}, \space C=\frac{1}{4}$$
A: Use Euler's formula to express $\sin^2(t)$ in terms of exponentials
$$\sin^2(t) = -\frac 14 (e^{2it} -2 + e^{-2it}) $$
now try a solution of the form $Ae^{2it} + B + C e^{-2it}$
