To my grief this week I had a very incoherent class about differential equations and I find myself unable to solve
Problem: $$\begin{cases} x'(t)=2x(t)-y(t)+4t \\ y'(t)=x(t)+e^{-t} \end{cases} $$
I can rewrite the above system as: $$\begin{pmatrix}x'(t) \\ y'(t) \end{pmatrix} = \begin{pmatrix}2 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} x(t) \\ y(t) \end{pmatrix}+ \begin{pmatrix} 4t \\ e^{-t} \end{pmatrix}$$
The Matrix $A \in \mathbb{R}^{(2,2)}$ happens to be non diagonalizable, which is a pity because otherwise I might have been able to compute $\exp(At)$.
I figured out that for the homogeneous system I have Eigenvalue $1$ and Eigenvector (1,1). According to my class $$ z(t)=\exp(\lambda t)v $$ is a solution to the homogeneous differential equation where $\lambda =1$ and $v$ is the corresponding Eigenvector. Thus for the homogenous system: $$ z(t)=\begin{pmatrix}x(t) \\ y(t) \end{pmatrix} = c_1 e^t \begin{pmatrix} 1 \\ 1 \end{pmatrix}$$ Is the solution, which even checks out.
My next attempt would have been to use variation of constants but so far I have no luck with that method.
If I let $c(t)$ be the 'constant' then $x(t)=y(t)=c(t)e^t \implies x'(t)=y'(t)= c'(t)e^t+x(t)$ Plugging that back into my original differential equation I obtain that $$ c'(t)=2te^{-t} + \frac{1}{2}e^{-2t} \implies c(t) -2e^{-t}t - \frac{e^{-2t}}{4}-2e^{-t}$$ So my solution should be $$ x(t)=y(t)=-2t- \frac{1}{4}e^{-t}-2$$
But this does not check out