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?

A method to do the your particular problem is to do it using:
Undetermined Coefficients: Superposition Principle
The way to initiate your problem using this method would be using the associated homogeneous equation, and then the auxiliary equation. Then proceeding the initial problem is given as:
\begin{align}-y''-y'&=\sin(x) \\-m^2-m&=0\  \text{Associated Homogeneous} \end{align}
Then solving this would be by factoring it:
\begin{align}-m(m+1)&=0\\ m&=0,-1\end{align}
Then one can write the homogeneous solution to the problem as the following:
\begin{align*}y_h&=c_1+c_2e^{x}\end{align*}
All that would be left is to solve for the particular solution which would be as follows:
\begin{align*}y_p&=A\sin(x)+B\cos(x)\\ -y_p''-y_p'&=\sin(x) \\ (A+B)\sin(x)+(-A+B)\cos(x)&=\sin(x)\end{align*}
Here we can setup at system of equations:
\begin{align*}A+B&=1\\B-A&=0\end{align*}
From here the coefficients are pretty easy to determine:

*

*$A=\frac{1}2$

*$B=\frac{1}2$
So the general final solution to your problem is the following:
$$\displaystyle{y=c_1+c_2e^{-x}+\frac{1}2\sin(x)+\frac{1}2\cos(x)}$$
