---
# System prepended metadata

title: Homework 4
tags: [微分方程特論]

---

# Homework 4 
ntu_b05202054 何信佑
###### tags: `微分方程特論`
5.4(p.382) : 3,13,26, 38
5.6(p. 410) : 11
## Section 5.4
### Problem 3
Apply the eigenvalue method of this section to find a general solution of the  system $$\left\{\begin{array}{l}x'_1=3x_1+4x_2\\x'_2=3x_1+2x_2\end{array}\right.;\\x_1(0)=x_2(0)=1\tag{1}$$ and find also the corresponding particular solution. $\require{cancel}\require{color}$
#### Solution 
If we define the vector as $\mathbf{x}=\begin{pmatrix}x_1&x_2\end{pmatrix}^T$, System can be trasform into the form of  $\mathbf{x}'=\mathsf{A}\mathbf{x}$, where the matrix $\mathsf{A}=\begin{pmatrix}3&4\\3&2\end{pmatrix}.$ 

Finding the eigenvalues of $\mathsf{A}$ involes solving the secular equation $$\begin{vmatrix}3-\lambda&4\\3&2-\lambda\end{vmatrix}=0,\tag{2}$$There follows $$\\(3-\lambda)(2-\lambda)-12=0,\\\lambda^2-5\lambda-6=0,\\\lambda=6, -1.$$

- $\lambda_1=6$: We look for a vector $\begin{pmatrix}\alpha& \beta\end{pmatrix}^T$ that satisfies $$\begin{array}{l}\begin{pmatrix}3-6&4\\3&2-6\end{pmatrix}\begin{pmatrix}\alpha\\\beta\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}\\\implies\left\{\begin{array}{l}-3\alpha+4\beta=0\\3\alpha-4\beta=0\end{array}\right.\\\implies 4\beta=3\alpha.\end{array}$$ We choose the vector $\mathbf{v}_1=\begin{pmatrix}4&3\end{pmatrix}^T$.

- $\lambda_2=-1$: We look for a vector $\begin{pmatrix}\alpha& \beta\end{pmatrix}^T$ that satisfies $$\begin{array}{l}\begin{pmatrix}3-(-1)&4\\3&2-(-1)\end{pmatrix}\begin{pmatrix}\alpha\\\beta\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}\\\implies\left\{\begin{array}{l}4\alpha+4\beta=0\\3\alpha+3\beta=0\end{array}\right.\\\implies \beta=-\alpha.\end{array}$$ We choose the vector $\mathbf{v}_2=\begin{pmatrix}1&-1\end{pmatrix}^T$.
    

The eigenvalues of $\mathsf{A}$ are thus $6$ and $-1$ and the associated eigenvectors are $\begin{pmatrix}4\\3\end{pmatrix}$ and $\begin{pmatrix}1\\-1\end{pmatrix}$, respectively.

Therefore the general solution of System (1) is $$\begin{align}\mathbf{x}(t)=\begin{pmatrix}x_1(t)\\x_2(t)\end{pmatrix}&=c_1\mathbf{v_1}e^{\lambda_1t}+c_2\mathbf{v_2}e^{\lambda_2t}\\&=c_1e^{6t}\begin{pmatrix}4\\3\end{pmatrix}+c_2e^{-t}\begin{pmatrix}1\\-1\end{pmatrix}\\&=\begin{pmatrix}4c_1e^{6t}+c_2e^{-t}\\3c_1e^{6t}-c_2e^{-t}\end{pmatrix}.\end{align}\tag{3}$$

Applying the initial conditions <font color =red>$x_1(0)=x_2(0)=1$, $$\mathbf{x}(0)=\begin{pmatrix}1\\1\end{pmatrix}=c_1\begin{pmatrix}4\\3\end{pmatrix}+c_2\begin{pmatrix}1\\-1\end{pmatrix}.$$
$\implies c_1=\frac{2}{7},\quad c_2=-\frac{1}{7}$
Therefore the particular solution of (1) is $$\mathbf{x}(t)=\frac{2}{7}e^{6t}\begin{pmatrix}4\\3\end{pmatrix}-\frac{1}{7}e^{-t}\begin{pmatrix}1\\-1\end{pmatrix}\tag{4}$$
</font>
$\blacksquare$

### ~~Problem 13~~ <font color=red>眼殘寫到12題</font>
Apply the eigenvalue method of this section to find a general solution of the  system $$\left\{\begin{array}{l}x'_1=x_1-5x_2\\x'_2=x_1+3x_2\end{array}\right..\tag{1}$$

#### Solution 
If we define the vector as $\mathbf{x}=\begin{pmatrix}x_1&x_2\end{pmatrix}^T$, System can be trasform into the form of  $\mathbf{x}'=\mathsf{A}\mathbf{x}$, where the matrix $\mathsf{A}=\begin{pmatrix}1&-5\\1&3\end{pmatrix}.$ 

Finding the eigenvalues of $\mathsf{A}$ involes solving the secular equation $$\begin{vmatrix}1-\lambda&-5\\1&3-\lambda\end{vmatrix}=0,\tag{2}$$There follows $$\\(1-\lambda)(3-\lambda)+5=0,\\\lambda^2-4\lambda+8=0,$$ and hence $\mathsf{A}$ has the complex conjugate eigenvalues $\lambda=2+2i$ and $\bar{\lambda}=2-2i$.

Substituting $\lambda=2+2i$ into the equation $(\mathsf{A}-\lambda\mathsf{I})\mathbf{v}=\mathbf{0}$, we get the equation for an associated eigenvector $\mathbf{v}=\begin{pmatrix}\alpha& \beta\end{pmatrix}^T$: $$\begin{array}{l}\begin{pmatrix}1-(2+2i)&-5\\1&3-(2+2i)\end{pmatrix}\begin{pmatrix}\alpha\\\beta\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}\\\implies\left\{\begin{array}{l}(-1-2i)\alpha-5\beta=0\\\alpha+(1-2i)\beta=0\end{array}\right.\\\implies \alpha+(1-2i)\beta=0.\end{array}$$ We choose the vector <font color=red>$\mathbf{v}=\xcancel{\begin{pmatrix}1-2i\\1\end{pmatrix}}\;\begin{pmatrix}1-2i\\-1\end{pmatrix}$ </font>.

Therefore the general solution of System (1) is $$\begin{align}\mathbf{x}(t)&=e^{(2+2i)t}\begin{pmatrix}1-2i\\\color{red}{-1}\end{pmatrix}\\&=e^{2t}\left(\cos 2t+i\sin 2t\right)\begin{pmatrix}1-2i\\\color{red}{-1}\end{pmatrix}\\&=e^{2t}\begin{pmatrix}\left(\cos 2t+i\sin 2t\right)-2i\left(\cos 2t+i\sin 2t\right)\\\color{red}-\cos 2t-i\sin 2t\end{pmatrix}\\&=e^{2t}\begin{pmatrix}\left(\cos 2t+2\sin 2t\right)+i\left(-2\cos 2t+\sin 2t\right)\\\color{red}-\cos 2t-i\sin 2t\end{pmatrix}.\end{align}\tag{3}$$

The real and imaginary parts of $\mathbf{x}(t)$ are the real-valued solutions $$\mathbf{x}_1(t)=e^{2t}\begin{pmatrix}\cos 2t+2\sin 2t\\\color{red}-\cos 2t\end{pmatrix}\quad\text{and}\quad\mathbf{x}_2(t)=e^{2t}\begin{pmatrix}-2\cos 2t+\sin 2t\\\color{red}-\sin 2t\end{pmatrix}\tag{4}$$

A real-valued general solution of System (1) is then given by $$\begin{align}\mathbf{x}(t)&=c_1\mathbf{x}_1+c_2\mathbf{x}_2\\&=e^{2t}\begin{pmatrix}\left(c_1\cos 2t+2\sin 2t\right)+c_2\left(-2\cos 2t+\sin 2t\right)\\\color{red}-c_1\cos 2t-c_2\sin 2t\end{pmatrix}.\;\blacksquare\end{align}\tag{5}$$

<>

### Problem 26
Find the particular solution of the system $$\left\{\begin{array}{rrrr}\dfrac{dx_1}{dt}&=&3x_1&&&+&x_3\\\dfrac{dx_2}{dt}&=&9x_1&-&x_2&+&2x_3\\\dfrac{dx_3}{dt}&=&-9x_1&+&4x_2&-&x_3\end{array}\right.\tag{1}$$ that satisfies the initial conditions $x_1(0)=0,\;x_2(0)=0,\;x_3(0)=17$.
#### Solution 
Consider the matrix form of System (1) $\mathbf{x}'=\mathsf{A}\mathbf{x}$, where $\mathbf{x}=\begin{pmatrix} x_1&x_2&x_3\end{pmatrix}^T$ and the matrix $$\mathsf{A}=\begin{pmatrix} 3&0&1\\9&-1&2\\-9&4&-1\end{pmatrix}.$$

Finding the eigenvalues of $\mathsf{A}$ involes solving the secular equation $$\begin{vmatrix}3-\lambda&0&1\\9&-1-\lambda&2\\-9&4&-1-\lambda\end{vmatrix}=0,\tag{2}$$

There follows $$\begin{align}0&=(3-\lambda)(-1-\lambda)(-1-\lambda)+36+9(-1-\lambda)-8(3-\lambda),\\0&=-\lambda^3+\lambda^2-4\lambda+2\\0&=-(\lambda-3)(\lambda^2+2\lambda+2)\\\lambda&=3,-1\pm i\end{align}$$ and hence $\mathsf{A}$ has a eigenvalue $\lambda_1=3$ and a pair of complex conjugate eigenvalues $\lambda_2=-1+i$ and $\bar{\lambda}_2=-1-i$.

::: spoiler
```matlab
A=[3 0 1;9 -1 2;-9 4 -1];
[V D]=eig(A)
```
```
V =

   0.20229 + 0.05057i   0.20229 - 0.05057i   0.40614 + 0.00000i
   0.45515 - 0.10114i   0.45515 + 0.10114i   0.91381 + 0.00000i
  -0.85973 + 0.00000i  -0.85973 - 0.00000i   0.00000 + 0.00000i

D =

Diagonal Matrix

  -1.00000 + 1.00000i                    0                    0
                    0  -1.00000 - 1.00000i                    0
```
:::

- $\lambda_1=3$: We look for a vector $\begin{pmatrix}\alpha& \beta\end{pmatrix}^T$ that satisfies $$\begin{array}{l}\begin{pmatrix}3-3&0&1\\9&-1-3&2\\-9&4&-1-3\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}\\\implies\left\{\begin{array}{l}\gamma=0\\9\alpha-4\beta+2\gamma=0\\-9\alpha+4\beta-4\gamma=0\end{array}\right.\\\implies 4\beta=9\alpha.\end{array}$$ We choose the vector $\mathbf{v}_1=\begin{pmatrix}4&9&0\end{pmatrix}^T$.
- $\lambda_2=-1+i$: We look for a vector $\begin{pmatrix}\alpha& \beta\end{pmatrix}^T$ that satisfies $$\begin{array}{l}\begin{pmatrix}3-(-1+i)&0&1\\9&-1-(-1+i)&2\\-9&4&-1-(-1+i)\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}\\\implies\begin{pmatrix}4-i&0&1\\9&-i&2\\-9&4&-i\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}\\\implies\begin{pmatrix}9&-i&2\\0&1&0\\0&0&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}\end{array}$$

