How do I solve this ordinary differential equation: −y″−y=sin(x)? How do I find a particular solution? I'm trying to use the method of undetermined coefficients and trying to guess a solution in the form of Cxsin(x) because sin(x) is part of the homogeneous solution, but I can't get an answer. How do I go about this problem?

Annihilator Approach
Given the original ODE, as in my previous post you use a similar procedure when using the annihilator approach. $(D^2+1)$ annihilates $\sin(x)$
\begin{align*}(D^2+1)(-D^2-D)&=(D^2+1)\sin(x) \\ (-D^4-D^3-D^2-D)&=0\\ -D^3(D+1)-D(D+1)&=0\\ -D(D+1)(D^2+1)&=0\end{align*}
This mimics an auxiliary equation, except this produces the particular except with unknown coefficients.
$$y=c_1+c_2e^{-x}+c_3\sin(x)+c_4\cos(x)$$
Knowing that solving the particular coefficients would be just like above so the final general solution is known:
$$\displaystyle{y=c_1+c_2e^{-x}+\frac{1}2\sin(x)+\frac{1}2\cos(x)}$$
