# 均差

$\int_M \mathrm{d}\omega = \oint_{\partial M} \omega$

## 定義

$(x_0, y_0),\ldots,(x_{n}, y_{n})$

\begin{align} \mathopen[y_\nu] &= y_\nu, \quad \nu \in \{ 0,\ldots,n\} \\ \mathopen[y_\nu,\ldots,y_{\nu+j}] &= \frac{[y_{\nu+1},\ldots , y_{\nu+j}] - [y_{\nu},\ldots , y_{\nu+j-1}]}{x_{\nu+j}-x_\nu}, \quad \nu\in\{0,\ldots,n-j\},\ j\in\{1,\ldots,n\}. \\ \end{align}

\begin{align} \mathopen[y_\nu] &= y_{\nu},\quad \nu \in \{ 0,\ldots,n\} \\ \mathopen[y_\nu,\ldots,y_{\nu-j}] &= \frac{[y_\nu,\ldots , y_{\nu-j+1}] - [y_{\nu-1},\ldots , y_{\nu-j}]}{x_\nu - x_{\nu-j}}, \quad \nu\in\{j,\ldots,n\},\ j\in\{1,\ldots,n\}. \\ \end{align}

## 表示法

$(x_0, f(x_0)),\ldots,(x_{n}, f(x_{n}))$

\begin{align} f[x_\nu] &= f(x_{\nu}), \qquad \nu \in \{ 0,\ldots,n \} \\ f[x_\nu,\ldots,x_{\nu+j}] &= \frac{f[x_{\nu+1},\ldots , x_{\nu+j}] - f[x_\nu,\ldots , x_{\nu+j-1}]}{x_{\nu+j}-x_\nu}, \quad \nu\in\{0,\ldots,n-j\},\ j\in\{1,\ldots,n\}. \end{align}

$\begin{matrix} \mathopen [x_0,\ldots,x_n]f \\ \mathopen [x_0,\ldots,x_n;f] \\ \mathopen D[x_0,\ldots,x_n]f \\ \end{matrix}$

## 例子

\begin{align} \mathopen[y_0] &= y_0 \\ \mathopen[y_0,y_1] &= \frac{y_1-y_0}{x_1-x_0} \\ \mathopen[y_0,y_1,y_2] &= \frac{\mathopen[y_1,y_2]-\mathopen[y_0,y_1]}{x_2-x_0} \\ \mathopen[y_0,y_1,y_2,y_3] &= \frac{\mathopen[y_1,y_2,y_3]-\mathopen[y_0,y_1,y_2]}{x_3-x_0} \\ \mathopen[y_0,y_1,\dots,y_n] &= \frac{\mathopen[y_1,y_2,\dots,y_n]-\mathopen[y_0,y_1,\dots,y_{n-1}]}{x_n-x_0} \end{align}

$\begin{matrix} x_0 & [y_0] = y_0 & & & \\ & & [y_0,y_1] & & \\ x_1 & [y_1] = y_1 & & [y_0,y_1,y_2] & \\ & & [y_1,y_2] & & [y_0,y_1,y_2,y_3]\\ x_2 & [y_2] = y_2 & & [y_1,y_2,y_3] & \\ & & [y_2,y_3] & & \\ x_3 & [y_3] = y_3 & & & \\ \end{matrix}$

## 性质

\begin{align} (f+g)[x_0,\dots,x_n] &= f[x_0,\dots,x_n] + g[x_0,\dots,x_n] \\ (\lambda\cdot f)[x_0,\dots,x_n] &= \lambda\cdot f[x_0,\dots,x_n] \\ \end{align}
$(f\cdot g)[x_0,\dots,x_n] = f[x_0]\cdot g[x_0,\dots,x_n] + f[x_0,x_1]\cdot g[x_1,\dots,x_n] + \dots + f[x_0,\dots,x_n]\cdot g[x_n]$
$\exists \xi \in (\min\{x_0,\dots,x_n\},\max\{x_0,\dots,x_n\}) \quad f[x_0,\dots,x_n] = \frac{f^{(n)}(\xi)}{n!}$

## 展開形式

