# 線性微分方程
Linear differential equation

This work by Jephian Lin is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
$\newcommand{\trans}{^\top}
\newcommand{\adj}{^{\rm adj}}
\newcommand{\cof}{^{\rm cof}}
\newcommand{\inp}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\dunion}{\mathbin{\dot\cup}}
\newcommand{\bzero}{\mathbf{0}}
\newcommand{\bone}{\mathbf{1}}
\newcommand{\ba}{\mathbf{a}}
\newcommand{\bb}{\mathbf{b}}
\newcommand{\bc}{\mathbf{c}}
\newcommand{\bd}{\mathbf{d}}
\newcommand{\be}{\mathbf{e}}
\newcommand{\bh}{\mathbf{h}}
\newcommand{\bp}{\mathbf{p}}
\newcommand{\bq}{\mathbf{q}}
\newcommand{\br}{\mathbf{r}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bz}{\mathbf{z}}
\newcommand{\bu}{\mathbf{u}}
\newcommand{\bv}{\mathbf{v}}
\newcommand{\bw}{\mathbf{w}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\nul}{\operatorname{null}}
\newcommand{\rank}{\operatorname{rank}}
%\newcommand{\ker}{\operatorname{ker}}
\newcommand{\range}{\operatorname{range}}
\newcommand{\Col}{\operatorname{Col}}
\newcommand{\Row}{\operatorname{Row}}
\newcommand{\spec}{\operatorname{spec}}
\newcommand{\vspan}{\operatorname{span}}
\newcommand{\Vol}{\operatorname{Vol}}
\newcommand{\sgn}{\operatorname{sgn}}
\newcommand{\idmap}{\operatorname{id}}
\newcommand{\am}{\operatorname{am}}
\newcommand{\gm}{\operatorname{gm}}
\newcommand{\mult}{\operatorname{mult}}
\newcommand{\iner}{\operatorname{iner}}$
```python
from lingeo import random_int_list, random_good_matrix
```
## Main idea
In this section, every function, such as $x$ and $y$, are from $\mathbb{R}$ to $\mathbb{R}$ in variable $t$.
We will use the notation $\dot{x}$ and $x'$ interchangeably for $\frac{dx}{dt}$.
Note that the derivative is taken with respect to $t$ but not to $x$.
Some differential equations are easy to be solved.
For example, the solution to the equation
$$
\dot{x} = kx
$$
is $x = C_1e^{kt}$ for any constant $C_1\in\mathbb{R}$.
And one may try that the solution to the equation
$$
\dot{x} = kx + C_1e^{kt}
$$
is $x = (C_2 + C_1t)e^{kt}$ for any constant $C_2\in\mathbb{R}$.
(To see these are _all_ the solutions relies on the Picard–Lindelöf theorem.)
Let $x_1$ and $x_2$ be functions in variable $t$.
The system
$$
\begin{aligned}
\dot{x}_1 &= ax_1 + bx_2 \\
\dot{x}_2 &= cx_1 + dx_2
\end{aligned}
$$
is called a **homogeneous system of first-order linear differential equation**.
One may write
$$
\bx = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, \quad
\dot{\bx} = \begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \end{bmatrix}, \text{ and}\quad
A = \begin{bmatrix}
a & b \\
c & d
\end{bmatrix}.
$$
Then the system becomes
$$
\dot{\bx} = A\bx.
$$
If $A$ is diagonalizable as $D = Q^{-1}AQ$, we may set $Q\by = \bx$ for some $\by = \begin{bmatrix} y_1 \\ y_2 \end{bmatrix}$.
Since $Q$ is a constant matrix, $\dot{\bx} = \dot{(Q\by)} = Q\dot{\by}$.
Thus, the original system becomes
$$
\dot{\by} = Q^{-1}AQ \by = D\by,
$$
which is much easier to be solved.
Once $\by$ is solved, $\bx$ can be found by $\bx = Q\by$.
## Side stories
- higher order differential equation
## Experiments
##### Exercise 1
執行以下程式碼。
<!-- eng start -->
Run the code below.
<!-- eng end -->
```python
### code
set_random_seed(0)
print_ans = False
lam1,lam2 = random_int_list(2, 3)
Q = random_good_matrix(2,2,2)
A = Q * diagonal_matrix([lam1, lam2]) * Q.inverse()
pretty_print(LatexExpr(r"\dot{x}_1 = (%s)x_1 + (%s)x_2"%(A[0,0],A[0,1])))
pretty_print(LatexExpr(r"\dot{x}_2 = (%s)x_1 + (%s)x_2"%(A[1,0],A[1,1])))
t = var("t")
y = vector([exp(lam1 * t), exp(lam2 * t)])
x = Q * y
pretty_print(LatexExpr("x_1 ="), x[0])
pretty_print(LatexExpr("x_2 ="), x[1])
if print_ans:
pretty_print(LatexExpr(r"\dot{x}_1 ="), x[0].derivative(t))
pretty_print(LatexExpr(r"\dot{x}_2 ="), x[1].derivative(t))
```
:::warning
Record the output equations here.
:::
By executing the given code above, we get
$\dot{x}_1 = (−3)x_1+(−30)x_2$
$\dot{x}_2 = (0)x_1+(3)x_2$
$x_1 = -5e^{3t}+e^{-3t}$
$x_2= e^{3t}.$
##### Exercise 1(a)
計算 $\dot{x}_1$ 及 $\dot{x}_2$。
<!-- eng start -->
Find $\dot{x}_1$ and $\dot{x}_2$.
<!-- eng end -->
<font color=#f00>Ans:</font>
By computation,
$$
\begin{aligned}
\dot{x}_1 &= \dot{(−5e^{3t}+e^{−3t})} = (-15)e^{3t}-3e^{-3t} \\
\dot{x}_2 &= \dot{(e^{3t})} =3e^{3t}.
\end{aligned}
$$
---
##### Exercise 1(b)
驗證題目給的 $x_1$ 和 $x_2$ 是否滿足給定的微分方程組。
<!-- eng start -->
Verify that $x_1$ and $x_2$ are solutions to the system of differential equations.
<!-- eng end -->
<font color="f300">Ans:</font>
$\dot{x}_1 = (-15)e^{3t}-3e^{-3t} = (−3)x_1+(−30)x_2 = \dot{x}_1$
$\dot{x}_2 = 3e^{3t} = (0)x_1+(3)x_2 = \dot{x}_2$
By the equation above, we can know that the given $x_1$ and $x_2$
satisfy the differential equations.
:::info
What do the experiments try to tell you? (open answer)
We can know that $x_1$ and $x_2$ satisfy the differential equations.
:::
:::warning
This part is not yet done.
:::
## Exercises
##### Exercise 2
解以下的微分方程組。
(請記得加上該有的常數。)
<!-- eng start -->
Solve the following differential equation. (Note that constant terms are important.)
<!-- eng end -->
##### Exercise 2(a)
已知
$$
\begin{bmatrix}
4 & 0 \\
0 & 6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
解微分方程組:
$$
\begin{aligned}
\dot{x}_1 &= 5x_1 - x_2 \\
\dot{x}_2 &= -x_1 + 5x_2
\end{aligned}
$$
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
4 & 0 \\
0 & 6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
Solve the system of differential equations:
$$
\begin{aligned}
\dot{x}_1 &= 5x_1 - x_2 \\
\dot{x}_2 &= -x_1 + 5x_2
\end{aligned}
$$
<!-- eng end -->
<font color="#f00">Ans:</font>
We begin by writing the system of differential equations in matrix form:
$$
\dot{\mathbf{x}} =
\begin{bmatrix}
5 & -1 \\ -
1 & 5
\end{bmatrix} \mathbf{x}.
$$
While
$$
\begin{bmatrix}
4 & 0 \\
0 & 6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix},
$$
we let
$$
\by =
\begin{bmatrix}
y_1 \\
y_2
\end{bmatrix} =
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\bx
$$
such that
$$ \begin{bmatrix}
\dot{y}_1 \\
\dot{y}_2 \\
\end{bmatrix}
=
\begin{bmatrix}
4 & 0 \\
0 & 6 \\
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix},
$$
and we can have
$$
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{4t} \\
c_2e^{6t} \\
\end{bmatrix}.
$$
Since
$$
\mathbf{x} =
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}
\mathbf{y},
$$
We can know that
$$
\begin{bmatrix}
x_1 \\
x_2 \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{4t}+c_2e^{6t} \\
c_1e^{4t}-c_2e^{6t} \\
\end{bmatrix}.
$$
:::warning
- [x] we can assume that there exists
$$
\mathbf{y} =
\begin{bmatrix}
y_1 \\
y_2
\end{bmatrix}
$$
-->
we let
$$
\by =
\begin{bmatrix}
y_1 \\
y_2
\end{bmatrix} =
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\bx
$$
:::
---
##### Exercise 2(b)
已知
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
解微分方程組:
$$
\begin{aligned}
\dot{x}_1 &= -x_1 + 5x_2 \\
\dot{x}_2 &= 5x_1 - x_2
\end{aligned}
$$
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
Solve the system of differential equations:
$$
\begin{aligned}
\dot{x}_1 &= -x_1 + 5x_2 \\
\dot{x}_2 &= 5x_1 - x_2
\end{aligned}
$$
<!-- eng end -->
##### Exercise 2(b)Answer here:)
Write the system of differential equations in matrix form:
$$
\dot{\bx} = A\bx.
$$
$$
\dot{\mathbf{x}} =
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
And it is known that
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
Because $A$ is diagonalizable as $D = Q^{-1}AQ$, we can set $Q\by = \bx$ for some $\by = \begin{bmatrix} y_1 \\ y_2 \end{bmatrix}$.
$$ \begin{bmatrix}
\dot{y}_1 \\
\dot{y}_2 \\
\end{bmatrix}
=
\begin{bmatrix}
4 & 0 \\
0 & -6 \\
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix},
$$
$$
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{4t} \\
c_2e^{-6t} \\
\end{bmatrix}.
$$
Since $Q$ is a constant matrix, $\dot{\bx} = \dot{(Q\by)} = Q\dot{\by}$.
$\dot{\by} = Q^{-1}AQ \by = D\by,$then $\bx = Q\by$.
$$
\bx=\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}\by.
$$
$$
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{4t} + c_2e^{-6t} \\
c_1e^{4t} - c_2e^{-6t} \\
\end{bmatrix}.
$$
##### Exercise 2(c)
已知
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
解微分方程組:
$$
\begin{aligned}
\dot{x}_1 &= x_1 + x_2 \\
\dot{x}_2 &= x_1 + x_2
\end{aligned}
$$
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}.
$$
Solve the system of differential equations:
$$
\begin{aligned}
\dot{x}_1 &= x_1 + x_2 \\
\dot{x}_2 &= x_1 + x_2
\end{aligned}
$$
<!-- eng end -->
<font color="#f00">Ans:</font>
We begin by writing the system of differential equations in matrix form:
$$
\dot{\mathbf{x}} =
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix} \mathbf{x}.
$$
While
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix},
$$
we can assume that there exists
$$ \mathbf{y} =
\begin{bmatrix}
y_1 \\
y_2
\end{bmatrix}
$$
we let
$$
\by =
\begin{bmatrix}
y_1 \\
y_2
\end{bmatrix} =
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}^{-1}
\bx
$$
such that
$$ \begin{bmatrix}
\dot{y}_1 \\
\dot{y}_2 \\
\end{bmatrix}
=
\begin{bmatrix}
2 & 0 \\
0 & 0 \\
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix},
$$
and we can have
$$
\begin{bmatrix}
y_1 \\
y_2 \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{2t} \\
c_2e^{0t} \\
\end{bmatrix}.
$$
Since
$$
\mathbf{x} =
\begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}
\mathbf{y},
$$
We can know that
$$
\begin{bmatrix}
x_1 \\
x_2 \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{2t}+c_2e^{0} \\
c_1e^{2t}-c_2e^{0} \\
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{2t}+c_2 \\
c_1e^{2t}-c_2 \\
\end{bmatrix}.
$$
:::warning
See 2(a).
:::
##### Exercise 3
解以下的微分方程組。
(請記得加上該有的常數。)
<!-- eng start -->
Solve the following differential equation. (Note that constant terms are important.)
<!-- eng end -->
##### Exercise 3(a)
已知
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}.
$$
解微分方程組:
$$
\begin{aligned}
\dot{x}_1 &= 4x_1 + 0x_2 - x_3 \\
\dot{x}_2 &= 0x_1 + 4x_2 - x_3 \\
\dot{x}_3 &= -x_1 - x_2 + 5x_3
\end{aligned}
$$
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}.
$$
Solve the system of differential equations:
$$
\begin{aligned}
\dot{x}_1 &= 4x_1 + 0x_2 - x_3 \\
\dot{x}_2 &= 0x_1 + 4x_2 - x_3 \\
\dot{x}_3 &= -x_1 - x_2 + 5x_3
\end{aligned}
$$
<!-- eng end -->
**[由孫心提供]**
##### Exercise 3(a)-- answer here:
We rewrite the questions as
$$ \begin{bmatrix}
\dot{x}_1 \\
\dot{x}_2 \\
\dot{x}_3
\end{bmatrix}
=
\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}.$$
According to the known conditions, we can get the eigendecomposition $QDQ^{-1}$ of the matrix can be obtained as
$$
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}.
$$
Let
$$
\dot{\bx} = \dot{(Q\by)} = Q\dot{\by},\ \dot{\by} = Q^{-1}AQ \by = D\by.
$$
Then
$$ \begin{bmatrix}
\dot{y}_1 \\
\dot{y}_2 \\
\dot{y}_3
\end{bmatrix}
=
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 \\
y_3
\end{bmatrix},$$
$$ \begin{bmatrix}
y_1 \\
y_2 \\
y_3
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{3t} \\
c_2e^{4t} \\
c_3e^{6t}
\end{bmatrix}$$
$$
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{3t}+c_2e^{4t}+ c_3e^{6t} \\
c_1e^{3t}-c_2e^{4t}+ c_3e^{6t} \\
c_1e^{3t}-2c_3e^{6t}
\end{bmatrix}.
$$
---
##### Exercise 3(b)
已知
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}.
$$
解微分方程組:
$$
\begin{aligned}
\dot{x}_1 &= 2x_1 - 2x_2 + 3x_3 \\
\dot{x}_2 &= -2x_1 + 2x_2 + 3x_3 \\
\dot{x}_3 &= 3x_1 + 3x_2 - 3x_3
\end{aligned}
$$
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}.
$$
Solve the system of differential equations:
$$
\begin{aligned}
\dot{x}_1 &= 2x_1 - 2x_2 + 3x_3 \\
\dot{x}_2 &= -2x_1 + 2x_2 + 3x_3 \\
\dot{x}_3 &= 3x_1 + 3x_2 - 3x_3
\end{aligned}
$$
<!-- eng end -->
**[由孫心提供]**
##### Exercise 3(b)-- answer here:
Equivalent to the previous question, we rewrite the question as $$\dot{\bx}==
\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}\bx.$$
We know that
$$
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
1 & -1 & 1 \\
1 & 0 & -2
\end{bmatrix}^{-1}
$$
is the eigen decomposition of $QDQ^{-1}$$$\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}.$$
Let
$$\dot{\bx} = \dot{(Q\by)} = Q\dot{\by},\dot{\by} = Q^{-1}AQ \by = D\by.
$$
THen
$$ \begin{bmatrix}
\dot{y}_1 \\
\dot{y}_2 \\
\dot{y}_3
\end{bmatrix}
=
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 \\
y_3
\end{bmatrix},$$
$$ \begin{bmatrix}
y_1 \\
y_2 \\
y_3
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{3t} \\
c_2e^{4t} \\
c_3e^{-6t}
\end{bmatrix}$$
$$
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}
=
\begin{bmatrix}
c_1e^{3t}+c_2e^{4t}+ c_3e^{-6t} \\
c_1e^{3t}-c_2e^{4t}+ c_3e^{-6t} \\
c_1e^{3t}-2c_3e^{-6t}
\end{bmatrix}.
$$
##### Exercise 4
對於高階的線性微分方程 $y'' + c_1 y' + c_2 y = 0$,
我們也可以寫成矩陣形式。
令
$$
\by = \begin{bmatrix} y \\ y' \end{bmatrix}, \quad
\dot{\by} = \begin{bmatrix} y' \\ y'' \end{bmatrix},\text{ and}\quad
A = \begin{bmatrix}
0 & 1 \\
-c_2 & -c_1
\end{bmatrix}.
$$
則原方程式可以改寫為
$$
\dot{\by} = A\by.
$$
解以下的微分方程。
<!-- eng start -->
For the higher-order differential equation $y'' + c_1 y' + c_2 y = 0$, we may let
$$
\by = \begin{bmatrix} y \\ y' \end{bmatrix}, \quad
\dot{\by} = \begin{bmatrix} y' \\ y'' \end{bmatrix},\text{ and}\quad
A = \begin{bmatrix}
0 & 1 \\
-c_2 & -c_1
\end{bmatrix}.
$$
Then the differential equation can be written as
$$
\dot{\by} = A\by.
$$
Solve the following differential equations.
<!-- eng end -->
##### Exercise 4(a)
已知
$$
\begin{bmatrix}
2 & 0 \\
0 & 3
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
3 & 2
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-6 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
3 & 2
\end{bmatrix}.
$$
考慮微分方程 $y'' - 5y' + 6y = 0$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
2 & 0 \\
0 & 3
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
3 & 2
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-6 & 5
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
3 & 2
\end{bmatrix}.
$$
Consider the differential equation $y'' - 5y' + 6y = 0$.
<!-- eng end -->
**[由孫心提供]**
##### Exercise 4(a)-- answer here:
Let
$$
A = \begin{bmatrix}
0 & 1 \\
-6 & 5
\end{bmatrix},\
Q = \begin{bmatrix}
1 & 1 \\
2 & 3
\end{bmatrix}.
$$
And it can be seen from the question
$$
Q^{-1}AQ = \begin{bmatrix}
2 & 0 \\
0 & 3
\end{bmatrix}.
$$
Set $\bx$ let
$$
\bz = Q\bx, \\
\bz = \begin{bmatrix}
z \\
z'
\end{bmatrix},\
\bx =
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
And $\bz' = (Q\bx)' = Q\bx'$ .
By the differential equations $y'' - 5y' + 6y = 0$, we can know that $\bz' = A\bz$, and we can get that
$$
Q\bx' = AQ\bx\ ,\ \bx' = Q^{-1}AQ\bx.
$$
It is
$$
\begin{bmatrix}
{x_1}' \\
{x_2}'
\end{bmatrix} =
\begin{bmatrix}
2 & 0 \\
0 & 3
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
So we would know $x_1 = c_1e^{2t}, \ x_2 = c_2e^{3t}$ .
Since $\bz = Q\bx$ and $y$ is the first entry of $\bz$, we can get
$$
y = c_1e^{2t} + c_2e^{3t}\ .
$$
##### Exercise 4(b)
已知
$$
\begin{bmatrix}
2 & 0 \\
0 & -2
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
2 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-4 & 0
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
2 & -2
\end{bmatrix}.
$$
考慮微分方程 $y'' + 0y' + 4y = 0$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
2 & 0 \\
0 & -2
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 \\
2 & -2
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-4 & 0
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
2 & -2
\end{bmatrix}.
$$
Consider the differential equation $y'' + 0y' + 4y = 0$.
<!-- eng end -->
**[由孫心提供]**
##### Exercise 4(b)-- answer here:
Let
$$
A = \begin{bmatrix}
0 & 1 \\
4 & 0
\end{bmatrix},\
Q = \begin{bmatrix}
1 & 1 \\
2 & -2
\end{bmatrix}.
$$
And it can be seen from the question
$$
Q^{-1}AQ = \begin{bmatrix}
2 & 0 \\
0 & -2
\end{bmatrix}.
$$
Set $\bx$ let
$$
\bz = Q\bx, \\
\bz = \begin{bmatrix}
z \\
z'
\end{bmatrix},\
\bx =
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
And $\bz' = (Q\bx)' = Q\bx'$ 。
By the differential equations $y'' + 0y' + 4y = 0$, we can know that $\bz' = A\bz$, and we can get that
$$
Q\bx' = AQ\bx\ ,\ \bx' = Q^{-1}AQ\bx.
$$
It is
$$
\begin{bmatrix}
{x_1}' \\
{x_2}'
\end{bmatrix} =
\begin{bmatrix}
2 & 0 \\
0 & -2
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
So we would know $x_1 = c_1e^{2t},\ x_2 = c_2e^{-2t}$.
Since $\bz = Q\bx$ and $y$ is the first entry of $\bz$, we can get
$$
y = c_1e^{2t} + c_2e^{-2t}\ .
$$
##### Exercise 4(c)
已知
$$
\begin{bmatrix}
2 & 1 \\
0 & 2
\end{bmatrix}
=
\begin{bmatrix}
2 & -1 \\
4 & 0
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-4 & 4
\end{bmatrix}
\begin{bmatrix}
2 & -1 \\
4 & 0
\end{bmatrix}.
$$
考慮微分方程 $y'' - 4y' + 4y = 0$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
2 & 1 \\
0 & 2
\end{bmatrix}
=
\begin{bmatrix}
2 & -1 \\
4 & 0
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-4 & 4
\end{bmatrix}
\begin{bmatrix}
2 & -1 \\
4 & 0
\end{bmatrix}.
$$
Consider the differential equation $y'' - 4y' + 4y = 0$.
<!-- eng end -->
**[由孫心提供]**
##### Exercise 4(c)-- answer here:
Let
$$
A = \begin{bmatrix}
0 & 1 \\
-4 & 4
\end{bmatrix},\
Q = \begin{bmatrix}
2 & -1 \\
4 & 0
\end{bmatrix}.
$$
And it can be seen from the question
$$
Q^{-1}AQ = \begin{bmatrix}
2 & 1 \\
0 & 2
\end{bmatrix}.
$$
Set $\bx$ let
$$
\bz = Q\bx, \\
\bz = \begin{bmatrix}
z \\
z'
\end{bmatrix},\
\bx =
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
And $\bz' = (Q\bx)' = Q\bx'$.
By the differential equations $y'' - 4y' + 4y = 0$, we can know that $\bz' = A\bz$, and we can get that
$$
Q\bx' = AQ\bx\ ,\ \bx' = Q^{-1}AQ\bx.
$$
It is
$$
\begin{bmatrix}
{x_1}' \\
{x_2}'
\end{bmatrix} =
\begin{bmatrix}
2 & 1 \\
0 & 2
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
So we would know $x_2 = c_2e^{2t}$.
Since ${x_1}' = 2x_1 + c_2e^{2t}$, we would know that$x_1 = (c_2 + tc_1)e^{2t}$.
Since $\bz = Q\bx$ and $y$ is the first entry of $\bz$, we can get
$$
y = 2(c_2 + tc_1)e^{2t} - c_2e^{2t}\ .
$$
##### Exercise 4(d)
已知
$$
\begin{bmatrix}
3 & 1 \\
0 & 3
\end{bmatrix}
=
\begin{bmatrix}
3 & -1 \\
9 & 0
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-9 & 6
\end{bmatrix}
\begin{bmatrix}
3 & -1 \\
9 & 0
\end{bmatrix}.
$$
考慮微分方程 $y'' - 6y' - 9y = 0$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 1 \\
0 & 3
\end{bmatrix}
=
\begin{bmatrix}
3 & -1 \\
9 & 0
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 \\
-9 & 6
\end{bmatrix}
\begin{bmatrix}
3 & -1 \\
9 & 0
\end{bmatrix}.
$$
Consider the differential equation $y'' - 6y' - 9y = 0$.
<!-- eng end -->
**[由孫心提供]**
##### Exercise 4(d)-- answer here:
Let
$$
A = \begin{bmatrix}
0 & 1 \\
-9 & 6
\end{bmatrix}, \
Q = \begin{bmatrix}
3 & -1 \\
9 & 0
\end{bmatrix}.
$$
And it can be seen from the question
$$
Q^{-1}AQ = \begin{bmatrix}
3 & 1 \\
0 & 3
\end{bmatrix}.
$$
Set $\bx$ let
$$
\bz = Q\bx, \\
\bz = \begin{bmatrix}
z \\
z'
\end{bmatrix},\
\bx =
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
And $\bz' = (Q\bx)' = Q\bx'$.
By the differential equations $y'' - 6y' - 9y = 0$, we can know that $\bz' = A\bz$, and we can get that
$$
Q\bx' = AQ\bx\ ,\ \bx' = Q^{-1}AQ\bx.
$$
It is
$$
\begin{bmatrix}
{x_1}' \\
{x_2}'
\end{bmatrix} =
\begin{bmatrix}
3 & 1 \\
0 & 3
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}.
$$
So we would know $x_2 = c_2e^{3t}$ 。
Since ${x_1}' = 3x_1 + c_2e^{3t}$, we would know that $x_1 = (c_2 + tc_1)e^{3t}$.
Since $\bz = Q\bx$ and $y$ is the first entry of $\bz$, we can get
$$
y = 3(c_2 + tc_1)e^{3t} - c_2e^{3t}\ .
$$
---
##### Exercise 5
已知
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 1
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
3 & 2 & 1 \\
9 & 4 & 1
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
6 & -11 & 6
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
3 & 2 & 1 \\
9 & 4 & 1
\end{bmatrix}.
$$
解微分方程 $y''' - 6y'' + 11y' - 6y = 0$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 1
\end{bmatrix}
=
\begin{bmatrix}
1 & 1 & 1 \\
3 & 2 & 1 \\
9 & 4 & 1
\end{bmatrix}^{-1}
\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
6 & -11 & 6
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 1 \\
3 & 2 & 1 \\
9 & 4 & 1
\end{bmatrix}.
$$
Consider the differential equation $y''' - 6y'' + 11y' - 6y = 0$.
<!-- eng end -->
**[由孫心提供]**
##### Exercise 5-- answer here:
Set
$$\bz =\begin{bmatrix}
z \\
z' \\
z''
\end{bmatrix},
\dot{\bz}=\begin{bmatrix}
z' \\
z'' \\
z'''
\end{bmatrix} ,\bz=Q\bx.
$$
$$
\bx=\begin{bmatrix}
x \\
x' \\
x''
\end{bmatrix},\dot{\bx}=\begin{bmatrix}
x' \\
x'' \\
x'''
\end{bmatrix}.
$$
So, $\dot{\bz}=\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
6 & -11 & 6
\end{bmatrix}\bz=\dot{(Q\bx)} =Q\dot\bx= AQ\bx.$
So,
$\dot\bx=Q^{-1}AQ\bx=\begin{bmatrix}
3 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 1
\end{bmatrix}\bx=\begin{bmatrix}
x' \\
x'' \\
x'''
\end{bmatrix}=\begin{bmatrix}
3 & 0 & 0 \\
0 & 2 & 0 \\
0 & 0 & 1
\end{bmatrix}\begin{bmatrix}
x \\
x' \\
x''
\end{bmatrix}=\begin{bmatrix}
3x \\
2x' \\
x''
\end{bmatrix}$.
We can solve the equation $x=c_1e^{3t},x'=c_2e^{2t},x''=c_3e^{t}$,
take into $\bz=Q\bx=\begin{bmatrix}
1 & 1 & 1 \\
3 & 2 & 1 \\
9 & 4 & 1
\end{bmatrix}\begin{bmatrix}
c_1e^{3t} \\
c_2e^{2t} \\
c_3e^{t}
\end{bmatrix}=\begin{bmatrix}
c_1e^{3t}+c_2e^{2t}+ c_3e^{t} \\
3c_1e^{3t}+2c_2e^{2t}+c_3e^{t} \\
9c_1e^{3t}+4c_2e^{2t}+c_3e^{t}
\end{bmatrix}$
Since $\bz = Q\bx$ and $y$ is the first entry of $\bz$, we can get
$$
y=c_1e^{3t}+c_2e^{2t}+ c_3e^{t}.
$$
:::info
collaboration: 2
3 problems: 3
- 2abc
moderator: 1
qc: 1
:::