Solving systems of linear ODEs by matrix methods

We can write this in vector form $$ \dv Y = M\v Y + \v F$$ where $$ \v Y = \pmat{y_1\\y_2}, \v F = \pmat{ f_1 \\ f_2 }, M = \pmat{a&b \\ c&d}. $$

To look for complementary solution $\v Y_c$, we guess $$ \v Y_c = \v v e^{\lambda t}.$$ Then $$ M\v v = \lambda\v v, $$ so $\lambda$ is an eigenvalue of $M$ and $\v v$ is the eigenvector.

If there are $n$ distinct eigenvalues, then there will be $n$ linearly independent complimentary functions.

If the forcing term is a complementary function, then try $\v Y_p = (\v a + \v bt)e^{\lambda t}$.

Example