# the general solution to the system $x'=Ax+g(t)$ for the given matrix $A$ and vector $g(t)$

Determine the general solution to the system $x'=Ax+g(t)$ for the given matrix $A$ and vector $g(t)$ below.

$\mathbf{A} = \left( \begin{array}{ccc} 2 & -5 \\ 1 & -2 \end{array} \right)$ , $\mathbf{g(t)} = \left( \begin{array}{ccc} -\cos(t) \\ \sin(t) \end{array} \right)$

Attempt: if $\mathbf{x(t)} = \left( \begin{array}{ccc} x_1(t) \\ x_2(t) \end{array} \right)$ and $\mathbf{x'(t)} = \left( \begin{array}{ccc} x_1'(t) \\ x_2'(t) \end{array} \right)$ then we have

$x_1'(t)=2x_1(t)-5x_2(t)-\cos t$

$x_2'(t)=x_1(t)-2x_2(t)+\sin t$

How do we solve this system? Thanks!

• do you know how to find two solutions of the homogeneous system $x' = Ax?$ – abel Jun 9 '15 at 14:53
• I do not remember but I found how the method works from my book. – Ergin Suer Jun 9 '15 at 14:56
• You can diagonalise and work in the complex domain to solve the problem. The matrix above has eigenvectors $(5 , 2\pm i)^T$. This lets you compute $e^{At}$. – copper.hat Jun 9 '15 at 15:13

I'm assuming you know how to solve the homogeneous system $$x_h' = Ax_h$$ as $$x_h=e^{At}$$
HINT: Use eigenvalues/eigenvectors. Once you have the answer to the homogeneous solution, you can compute the final solution by noting that $$x = x_h+x_p$$ where $x_p$ is a particular solution to this nonhomogeneous system. Guessing $$x_p = \left(\begin{array}{ccc} c_1\cos{t}+c_2\sin{t}\\c_3\cos{t}+c_4\sin{t}\end{array}\right)$$ and plugging into the original system $x_p'=Ax_p+g$ will allow us to solve for these coefficients and therefore the particular solution.
• How do you guess the matrix $x_p$? Do you recommend some book about this? – Ergin Suer Jun 9 '15 at 16:14
• You guess the particular solution vector (note: NOT a matrix) by looking at the forcing vector (or vector in your original system that is causing it to not be homogeneous). In this case, your $g(t)$ is a vector of cosines and sines, so you guess that your particular solution will be too. You probably already did this for single differential equations before learning about matrices. – NoseKnowsAll Jun 9 '15 at 16:23
• I couldn't find the coefficients $c_1, c_2, c_3$ and $c_4$ by using the two equations. – Ergin Suer Jun 9 '15 at 17:11