Therefore, the general solution of System (1) is $$\mathbf{x}(t)=c_1e^{3t}\begin{pmatrix}4\\9\\0\end{pmatrix}+e^{-t}\begin{pmatrix}0\\1\\-3\end{pmatrix}+e^{-t}\begin{pmatrix}0\\0\\-1\end{pmatrix},$$ with $c_1,c_2,c_3$ being arbitrary real constants.

Finally, as we apply the initial conditions $\mathbf{x}(0)=\begin{pmatrix}0&0&17\end{pmatrix}^T$ to the general solution, we obtain $$\begin{pmatrix}0\\0\\17\end{pmatrix}=c_1\begin{pmatrix}4\\9\\0\end{pmatrix}+c_2\begin{pmatrix}0\\1\\-1\end{pmatrix}+c_3\begin{pmatrix}1\\2\\-4\end{pmatrix},$$ which yields $c_1=1$, $c_2=-1$, $c_3=-4$.


:::spoiler
```matlab
F0=[4 0 1;9 1 2;0 -1 -4];
X0=[0 0 17];
C=linsolve(F0,X0)
```
``` >
C =
   1
  -1
  -4
 ```
:::
\
So the particular solution is $\mathbf{x}(t)=c_1e^{3t}\begin{pmatrix}4\\9\\0\end{pmatrix}+e^{-t}\begin{pmatrix}0\\1\\-3\end{pmatrix}+e^{-t}\begin{pmatrix}0\\0\\-1\end{pmatrix}.\;\blacksquare$

