How to solve $y′′′+y'=2-\sin(x)$ I have tried to solve this but with no luck.
So far I just get,
$$y_p(x) = A \sin x + B \cos x \\  
  y'_p(x) = A \cos x - B \sin x  \\
 y''_p(x) =-A \sin x - B \cos x  \\
y'''_p(x) =-A \cos x + B \sin x $$
$$y'''+ y' =  -A \cos x + B \sin x + A \cos x - B \sin x \\ \\ 
         =  \cos x (-A+A) + \sin x (B-B) = 2 - \sin x $$
I would really appreciate help in solving this

Rewrite the equation as $$(D^3+D)y=2-\sin(x)$$
Differentiate twice to obtain
$$\begin{align}D^2(D^3+D)y&=\sin(x)\\
\implies (D^2+1)(D^3+D)y&=2\\
\implies D(D^2+1)(D^3+D)y=D^2(D^2+1)^2y&=0\end{align}$$
Which I leave to you to show has the solution
$$y=C_1+C_2x+(C_3+C_4x)\sin(x)+(C_5+C_6x)\cos(x)$$
Plug this back into the original equation to obtain
$$(D^3+D)y=y'''+y'=C_2-2C_4\sin(x)-2C_6\cos(x)=2-\sin(x)$$
Equating coefficients, we have $C_2=2,C_4=1/2,C_6=0$. Shifting the coefficients on $y$, we have that the general solution to the equation is
$$y=C_1+C_2\sin(x)+C_3\cos(x)+2x+\frac12x\sin(x)$$
