Solve \begin{cases} x'=2x+4y+\cos t\\ y'=-x-2y+\sin t \end{cases} Solve
\begin{cases}
x'=2x+4y+\cos t\\
y'=-x-2y+\sin t
\end{cases}
My solution:
First I solve :
\begin{cases}
x'=2x+4y\\
y'=-x-2y
\end{cases}
$$\begin{pmatrix} {x'}\\ {y'} 
 \end{pmatrix}=\begin{pmatrix} {2} & 4\\ {-1} & -2
 \end{pmatrix} \begin{pmatrix} {x}\\ {y} 
 \end{pmatrix}$$
The eigenvalue is $0$.
The eigevector is \begin{pmatrix} {-2}\\ {1} 
 \end{pmatrix}
The generalized eigenvector is \begin{pmatrix} {0}\\ -{1\over 2} 
 \end{pmatrix}
Then, the solution is:
$y=c_1\begin{pmatrix} {0}\\ {-1\over 2} 
 \end{pmatrix} + c_2 \bigg [t\begin{pmatrix} {-2}\\ {1} 
 \end{pmatrix}+\begin{pmatrix} {0}\\ {-1\over 2} 
 \end{pmatrix}\bigg]$
Using variation of parameters method:
$$\begin{pmatrix} {0} & -2t\\ {-1\over 2} & t- {1\over 2}
 \end{pmatrix} \begin{pmatrix} {c'_1}\\ {c'_2} 
 \end{pmatrix}=\begin{pmatrix} {\cos t}\\ {\sin t} 
 \end{pmatrix}$$
\begin{cases}
-2tc'_2=\cos t\\
-\frac{1}{2} c'_1+ (t- {1\over 2})c'_2=\sin t
\end{cases}
$c'_2=\frac{cos t}{ -2t} \implies c_2=\int \frac{\cos t}{-2t}$
I don't know how to solve it
Where am I wrong?
Thanks !

$$\begin{cases}
x'=2x+4y+\cos t\\
y'=-x-2y+\sin t
\end{cases}$$
It's easier to add both equations:
$$x'+2y'=\cos t +2 \sin t$$
$$x+2y=\sin t -2 \cos t +C_1$$
$$
\begin{cases}
x(t)&=-2y+\sin t -2 \cos t +C_1 \\
x'(t)&=-2y'+\cos t +2 \sin t
\end{cases}
$$
$$x'-2x=4y + \cos t$$
$$ y'=2\cos t -C_1$$
$$\implies y(t)=2\sin t -C_1t+C_2$$
