6Another way to find particular solution is by gussing. But problem asks to use the variation of parameters method. But this is how the guessing method would work: Let \[ x_{p}=A\sin t+B\cos t \] And \[ y_{p}=C\sin t+D\cos t \] Then \(x_{p}^{\prime }=A\cos t-B\sin t\) and \(y_{p}^{\prime }=C\cos t-D\sin t\) and the ODE system becomes\begin{align*} A\cos t-B\sin t & =3\left ( A\sin t+B\cos t\right ) +\left ( C\sin t+D\cos t\right ) -2\sin \left ( t\right ) \\ C\cos t-D\sin t & =4\left ( A\sin t+B\cos t\right ) +3\left ( C\sin t+D\cos t\right ) +6\cos \left ( t\right ) \end{align*}
comparing coefficients\begin{align*} \sin t\left ( -B-3A-C\right ) +\cos \left ( t\right ) \left ( A-3B-D\right ) & =-2\sin \left ( t\right ) \\ \sin t\left ( -D-4A-3C\right ) +\cos t\left ( C-4B-3D\right ) & =6\cos \left ( t\right ) \end{align*}
Hence\begin{align*} -B-3A-C & =-2\\ A-3B-D & =0\\ -D-4A-3C & =0\\ C-4B-3D & =6 \end{align*}
4 equations in 4 unknowns\[\begin{pmatrix} -3 & -1 & -1 & 0\\ 1 & -3 & 0 & -1\\ -4 & 0 & -3 & -1\\ 0 & -4 & 1 & -3 \end{pmatrix}\begin{pmatrix} A\\ B\\ C\\ D \end{pmatrix} =\begin{pmatrix} -2\\ 0\\ 0\\ 6 \end{pmatrix} \] The solution is \[\begin{pmatrix} A\\ B\\ C\\ D \end{pmatrix} =\begin{pmatrix} 0\\ 1\\ 1\\ -3 \end{pmatrix} \] Therefore \begin{align*} x_{p} & =A\sin t+B\cos t\\ & =\cos t \end{align*}
and\begin{align*} y_{p} & =C\sin t+D\cos t\\ & =\sin t-3\cos t \end{align*}