\begin{align} \mathopen[y_0] &= y_0 \\ \mathopen[y_0,y_1] &= \frac{y_0}{x_0-x_1} + \frac{y_1}{x_1-x_0} \\ \mathopen[y_0,y_1,y_2] &= \frac{y_0}{(x_0-x_1)(x_0-x_2)} + \frac{y_1}{(x_1-x_0)(x_1-x_2)} + \frac{y_2}{(x_2-x_0)(x_2-x_1)} \\ \mathopen[y_0, y_1,\dots, y_n] &=\sum_{j=0}^{n} \frac{y_j}{\prod_{k=0,\, k\neq j}^{n} x_j-x_k} \\ \end{align}

## 等價定義

\begin{align} \mathopen[y_0,y_1,\dots,y_{n-1},y_n] &= \frac{\mathopen[y_1,y_2,\dots,y_n]-\mathopen[y_0,y_1,\dots,y_{n-1}]}{x_n-x_0} \\ &= \frac{\mathopen[y_0,\dots,y_{n-2},y_n]-\mathopen[y_0,y_1,\dots,y_{n-1}]}{x_n-x_{n-1}} \\ \end{align}

\begin{align} \mathopen[y_0] &= y_0 \\ \mathopen[y_0,y_1] &= \frac{y_1-y_0}{x_1-x_0} \\ \mathopen[y_0,y_1,y_2] &= \frac{\mathopen[y_0,y_2]-\mathopen[y_0,y_1]}{x_2-x_1} \\ \mathopen[y_0,y_1,y_2,y_3] &= \frac{\mathopen[y_0,y_1,y_3]-\mathopen[y_0,y_1,y_2]}{x_3-x_2} \\ \mathopen[y_0,y_1,\dots,y_n] &= \frac{\mathopen[y_0,\dots,y_{n-2},y_n]-\mathopen[y_0,y_1,\dots,y_{n-1}]}{x_n-x_{n-1}} \\ \end{align}

$\begin{matrix} x_0 & [y_0] = y_0 & & & \\ & & [y_0,y_1] & & \\ x_1 & [y_1] = y_1 & & [y_0,y_1,y_2] & \\ & & [y_0,y_2] & & [y_0,y_1,y_2,y_3]\\ x_2 & [y_2] = y_2 & & [y_0,y_1,y_3] & \\ & & [y_0,y_3] & & \\ x_3 & [y_3] = y_3 & & & \\ \end{matrix}$

## 牛頓插值法

\begin{align} N(x) &= y_0 + (x-{x}_{0})\left([{y}_{0}, {y}_{1}] + (x-{x}_{1})\left([{y}_{0}, {y}_{1},{y}_{2}] + \cdots\right)\right) \\ &=[y_0]+[{y}_{0}, {y}_{1}](x-{x}_{0})+\cdots+[{y}_{0},{y}_{1},\ldots,{y}_{n}]\prod_{k=0}^{n-1} x-{x}_{k} \end{align}

\begin{align} N(x) &= y_0 + y_0\frac{x-{x}_{0}}{x_0-x_1}+ y_1\frac{x-{x}_{0}}{x_1-x_0}+\cdots+ \sum_{j=0}^{n} y_j \frac{\prod_{k=0}^{n-1} x-{x}_{k}} {\prod_{k=0,\, k\neq j}^{n} x_j-x_k} \\ \end{align}

\begin{align} N(x)&=y_0\left(1+ \frac{x-{x}_{0}}{x_0-x_1}+\frac{(x-x_0)(x-x_1)}{(x_0-x_1)(x_0-x_2)}\right) + y_1\left(\frac{x-{x}_{0}}{x_1-x_0}+\frac{(x-x_0)(x-x_1)}{(x_1-x_0)(x_1-x_2)}\right) + y_2\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)} \\ &=y_0\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)} + y_1\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)} + y_2\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)} \\ &= \sum_{j=0}^{2} y_j \prod_{\begin{smallmatrix} k=0 \\ k\neq j \end{smallmatrix}}^{2} \frac{x-{x}_{k}} { x_j-x_k} \\ \end{align}

## 前向差分

### 定義

$(x_0, y_0),\ldots,(x_{n}, y_{n})$

$x_i = x_0 + ih , \quad h > 0 \mbox{ , } 0 \le i \le n.$

