Given the following 2x2 system of differential equations,
$\begin{cases} \dot{x} = 4x-y \\ \dot{y} = 2x+y \end{cases}$
A solution is easy to fins by computing eigenvalues and eigenvectors of the associated matrix A
$A = \begin{bmatrix} 4 & -1 \\ 2 & 1 \end{bmatrix}$.
Therefore, knowing that eigenvalues are 2 and 3, and the related eigenvectors are $\begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$ respectively, the solution is of the form
$Ae^{2t}\begin{bmatrix} 1 \\ 2 \end{bmatrix}+Be^{3t}\begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
What about if I make the initial system of equations non-autonomous? Resulting in something as follows
$\begin{cases} \dot{x} = 4x-y \\ \dot{y} = 2x+y +f(t) \end{cases}$
where f(t) can be either a polynomial on t, an exponential ($e^{at}$) or a trigonometric function ($sin(at)$ or $cos(at)$).
What is now the procedure to follow this system of differential equations? For example, let $f(t)=t^2$.
How do I solve the following system of differential equations?
$\begin{cases} \dot{x} = 4x-y \\ \dot{y} = 2x+y+t^2 \end{cases}$