### Problem 38
Find the general solution of $\mathbf{x}'=\mathsf{A}\mathbf{x}$, where $$\mathsf{A}=\begin{pmatrix}1&0&0&0\\2&2&0&0\\0&3&3&0\\0&0&4&4\end{pmatrix}.$$
#### Solution 
First we solve the secular equation of $\mathsf{A}$: $$\begin{align}0&=\begin{vmatrix}1-\lambda&0&0&0\\2&2-\lambda&0&0\\0&3&3-\lambda&0\\0&0&4&4-\lambda\end{vmatrix}\\&=(1-\lambda)\begin{vmatrix}2-\lambda&0&0\\3&3-\lambda&0\\0&4&4-\lambda\end{vmatrix}\\&=(1-\lambda)(2-\lambda)\begin{vmatrix}3-\lambda&0\\4&4-\lambda\end{vmatrix}\\&=(1-\lambda)(2-\lambda)(3-\lambda)(4-\lambda)\end{align}$$ The roots are $\lambda=1,2,3,4$.
- For $\lambda_1=1$, we solve $$\begin{pmatrix}0&0&0&0\\2&1&0&0\\0&3&2&0\\0&0&4&3\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ By row reducing, this equation is equivalent to $$\begin{pmatrix}1&0&0&\frac{1}{4}\\0&1&0&-\frac{1}{2}\\0&0&1&\frac{3}{4}\\0&0&0&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ We choose $\delta = 4$, then we have $\alpha=-1$, $\beta=2$, $\gamma=-3$. Thus, $\mathbf{v}_1=\begin{pmatrix}-1&2&-3&4\end{pmatrix}^T$.
    :::spoiler
    ```matlab
    A=[1 0 0 0;2 2 0 0;0 3 3 0;0 0 4 4];
    A1=A-1*eye(4)
    A1_rref=rref(A1)
    ```
    ``` 
    A1 =

   0   0   0   0
   2   1   0   0
   0   3   2   0
   0   0   4   3

    A1_rref =

    1.00000   0.00000   0.00000   0.25000
   0.00000   1.00000   0.00000  -0.50000
   0.00000   0.00000   1.00000   0.75000
   0.00000   0.00000   0.00000   0.00000
    ```
    :::