\begin{align} \triangle^{0}y_{i} &= y_{i} \\ \triangle^{k}y_{i} &= \triangle^{k-1}y_{i+1} - \triangle^{k-1}y_{i} , \quad 1 \le k \le n-i.\\ \end{align}

### 例子

$\begin{matrix} y_0 & & & \\ & \triangle y_0^{1} & & \\ y_1 & & \triangle^{2} y_0 & \\ & \triangle y_1^{1} & & \triangle^{3} y_0\\ y_2 & & \triangle^{2} y_1 & \\ & \triangle y_2^{1} & & \\ y_3 & & & \\ \end{matrix}$

### 展開形式

\begin{align} \triangle^{k}y_{i} &= \sum_{j = 0}^{k} (-1)^{k-j} \binom{k}{j} y_{i+j}, \quad 0 \le k \le n-i \end{align}

${n \choose k} = \frac{(n)_k}{k!} \quad\quad (n)_k=n(n-1)(n-2)\cdots(n-k+1)$

### 插值公式

\begin{align} f(x) &= y_0 + \frac {x-x_0} {h} \left( \Delta^1y_0 + \frac {x-x_0-h} {2h}\left(\Delta^2y_0 + \cdots \right) \right) \\ &= y_0 + \sum_{k=1}^n \frac{\Delta^ky_0}{k!h^k} \prod_{i=0}^{n-1} (x-x_0-ih) \\ &= y_0 + \sum_{k=1}^n \frac{\Delta^ky_0}{k!} \prod_{i=0}^{n-1} (\frac{x-x_0}{h}-i) \\ &= \sum_{k=0}^n {\frac{x-x_0}{h} \choose k}~ \Delta^k y_0 \\ \end{align}

### 無窮級數

\begin{align} f(x) &= f(a) + \lim_{h \to 0}\sum_{k=1}^\infty \frac{\Delta_h^k[f](a)}{k!h^k} \prod_{i=0}^{k-1} ((x-a)-ih) \\ &= f(a) + \sum_{k=1}^\infty \frac{d^k}{dx^k}f(a) \frac{(x-a)^k}{k!}. \\ \end{align}

## 冪函數的均差

\begin{align} p_j[x_0,\dots,x_n] &= 0 \qquad \forall j

## 泰勒形式

$f = f(0) p_0 + f'(0) p_1 + \frac{f''(0)}{2!} p_2 + \dots$

$f[x_0,\dots,x_n] = f(0)p_0[x_0,\dots,x_n] + f'(0) p_1[x_0,\dots,x_n] + \dots + \frac{f^{(n)}(0)}{n!} p_n[x_0,\dots,x_n] + \dots$

$n$項消失了，因為均差的階高於多項式的階。可以得出均差的泰勒級數本質上開始於：

$\frac{f^{(n)}(0)}{n!}$

## 皮亞諾形式

$f[x_0,\ldots,x_n] = \frac{1}{n!} \int_{x_0}^{x_n} f^{(n)}(t)B_{n-1}(t) \, dt$

## 註釋與引用

