Non homogeneous systems of linear ODE with constant coefficients

A linear system of differential equations is an ODE (ordinary differential equation) of the type: $$$x'(t)=A(t)\cdot x+ b(t)$$$ Where, $$A(t)$$ is a matrix, $$n \times n$$, of functions of the variable $$t$$, $$b (t)$$ is a dimension $$n$$ vector of functions of the variable $$t$$, and $$x$$ is a vector of dimension $$n$$ that is the function that we want to find.

An example of system of linear ODE would be: $$$\begin{pmatrix}x \\ y \end{pmatrix}'= \begin{pmatrix} 0 & \ln t \\ -e^t & 3 \cos t \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix}+\begin{pmatrix} e^t \\ 3e^t \end{pmatrix}$$$

A linear system of dimension $$n$$ has $$n$$ linearly independent solutions and solving the system means finding all of them. Any solution is a linear combination of these $$n$$ solutions. Therefore, given a vector of initial conditions ($$n$$), we will determine the $$n$$ constants and will find the exact solution.

When we solve a linear system we will place the $$n$$ vectors that are the solution (linearly independent) in the columns of a matrix, the so-called fundamental matrix of the system ($$n \times n$$). Therefore, solving the system is to find the fundamental matrix. By multiplying this matrix by a vector of arbitrary constants we will have the general solution.

An important property of the fundamental matrices is that if we multiply a fundamental matrix by a constant matrix with a determinant different from zero, the result is another fundamental matrix (it is important that the constant matrix multiplies from the right, if not this is not true).

There are no explicit methods to solve these types of equations, (only in dimension 1). Nevertheless, there are some particular cases that we will be able to solve: Homogeneous systems of ode's with constant coefficients, Non homogeneous systems of linear ode's with constant coefficients, and Triangular systems of differential equations.

In this unit we are going to explain the Non homogeneous systems of linear ode's with constant coefficients.

Let's suppose that we have the following system to be solved:$$$x'=A \cdot x+b(x)$$$

An example would be: $$$\begin{pmatrix} x \\ y \end{pmatrix}'=\begin{pmatrix} 0 & 1 \\ -1 & 2 \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix} +\begin{pmatrix} e^t \\ 3e^t\end{pmatrix}$$$

To solve it, we will follow the same steps as in a linear equation. We will find the general solution of the homogeneous part and after that we will find a particular solution of the non homogeneous system.

Let's consider the homogeneous problem: $$$x'=A \cdot x$$$ Following the steps of the previous level, we find the main matrix of the system $$\phi_h(t)$$.

We know then that the general solution of the homogeneous part is: $$$x_h(t)=\phi_h(t) \cdot C$$$ where $$C$$ is a vector of constants.

Now we look for a particular solution of the form $$$x_p(t)=\phi_h(t)\cdot u(t)$$$ Let's designate as a solution: $$$\left .\begin{array}{r} x_p'=A\cdot x_p+b(t)=A\cdot \phi_h(t)\cdot u(t)+b(t) \\ x_p'= \phi_h(t) \cdot u(t)+\phi_h(t) \cdot u'(t)=A \cdot \phi_h(t)\cdot u(t)+\phi_h(t)\cdot u'(t) \end{array} \right\}$$$ $$$ \Rightarrow \phi_h(t) \cdot u'(t)=b(t) \Rightarrow u(t)=\int \Big(\phi_h(t)\Big) ^{-1} \cdot b(t) \cdot dt $$$

Then, the general solution is: $$$x(t)=x_h(t)+x_p(t)=\phi_h(t) \cdot C+ \phi_h(t) \cdot \int \Big(\phi_h(t)\Big) ^{-1} \cdot b(t) \cdot dt$$$

Let's come back to the initial example.

We have, according to our notation: $$$A=\begin{pmatrix} 0 & 1 \\ -1 & 2 \end{pmatrix} \ b(t)=\begin{pmatrix} e^t \\ 3e^t \end{pmatrix}$$$ We know how to solve the homogeneous part of this problem; the fundamental matrix was: $$$\phi_h(t)=e^t\begin{pmatrix} t & 1 \\ t+1 & 1 \end{pmatrix}$$$ Now we look for a particular solution.

The theory says that we should look for a solution of the type $$$\begin{pmatrix} x_p(t) \\ y_p(t) \end{pmatrix}= \phi_h (t) \cdot \begin{pmatrix} u_1(t) \\ u_2(t) \end{pmatrix}$$$ knowing that $$$\begin{pmatrix} u_1(t) \\ u_2(t) \end{pmatrix}=\int \phi_h^{-1} (t) \cdot b(t) \cdot dt$$$ Calculating first $$$\displaystyle \phi_h^{-1}(t)=\frac{1}{-e^{2t}}\begin{pmatrix} e^t & -e^t \\ -e^t-t\cdot e^t & t \cdot e^t\end{pmatrix}=\begin{pmatrix} -e^{-t} & e^{-t} \\ e^{-t}-t\cdot e^t & -te^{-t}\end{pmatrix} = e^{-t} \begin{pmatrix} -1 & 1 \\ 1+t & -t \end{pmatrix}$$$ we have: $$$\displaystyle \phi_h^{-1}(t)\cdot b(t)= e^{-t} \begin{pmatrix} -1 & 1 \\ 1+t & -t \end{pmatrix}\cdot e^t \begin{pmatrix}1 & 3\end{pmatrix}=\begin{pmatrix}2 \\ 1+t-3t\end{pmatrix}=\begin{pmatrix}2 \\ 1-2t\end{pmatrix}$$$ Therefore: $$$\displaystyle \begin{pmatrix}u_1(t) \\ u_2(t) \end{pmatrix}= \begin{pmatrix}\int 2 \cdot dt \\ \int (1-2t)\cdot dt \end{pmatrix}=\begin{pmatrix}2t \\ t-t^2\end{pmatrix}$$$ and, finally: $$$\begin{pmatrix}x_p(t) \\ y_p(t) \end{pmatrix}=\phi_h(t) \cdot \begin{pmatrix}u_1(t) \\ u_2(t) \end{pmatrix}=e^t\begin{pmatrix} t & 1 \\ t+1 & 1 \end{pmatrix} \cdot \begin{pmatrix}2t \\ t-t^2\end{pmatrix}=$$$ $$$= e^t \cdot \begin{pmatrix}2t^2+t-t^2 \\ 2t^2+2t+t-t^2 \end{pmatrix}=e^t \begin{pmatrix}t^2+t \\ t^2+3t \end{pmatrix} $$$

Thus the general solution of the system will be the sum of the homogeneous solution and the particular one. $$$ \begin{pmatrix}y(t) \\ x(t) \end{pmatrix}= e^t\begin{pmatrix}t & 1 \\ t+1 & 1 \end{pmatrix}\cdot \begin{pmatrix} C_1 \\ C_2 \end{pmatrix}+e^t\begin{pmatrix}t^2+t \\ t^2+3t\end{pmatrix}$$$