Answer
See below
Work Step by Step
We are given $y''+xy=\sin x$
We have: $F(x)=\sin x$
Obtain: $(D^2+1)(D^2+x)y=\sin x$
So, $D^2+1$ is the annihilator of $F(x)=\sin x$
Therefore, the general solution for the given differential equation is:
$y(x)=C_1\sin x+C_2\cos x+A_0\sin x+A_1\cos x$
The trial solution is
$y_p(x)=A_0\sin x+A_1\cos x$