1. ^
$\begin{array}{lcl} { \begin{matrix} x_0 & x_0^2 & & \\ & & x_0+x_1 & & \\ x_1 & x_1^2 & & 1 & \\ & & x_1+x_2 & & 0 \\ x_2 & x_2^2 & & 1 & \\ & & x_2+x_3 & & & \\ x_3 & x_3^2 & & & \\ \end{matrix} } \\ \\ { \begin{matrix} x_0 & x_0^n & \\ & & \sum_{i=0}^{n-1}x_0^{n-1-i}x_1^i \\ x_1 & x_1^n & \\ \end{matrix} } \\ \\ { \begin{matrix} x_0 & x_0^{n+1} & \\ & & \frac{x_1^{n+1}-x_1x_0^n+x_1x_0^n-x_0^{n+1}}{x_1-x_0} =x_1\sum_{i=0}^{n-1}x_0^{n-1-i}x_1^i+x_0^n=\sum_{i=0}^{n}x_0^{n-i}x_1^i \\ x_1 & x_1^{n+1} & \\ \end{matrix} } \\ \\ { \begin{matrix} x_0 & x_0^3 & & & & \\ & & x_0^2+x_0x_1+x_1^2 & & \\ x_1 & x_1^3 & & x_0+x_1+x_2 & & \\ & & x_1^1+x_1x_2+x_2^2 & & 1 & \\ x_2 & x_2^3 & & x_1+x_2+x_3 & & 0 \\ & & x_2^2+x_2x_3+x_3^2 & & 1 & \\ x_3 & x_3^3 & & x_2+x_3+x_4 & & \\ & & x_3^2+x_3x_4+x_4^2 & & & \\ x_4 & x_4^3 & & & & \\ \end{matrix} } \\ \\ { \begin{matrix} x_0 & x_0^4 & & & & & \\ & & x_0^3+x_0^2x_1+x_0x_1^2+x_1^3 & & & \\ x_1 & x_1^4 & & x_0^2+x_0x_1+x_1^2+x_1x_2+x_2^2 +x_0x_2 & & & \\ & & x_1^3+x_1^2x_2+x_1x_2^2+x_2^3 & & x_0+x_1+x_2+x_3 & \\ x_2 & x_2^4 & & x_1^2+x_1x_2+x_2^2 +x_2x_3+x_3^2 +x_1x_3 & & 1 & \\ & & x_2^3+x_2^2x_3+x_2x_3^2+x_3^3 & & x_1+x_2+x_3+x_4 & & 0 \\ x_3 & x_3^4 & & x_2^2+x_2x_3+x_3^2 +x_3x_4+x_4^2 +x_2x_4 & & 1 & \\ & & x_3^3+x_3^2x_4+x_3x_4^2+x_4^3 & & x_2+x_3+x_4+x_5 & & \\ x_4 & x_4^4 & & x_3^2+x_3x_4+x_4^2 +x_4x_5+x_5^2 +x_3x_5 & & & \\ & & x_4^3+x_4^2x_5+x_4x_5^2+x_5^3 & & & & \\ x_5 & x_5^4 & & & & & \\ \end{matrix} } \\ \\ { \begin{matrix} x_0 & x_0^5 & & & & & &\\ & & \sum_{i=0}^{4}x_0^{4-i}x_1^i & & & &\\ x_1 & x_1^5 & & \sum_{i=0}^{3}\sum_{j=0}^{3-i}x_0^{3-i-j}x_1^jx_2^i & & & &\\ & & \sum_{i=0}^{4}x_1^{4-i}x_2^i & & \sum_{i=0}^{2}\sum_{j=0}^{2-i}\sum_{k=0}^{2-i-j}x_0^{2-i-j-k}x_1^kx_2^jx_3^i & & &\\ x_2 & x_2^5 & & \sum_{i=0}^{3}\sum_{j=0}^{3-i}x_1^{3-i-j}x_2^jx_3^i & & \sum_{i=0}^4x_i & &\\ & & \sum_{i=0}^{4}x_2^{4-i}x_3^i & & \sum_{i=0}^{2}\sum_{j=0}^{2-i}\sum_{k=0}^{2-i-j}x_1^{2-i-j-k}x_2^kx_3^jx_4^i & & 1 &\\ x_3 & x_3^5 & & \sum_{i=0}^{3}\sum_{j=0}^{3-i}x_2^{3-i-j}x_3^jx_4^i & & \sum_{i=1}^5x_i & & 0\\ & & \sum_{i=0}^{4}x_3^{4-i}x_4^i & & \sum_{i=0}^{2}\sum_{j=0}^{2-i}\sum_{k=0}^{2-i-j}x_2^{2-i-j-k}x_3^kx_4^jx_5^i & &1 &\\ x_4 & x_4^5 & & \sum_{i=0}^{3}\sum_{j=0}^{3-i}x_3^{3-i-j}x_4^jx_5^i & & \sum_{i=2}^6x_i & &\\ & & \sum_{i=0}^{4}x_4^{4-i}x_5^i & & \sum_{i=0}^{2}\sum_{j=0}^{2-i}\sum_{k=0}^{2-i-j}x_3^{2-i-j-k}x_4^kx_5^jx_6^i & & &\\ x_5 & x_5^5 & & \sum_{i=0}^{3}\sum_{j=0}^{3-i}x_4^{3-i-j}x_5^jx_6^i & & & &\\ & & \sum_{i=0}^{4}x_5^{4-i}x_6^i & & & & &\\ x_6 & x_6^5 & & & & & &\\ \end{matrix} } \\ \end{array}$
2. ^
\begin{align} \mathopen[y_0] &= y_0 \\ \mathopen[y_0,y_1] &= \frac{y_1-y_0}{x_1-x_0} \\ &= \frac{y_0}{x_0-x_1} + \frac{y_1}{x_1-x_0} \\ \mathopen[y_0,y_1,y_2] &= \frac{\frac{y_1}{x_1-x_2} + \frac{y_2}{x_2-x_1} - \frac{y_0}{x_0-x_1} - \frac{y_1}{x_1-x_0}}{x_2-x_0} \\ &= \frac{y_0}{(x_0-x_1)(x_0-x_2)} + \frac{y_1}{(x_1-x_0)(x_1-x_2)} + \frac{y_2}{(x_2-x_0)(x_2-x_1)} \\ \mathopen[y_0, y_1,\dots, y_n] &=\sum_{j=0}^{n} \frac{y_j}{\prod_{k=0,\, k\neq j}^{n} x_j-x_k} \\ \mathopen[y_0, y_1,\dots, y_{n+1}] &=\frac{\sum_{j=1}^{n+1} \frac{y_j}{\prod_{k=1,\, k\neq j}^{n+1} x_j-x_k} - \sum_{j=0}^{n} \frac{y_j}{\prod_{k=0,\, k\neq j}^{n} x_j-x_k}}{x_{n+1}-x_0} \\ &= \frac{\frac {y_{n+1}}{\prod_{k=1}^{n} x_{n+1}-x_k} + \sum_{j=1}^{n} y_j\left(\frac{1}{\prod_{k=1,\, k\neq j}^{n+1} x_j-x_k}-\frac{1}{\prod_{k=0,\, k\neq j}^{n} x_j-x_k}\right) - \frac{y_0}{\prod_{k=0}^{n} x_0-x_k}}{x_{n+1}-x_0} \\ &= \frac{\frac {y_{n+1}}{\prod_{k=1}^{n} x_{n+1}-x_k} + \sum_{j=1}^{n} y_j\left(\frac{x_j-x_0}{\prod_{k=0,\, k\neq j}^{n+1} x_j-x_k}-\frac{x_j-x_{n+1}}{\prod_{k=0,\, k\neq j}^{n+1} x_j-x_k}\right) - \frac{y_0}{\prod_{k=0}^{n} x_0-x_k}}{x_{n+1}-x_0} \\ &=\sum_{j=0}^{n+1} \frac{y_j}{\prod_{k=0,\, k\neq j}^{n+1} x_j-x_k} \end{align}
3. ^ 《数值分析及科学计算》 薛毅（编） 第六章 第2节 Newton插值. P200.
4. ^ 《数值分析及科学计算》 薛毅（编） 第六章 第2节 Newton插值. P201.
5. ^
$\begin{matrix} x_0 & x_0^3 & & & & \\ & & x_0^2+x_0x_1+x_1^2 & & \\ x_1 & x_1^3 & & x_0+x_1+x_2 & & \\ & & x_0^2+x_0x_2+x_2^2 & & 1 & \\ x_2 & x_2^3 & & x_0+x_1+x_3 & & 0 \\ & & x_0^2+x_0x_3+x_3^2 & & 1 & \\ x_3 & x_3^3 & & x_0+x_1+x_4 & & \\ & & x_0^2+x_0x_4+x_4^2 & & & \\ x_4 & x_4^3 & & & & \\ \end{matrix}$
6. ^
\begin{align} \triangle^{k}y_{i} &= \sum_{j = 0}^{k} \frac{k!}{\prod_{l=0,\, l\neq j}^{k} j-l} y_{i+j}, \quad 0 \le k \le n-i \\ &= \sum_{j = 0}^{k} \frac{k!}{j!(-1)^{k-j}(k-j)!} y_{i+j}, \quad 0 \le k \le n-i \\ &= \sum_{j = 0}^{k} (-1)^{k-j} \binom{k}{j} y_{i+j}, \quad 0 \le k \le n-i \end{align}