## Solving a Non Homogeneous System of First Order Coupled Differential Equations

Suppose we have a non homogeneous system of linear differential equations. We can solve the system by expressing the solution of the solution to the homogeneous system, and any solution to the non homogeneous system.<br /> Suppose we have the system of coupled differential equations.<br />
$\dot{x}=3x+2y+1$
<br />
$\dot{y}=2x+3y+2$
<br />To solve this system, we need to diagonalise the coefficient matrix
$M= \left( \begin{array}{cc} 3 &amp; 2 &amp; \\ 2 &amp; 3 \end{array} \right)$
. Write the system in matrix form as
$\begin{pmatrix}\dot{x}\\ \dot{y} \end{pmatrix}= \left( \begin{array}{cc} 3 &amp; 2 \\ 2 &amp; 3 \end{array} \right) \begin{pmatrix}x\\ y \end{pmatrix}$
<br /> The eigenvalues of the matrix are the solutions to
$det(\left( \begin{array}{cc} 3 &amp; 2 \\ 2 &amp; 3 \end{array} \right) - \lambda \left( \begin{array}{cc} 1 &amp; 0 \\ 0 &amp; 1 \end{array} \right))=0 \rightarrow det(\left( \begin{array}{cc} 3- \lambda &amp; 2 \\ 2 &amp; 3- \lambda \end{array} \right))=0 \rightarrow (3- \lambda)^2-4=\lambda^2-6 \lambda +5=0$
<br /> This expression in
$\lambda$
factorises as
$(\lambda-5)(\lambda -1)=0$
and we solve the equation, obtaining
$\lambda=5, \: 1$
<br /> Now find the eigenvectors for each eigenvalue.<br /> For
$\lambda=5$
, solve
$(\left( \begin{array}{cc} 3 &amp; 2 \\ 2 &amp; 3 \end{array} \right) - 5 \left( \begin{array}{cc} 1 &amp; 0 \\ 0 &amp; 1 \end{array} \right)) \mathbf{v} =\mathbf{0}$
for
$\mathbf{v}=\begin{pmatrix}x\\y\end{pmatrix}$
.<br />
$\left( \begin{array}{cc} -2 &amp; 2 \\ 2 &amp; -2 \end{array} \right)\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}-2x+2y\\2x-2y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$
<br /> Hence
$x=y$
and we can take the eigenvector corresponding to the eigenvector 5 as
$\begin{pmatrix}1\\1\end{pmatrix}$
.<br /> For
$\lambda=1$
, solve
$(\left( \begin{array}{cc} 3 &amp; 2 \\ 2 &amp; 3 \end{array} \right) - 1 \left( \begin{array}{cc} 1 &amp; 0 \\ 0 &amp; 1 \end{array} \right)) \mathbf{v} =\mathbf{0}$
for
$\mathbf{v}=\begin{pmatrix}x\\y\end{pmatrix}$
.<br />
$\left( \begin{array}{cc} 2 &amp; 2 \\ 2 &amp; 2 \end{array} \right)\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}2x+2y\\2x+2y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$
<br /> Hence
$x=-y$
and we can take the eigenvector corresponding to the eigenvector 5 as
$\begin{pmatrix}1\\-1\end{pmatrix}$
.<br /> The matrix of eigenvectors is
$P= \left( \begin{array}{cc} 1 &amp; 1 \\ 1 &amp; -1 \end{array} \right)$
.<br /> At the moment our system takes the form
$\dot{\mathbf{v}}=M \mathbf{v}$
.<br /> Let
$\mathbf{w}=P^{-1} \mathbf{v}$
so that
$\mathbf{v}=P \mathbf{w}$
&amp;. The system becomes
$P \mathbf{v}=M P \mathbf{w} \rightarrow \mathbf{w}=P^{-1}MP \mathbf{w}$
.<br />
$P^{-1}MP$
will be a diagonal matrix with entries equal to the eigenvalues of
$M$
and
$\mathbf{w}$
will be an elementary basis vector. The new system will be
$\begin{pmatrix}\dot{w_1} \\\dot{w_2} \end{pmatrix}=\left( \begin{array}{cc} 5 &amp; 0 \\ 0 &amp; 1 \end{array} \right) \begin{pmatrix}w_1\\w_2\end{pmatrix}$
.<br /> This is equivalent to the system<br />
$\dot{w_1}=5w_1$
<br />
$\dot{w_1}=1w_1$
<br /> The solutions are
$w_1=Ae^{5t}, w_2=B e^t$
<br /> Then
$\mathbf{v}'=P \mathbf{w} = \left( \begin{array}{cc} 1 &amp; 1 \\ 1 &amp; -1 \end{array} \right) \begin{pmatrix}Ae^{5t}\\Be^t\end{pmatrix} =\begin{pmatrix}Ae^{5t}+Be^t\\Ae^{5t}-Be^t\end{pmatrix}$
<br /> Now assume a solution to the non homogeneous system of the form
$x_p=C_1, \: y_p=C_2$
. Substitute these into the problem.<br /> Equation (1)<br />
$0=3C_1+2C_2+1=0$
<br /> Equating coefficients of
$t$
gives<br />
$0=2C_1+3C_2+1 \rightarrow 2C_1+3C_2=-1$
$0=3C_1+2C_2+2 \rightarrow 3C_1+2C_2=-2$
<br /> Solving these gives
$C_1=- \frac{4}{5}, \: C_2= \frac{1}{5}$
<br /> The general solution is then
$x=Ae^{5t}+Be^t- \frac{4}{5}, \: y=Ae^{5t}-Be^t+ \frac{1}{5}$