## 常係數線性遞迴關係式 (中)

$a_n=d_1a_{n-1}+d_2a_{n-2}+d_3a_{n-3}+d_4a_{n-4}+d_5a_{n-5},~~n\ge 5$

$\begin{bmatrix} a_n\\ a_{n-1}\\ a_{n-2}\\ a_{n-3}\\ a_{n-4}\end{bmatrix}=\begin{bmatrix} d_1&d_2&d_3&d_4&d_5\\ 1&0&0&0&0\\ 0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0 \end{bmatrix}\begin{bmatrix} a_{n-1}\\ a_{n-2}\\ a_{n-3}\\ a_{n-4}\\ a_{n-5} \end{bmatrix}$

$\mathbf{u}_n=\begin{bmatrix} a_{n+4}\\ a_{n+3}\\ a_{n+2}\\ a_{n+1}\\ a_n \end{bmatrix}=A^n\begin{bmatrix} a_4\\ a_3\\ a_2\\ a_1\\ a_0 \end{bmatrix}=A^n\mathbf{u}_0$

\displaystyle\begin{aligned} p(t)&=\det(A-tI)=\begin{vmatrix} d_1-t&d_2&d_3&d_4&d_5\\ 1&-t&0&0&0\\ 0&1&-t&0&0\\ 0&0&1&-t&0\\ 0&0&0&1&-t \end{vmatrix}\\ &=(d_1-t)(-t)^4-d_2(-t)^3+d_3(-t)^2-d_4(-t)+d_5\\ &=(-1)^5\left(t^5-d_1t^4-d_2t^3-d_3t^2-d_4t-d_5\right). \end{aligned}

$a_n=15a_{n-2}+10a_{n-3}-60a_{n-4}-72a_{n-5}$

$t^5=15t^3+10t^2-60t-72$

$\displaystyle J=J(\lambda_1)\oplus J(\lambda_2)=\begin{bmatrix} \lambda_1&1&\vline&0&0&0\\ 0&\lambda_1&\vline&0&0&0\\\hline 0&0&\vline&\lambda_2&1&0\\ 0&0&\vline&0&\lambda_2&1\\ 0&0&\vline&0&0&\lambda_2 \end{bmatrix}$

$\displaystyle J^n=\begin{bmatrix} \lambda_1^n&n\lambda_1^{n-1}&\vline&0&0&0\\ 0&\lambda_1^n&\vline&0&0&0\\\hline 0&0&\vline&\lambda_2^n&n\lambda_2^{n-1}&\frac{n(n-1)}{2}\lambda_2^{n-2}\\ 0&0&\vline&0&\lambda_2^n&n\lambda_2^{n-1}\\ 0&0&\vline&0&0&\lambda_2^n \end{bmatrix}$

\displaystyle\begin{aligned} a_n&=(\alpha_0+\alpha_1n)\lambda_1^n+(\beta_0+\beta_1n+\beta_2n^2)\lambda_2^n\\ &=(\alpha_0+\alpha_1n)3^n+(\beta_0+\beta_1n+\beta_2n^2)(-2)^n,~~n\ge 0,\end{aligned}

$\displaystyle \begin{bmatrix} 1&1&0&0&0\\ \lambda_1&\lambda_2&\lambda_1&\lambda_2&\lambda_2\\ \lambda_1^2&\lambda_2^2&2\lambda_1^2&2\lambda_2^2&2^2\lambda_2^2\\ \lambda_1^3&\lambda_2^3&3\lambda_1^3&3\lambda_2^3&3^2\lambda_2^3\\ \lambda_1^4&\lambda_2^4&4\lambda_1^4&4\lambda_2^4&4^2\lambda_2^4 \end{bmatrix}\begin{bmatrix} \alpha_0\\ \beta_0\\ \alpha_1\\ \beta_1\\ \beta_2 \end{bmatrix}=\begin{bmatrix} a_0\\ a_1\\ a_2\\ a_3\\ a_4 \end{bmatrix}$

$\begin{bmatrix} \lambda_1&\lambda_2&\lambda_2\\ 2\lambda_1^2&2\lambda_2^2&2^2\lambda_2^2\\ 3\lambda_1^3&3\lambda_2^3&3^2\lambda_2^3\\ 4\lambda_1^4&4\lambda_2^4&4^2\lambda_2^4 \end{bmatrix}=\begin{bmatrix} 1&0&0&0\\ 0&2&0&0\\ 0&0&3&0\\ 0&0&0&4 \end{bmatrix}\begin{bmatrix} \lambda_1&\lambda_2&0\\ \lambda_1^2&\lambda_2^2&\lambda_2^2\\ \lambda_1^3&\lambda_2^3&2\lambda_2^3\\ \lambda_1^4&\lambda_2^4&3\lambda_2^4 \end{bmatrix}\begin{bmatrix} 1&0&0\\ 0&1&1\\ 0&0&1 \end{bmatrix}$

1. 寫出特徵方程

$\displaystyle t^k=d_1t^{k-1}+d_2t^{k-2}+\cdots+d_k$

並解出特徵多項式的根，假設有 $m$ 個相異根 $\lambda_1,\ldots,\lambda_m$，重數分別為 $\beta_1,\ldots,\beta_m$

2. 通項 $a_n$ 的表達式為

$\displaystyle a_n=p_1(n)\lambda_1^n+p_2(n)\lambda_2^n+\cdots+p_m(n)\lambda_m^n,~~n\ge 0$

其中 $p_i(n)=c_{i0}+c_{i1}n+\cdots+c_{i,\beta_{i-1}}n^{\beta_i-1}$$i=1,\ldots,m$，組合係數 $\{c_{ij}\}$ 由給定的初始條件 $a_0,a_1,\ldots,a_{k-1}$ 唯一決定。