- For $\lambda_2=2$, we solve $$\begin{pmatrix}-1&0&0&0\\2&0&0&0\\0&3&1&0\\0&0&4&2\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ By row reducing, this equation is equivalent to $$\begin{pmatrix}1&0&0&0\\0&1&0&-\frac{1}{6}\\0&0&1&\frac{1}{2}\\0&0&0&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ Obviously we have $\alpha=0$. And if we choose $\delta = 6$, then we have $\beta=1$, $\gamma=-3$. Thus, $\mathbf{v}_2=\begin{pmatrix}0&1&-3&6\end{pmatrix}^T$.
    :::spoiler
    ```matlab
    A=[1 0 0 0;2 2 0 0;0 3 3 0;0 0 4 4];
    A2=A-2*eye(4)
    A2_rref=rref(A2)
    ``` 
    ```
    A2 =

  -1   0   0   0
   2   0   0   0
   0   3   1   0
   0   0   4   2

    A2_rref =

   1.00000   0.00000   0.00000   0.00000
   0.00000   1.00000   0.00000  -0.16667
   0.00000   0.00000   1.00000   0.50000
   0.00000   0.00000   0.00000   0.00000
    ```
    :::

- For $\lambda_3=3$, we solve $$\begin{pmatrix}-2&0&0&0\\2&-1&0&0\\0&3&0&0\\0&0&4&1\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ By row reducing, this equation is equivalent to $$\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&1&\frac{1}{4}\\0&0&0&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ Obviously we have $\alpha=0$ and $\beta=0$. And if we choose $\delta = 4$, then we have $\gamma=-1$. Thus, $\mathbf{v}_3=\begin{pmatrix}0&0&-1&4\end{pmatrix}$.
    ::: spoiler
    ``` matlab
    A=[1 0 0 0;2 2 0 0;0 3 3 0;0 0 4 4];
    A3=A-3*eye(4)
    A3_rref=rref(A3)
    ```
    ```
    A3 =

  -2   0   0   0
   2  -1   0   0
   0   3   0   0
   0   0   4   1
    
    A3_rref =

   1.00000  -0.00000  -0.00000  -0.00000
   0.00000   1.00000   0.00000   0.00000
   0.00000   0.00000   1.00000   0.25000
   0.00000   0.00000   0.00000   0.00000
   ```
    :::


