I am given the equation $$ y''+y = x\cos x - \cos x $$ with initial values of $$y(0)=1, y'(0)= 1/4,$$and I believe this needs to be solved using the method of variation of parameters, though I'm unsure, because after solving the characteristic equation $$m^2+1 =0$$ $$m = -i, i$$ I'm left with $$y_h = C_1\sin x + C_2\cos x,$$and I'm not sure where to move forward from there. I tried taking the Wronskian ($W=1$), and finding $W_1, W_2$ but I'm getting stuck on extremely long integrals to find $u_1, u_2$.
Any help for next steps or an alternative method would be greatly appreciated.
Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form: $$y_p=(Ax+B)\sin x + (Cx+D)\cos x$$ but since (a part of) this solution is already contained in the homogeneous solution, you alter this to: $$\begin{align}y_p & =(Ax+B)\color{red}{x}\sin x + (Cx+D)\color{red}{x}\cos x \\ & =(Ax^2+Bx)\sin x + (Cx^2+Dx)\cos x \end{align}$$ Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.