# Section 8.4 $\quad$ Differential Equations

In this section, we consider the first order differential equations.

A simple example of a differential equation is
\begin{equation*}
  \frac{d}{dt}x(t) = 2x(t).
\end{equation*}

The first order homogeneous system of differential equations is
\begin{eqnarray*}
% \nonumber to remove numbering (before each equation)
  x_1'(t) &=& a_{11}x_1(t) + a_{12}x_2(t) + \cdots a_{1n}x_n(t) \\
  x_2'(t) &=& a_{21}x_1(t) + a_{22}x_2(t) + \cdots a_{2n}x_n(t) \\
          & & \vdots \\
  x_2'(t) &=& a_{n1}x_1(t) + a_{n2}x_2(t) + \cdots a_{nn}x_n(t)
\end{eqnarray*}

### Example 1

Find the solution of the following system of differential equations
\begin{equation*}
  \left[
    \begin{array}{c}
      x_1' \\
      x_2' \\
      x_3' \\
    \end{array}
  \right] =
  \left[
        \begin{array}{rrr}
          3 & 0 & 0\\
          0 & -2 & 0\\
          0 & 0 & 4 \\
        \end{array}
      \right]
  \left[
    \begin{array}{c}
      x_1 \\
      x_2 \\
      x_3 \\
    \end{array}
  \right]
\end{equation*}


```python
from sympy import *

t = symbols('t');
x1 = Function('x1');
x2 = Function('x2');
x3 = Function('x3');
eq1 = x1(t).diff(t) - 3*x1(t);
eq2 = x2(t).diff(t) + 2*x2(t);
eq3 = x3(t).diff(t) - 4*x3(t);

dsolve([eq1, eq2, eq3])
```




    [x1(t) == C1*exp(3*t), x2(t) == C2*exp(-2*t), x3(t) == C3*exp(4*t)]



In general $A$ is not a diagonal matrix. Suppose that $A$ is diagonalizable.

### Example 2

Find the solution of the following system of differential equations
\begin{equation*}
  \left[
    \begin{array}{c}
      x_1' \\
      x_2' \\
      x_3' \\
    \end{array}
  \right] =
  \left[
        \begin{array}{rrr}
          0 & 1 & 0\\
          0 & 0 & 1\\
          8 & -14 & 7 \\
        \end{array}
      \right]
  \left[
    \begin{array}{c}
      x_1 \\
      x_2 \\
      x_3 \\
    \end{array}
  \right]
\end{equation*}


```python
from sympy import *

t = symbols('t');
x1 = Function('x1');
x2 = Function('x2');
x3 = Function('x3');
eq1 = x1(t).diff(t) - x2(t);
eq2 = x2(t).diff(t) - x3(t);
eq3 = x3(t).diff(t) - 8*x1(t) + 14*x2(t) - 7*x3(t);

dsolve([eq1, eq2, eq3])
```




    [x1(t) == C1*exp(t) + C2*exp(2*t) + C3*exp(4*t),
     x2(t) == C1*exp(t) + 2*C2*exp(2*t) + 4*C3*exp(4*t),
     x3(t) == C1*exp(t) + 4*C2*exp(2*t) + 16*C3*exp(4*t)]



### Example 3

Find the solution of the following system of differential equations
\begin{equation*}
  \left[
    \begin{array}{c}
      x_1' \\
      x_2' \\
      x_3' \\
    \end{array}
  \right] =
  \left[
        \begin{array}{rrr}
          1 & 0 & 0\\
          0 & 3 & -2\\
          0 & -2 & 3 \\
        \end{array}
      \right]
  \left[
    \begin{array}{c}
      x_1 \\
      x_2 \\
      x_3 \\
    \end{array}
  \right]
\end{equation*}


```python
from sympy import *

t = symbols('t');
x1 = Function('x1');
x2 = Function('x2');
x3 = Function('x3');
eq1 = x1(t).diff(t) - x1(t);
eq2 = x2(t).diff(t) - 3*x2(t) + 2*x3(t);
eq3 = x3(t).diff(t) + 2*x2(t) - 3*x3(t);

dsolve([eq1, eq2, eq3])
```




    [x1(t) == C1*exp(t) + C2*t*exp(t),
     x2(t) == C2*exp(t) - C3*exp(5*t),
     x3(t) == C2*exp(t) + C3*exp(5*t)]



8e180afe7bc4756fcca047cbbfde615585900e06
ipynb
Jupyter Notebook
Jupyter_Notes/Lecture39_Sec8-4_DiffEq.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture39_Sec8-4_DiffEq.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture39_Sec8-4_DiffEq.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Qwen/Qwen-72B
1. YES
2. YES