- For $\lambda_4=4$, we solve  $$\begin{pmatrix}-3&0&0&0\\2&-2&0&0\\0&3&-1&0\\0&0&4&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ By row reducing, this equation is equivalent to $$\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&0\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\\\delta\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}.$$ Obviously we have $\alpha=0$, $\beta=0$ and $\gamma=0$. And we can choose $\delta = 1$. Thus, $\mathbf{v}_4=\begin{pmatrix}0&0&0&1\end{pmatrix}$.
    ::: spoiler
    ``` matlab
    A=[1 0 0 0;2 2 0 0;0 3 3 0;0 0 4 4];
    A4=A-4*eye(4)
    A4_rref=rref(A4)
    ```
    ```
    A4 =

  -3   0   0   0
   2  -2   0   0
   0   3  -1   0
   0   0   4   0

    A4_rref =

   1  -0  -0  -0
   0   1   0   0
   0   0   1   0
   0   0   0   0
    ```
    :::
    

Therefore, the general solution of $\mathbf{x}'=\mathsf{A}\mathbf{x}$ is $$\mathbf{x}(t)=c_1\begin{pmatrix}-1\\2\\-3\\4\end{pmatrix}e^{t}+c_2\begin{pmatrix}0\\1\\-3\\6\end{pmatrix}e^{2t}+c_3\begin{pmatrix}0\\0\\-1\\4\end{pmatrix}e^{3t}+c_4\begin{pmatrix}0\\0\\0\\1\end{pmatrix}e^{4t},$$ with $c_1,c_2,c_3,c_4$ being arbitrary real constants. $\blacksquare$
<font color=red>
## Section 5.6
### Problem 11
 Find general solutions of the system $$\mathbf{x}'=\begin{pmatrix}-3&0&-4\\-1&-1&-1\\1&0&1\end{pmatrix}\mathbf{x}.$$
#### Solution 
$$\begin{align}0&=\begin{vmatrix}-3-\lambda&0&-4\\-1&-1-\lambda&-1\\1&0&1-\lambda\end{vmatrix}\\&=(-3-\lambda)(-1-\lambda)(1-\lambda)-4(1+\lambda)\\&=-\lambda^3-3\lambda^2-3\lambda-1\\&=-(\lambda+1)^3.\end{align}$$

The roots are therefore $\lambda=-1,-1,-1$.

$\begin{pmatrix}-3-(-1)&0&-4\\-1&-1-(-1)&-1\\1&0&1-(-1)\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}\\\begin{pmatrix}-2&0&-4\\-1&0&-1\\1&0&2\end{pmatrix}\begin{pmatrix}\alpha\\\beta\\\gamma\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}$
$\implies\alpha=-2\gamma$ and $\beta$ is arbitrary.
We take $\alpha=-2$, $\beta=1$ and then $\gamma=1$
</font>