# Finding the particular solution using method of undetermined coefficient

Can someone help me to solve the second order differential equation, I'm stuck at finding the particular solution by using undetermined coefficient. $$y''+y'+y=\sin^2 x$$ Is it the particular solution have the form such that $Y(x)=A\sin^2 x + B\cos^2 x$ ?

• Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. – José Carlos Santos Dec 14 '17 at 10:13

Consider $$\sin^2x=1-\cos^2x=1-\frac{\cos(2x)+1}{2}$$
No, there is no particular solution of the form $A\sin^2 (x) + B\cos^2 (x)$ (see the P.S. below).
Note that $\sin^2(x)=\frac{1}{2}(1-\cos(2x))$. Moreover, $0$ and $2i$, complex numbers associated to the functions $1$ and $\cos(2x)$) are not roots of the characteristic polynomial $z^2+z+1$, then a particular solution should have the form (see LINK): $$A\cdot 1+B\cdot \sin(2x)+C\cdot \cos(2x)$$ where $A,B,C$ are constants to be found. Can you take it from here?
P.S. Note that the dimension of $\text{span}\left(\{1,\sin(2x),\cos(2x)\}\right)$ is $3$, whereas the dimension of $\text{span}\left(\{\sin^2(x),\cos^2(x)\}\right)=\text{span}\left(\{1,\cos(2x)\}\right)$ is $2$. So why is there no particular solution of the form $A\sin^2 (x) + B\cos^2 (x)$?