# Express the system as a matrix equation: x_1' - 2 x_1 + (t + e^t) x_2 - t = 0 x_2' + t x_1 + sin...

## Question:

Express the system as a matrix equation:

{eq}\displaystyle x_1' - 2 x_1 + (t + e^t) x_2 - t = 0\\ x_2' + t x_1 + \sin t x_2 - \cos t = 0 {/eq}.

## Linear System of Differential Equations:

Let {eq}n {/eq} be a linear differential equation with {eq}n {/eq} unknowns

{eq}\begin{eqnarray} \frac{x_1}{dt}&=& a_{11}(t)x_1+a_{12}(t)x_2+...+a_{1n}(t)x_n +f_1(t)\\ \frac{x_2}{dt}&=& a_{21}(t)x_1+a_{22}(t)x_2+...+a_{2n}(t)x_n +f_2(t)\\ \vdots &=& \vdots\\ \frac{x_n}{dt}&=& a_{n1}(t)x_1+a_{n2}(t)x_2+...+a_{n n}(t)x_n +f_n(t)\\ \end{eqnarray} {/eq}

This system is called a linear system. In matrix form, the linear system can be written as:

{eq}X'(t)=A \; X(t)+F {/eq}

Where:

{eq}\begin{eqnarray} X=\begin{bmatrix} x_1(t)\\ x_2(t)\\ \vdots\\ x_n(t) \end{bmatrix}, \; & A=\begin{bmatrix} a_{11}(t)&a_{12}&\dots & a_{1n}(t)\\ a_{21}(t)&a_{22}&\dots & a_{2n}(t)\\ \vdots & & &\vdots\\ a_{n1}(t)&a_{n2}&\dots & a_{n n}(t)\\ \end{bmatrix}, \; **** F=\begin{bmatrix} f_1(t)\\ f_2(t)\\ \vdots\\ f_n(t) \end{bmatrix} \end{eqnarray} {/eq}

Let the system

{eq}\begin{eqnarray} -x'_1(t)+a_{11}(t)x_1+a_{12}(t)x_2(t)+f_1(t)=0\\ -x'_2(t)+a_{21}(t)x_1+a_{22}(t)x_2(t)+f_2(t)=0 \end{eqnarray} {/eq}

The system can be written as a matrix equation

{eq}\begin{eqnarray} \begin{bmatrix} x'_1(t)\\ x'_2(t) \end{bmatrix} = \begin{bmatrix} a_{11}(t)&a_{12}(t)\\ a_{21}(t)&a_{22}(t) \end{bmatrix}\begin{bmatrix} x_1\\ x_2 \end{bmatrix}+\begin{bmatrix} f_1(t)\\ f_2(t) \end{bmatrix} \end{eqnarray} {/eq}

In this case,

{eq}\begin{eqnarray} \begin{matrix} x_1' - 2 x_1 + (t + e^t) x_2 - t = 0\\ x_2' + t x_1 + \sin t x_2 - \cos t = 0 \end{matrix}\Rightarrow \begin{matrix} x_1'= 2 x_1 - (t + e^t) x_2 + t \\ x_2' =- t x_1 - \sin t x_2 + \cos t \end{matrix} \end{eqnarray} {/eq}.

Note that,

{eq}\begin{eqnarray} a_{11}(t)=2,\; & a_{12}(t)=-(t+e^t), \; a_{21}(t)=-t , \; a_{22}(t)=\sin(t) \end{eqnarray} {/eq} and {eq}\begin{eqnarray} f_1(t)=t, \; f_2(t)=\cos(t) \end{eqnarray} {/eq}.

The system can be written in matrix form

{eq}\begin{eqnarray} \begin{bmatrix} x_1'(t)\\ x_2'(t) \end{bmatrix}=\begin{bmatrix} 2 & - (t + e^t) \\ - t & - \sin(t)\\ \end{bmatrix}\begin{bmatrix} x_1(t)\\ x_2(t)\\ \end{bmatrix}+\begin{bmatrix} t \\ \cos(t) \end{bmatrix} \end{eqnarray} {/eq}