<s>[INST] My solution to inhomogeneous $\frac{d^2y}{dx^2} + y = \sin{x}$ does not conform to my book's solution! I need help with the solution of this particular equation:

$$\frac{d^2y}{dx^2} + y = \sin{x}$$

Due to me having to go to work, I cannot display all my work in mathjax, my shift starts in 5 min...but my solution is: $$y= \frac{-x}{2} + \frac{(\cos{2x}\sin{x})}{4} + C_1\cos{x} + C_2\sin{x}$$
Whereas my book's solution is: $$y= \frac{-x}{2} +C_1\cos{x} + C_2\sin{x}$$
I have used the method of variation of prameters, cramer's rule and basic antidifferentiation to solve resulting system.
Thank you all!
 [/INST] Since you mention variation of parameters, I'll summarize the method here. Hopefully you can retrace your steps to find the mistake.
From the fundamental solution
$$ y_h(x) = c_1\cos x + c_2\sin x $$
we then seek a particular solution of the form
$$ y_p(x) = u_1(x)\cos x + u_2(x)\sin x $$
Plugging in the solution and following the method, we arrive at the system of equations:
\begin{align} {u_1}'\cos x + {u_2}'\sin x &= 0 \\ -{u_1}'\sin x + {u_2}'\cos x &= \sin x \end{align}
Using Kramer's rule, we find
\begin{align} {u_1}' &= -\sin^2 x = \frac{-1+\cos 2x}{2} \\ {u_2}' &= \cos x\sin x = \frac{\sin 2x}{2} \end{align} 
Integrating gives
\begin{align} y_p(x) &= \left(-\frac{x}{2} + \frac{\sin 2x}{4} \right)\cos x - \frac{\cos 2x}{4}\sin x \\
&= -\frac{x}{2}\cos x + \frac{\sin 2x\cos x-\cos 2x\sin 2x}{4} \\
&= -\frac{x}{2}\cos x +\frac{\sin x}{4} \end{align}
We can disregard the second term, since it'll combine with the fundamental solution. Thus, the general solution is
$$ y(x) = -\frac{x}{2}\cos x + c_1\cos x + c_2\sin x $$
</s>