# 差分

（重定向自有限差分

## 定义

### 前向差分

${\displaystyle x_{k}=x_{0}+kh,(k=0,1,...,n)}$
${\displaystyle \ \Delta f(x_{k})=f(x_{k+1})-f(x_{k})}$

### 逆向差分

${\displaystyle \ \nabla f(x_{k})=f(x_{k})-f(x_{k-1}).\,}$

## 差分的阶

${\displaystyle \ \Delta ^{n}[f](x)}$ ${\displaystyle \ f(x)}$ ${\displaystyle \ n}$ 阶差分。

 ${\displaystyle \ \Delta ^{n}[f](x)}$ ${\displaystyle \ =\Delta \{\Delta ^{n-1}[f](x)\}}$ ${\displaystyle \ =\Delta ^{n-1}[f](x+1)-\Delta ^{n-1}[f](x)}$

${\displaystyle \ \Delta ^{n}[f](x)=\sum _{i=0}^{n}{n \choose i}(-1)^{n-i}f(x+i)}$

${\displaystyle \ \Delta ^{2}[f](x)=f(x+2)-2f(x+1)+f(x)}$

## 差分的性质

${\displaystyle \Delta C=0}$
• 线性：如果 ${\displaystyle \ a}$ ${\displaystyle \ b}$  为常数，则有
${\displaystyle \Delta (af+bg)=a\Delta f+b\Delta g}$
${\displaystyle \Delta (fg)=f\Delta g+g\Delta f+\Delta f\Delta g}$
${\displaystyle \nabla (fg)=f\nabla g+g\nabla f-\nabla f\nabla g}$
${\displaystyle \nabla \left({\frac {f}{g}}\right)={\frac {1}{g}}\det {\begin{bmatrix}\nabla f&\nabla g\\f&g\end{bmatrix}}\det {\begin{bmatrix}g&\nabla g\\1&1\end{bmatrix}}^{-1}}$
${\displaystyle \Delta \left({\dfrac {f}{g}}\right)={\dfrac {1}{g}}\det {\begin{bmatrix}\Delta f&\Delta g\\f&g\end{bmatrix}}\det {\begin{bmatrix}g&\Delta g\\-1&1\end{bmatrix}}^{-1}}$
${\displaystyle \nabla \left({\frac {f}{g}}\right)={\frac {g\nabla f-f\nabla g}{g\cdot (g-\nabla g)}}}$
${\displaystyle \Delta \left({\frac {f}{g}}\right)={\frac {g\Delta f-f\Delta g}{g\cdot (g+\Delta g)}}}$
${\displaystyle \sum _{n=a}^{b}\Delta f(n)=f(b+1)-f(a)}$
${\displaystyle \sum _{n=a}^{b}\nabla f(n)=f(b)-f(a-1)}$

## 牛頓級數

### 單位步長情況

x值間隔為單位步長1時，有：

{\displaystyle {\begin{aligned}f(x)&=f(a)+{\frac {x-a}{1}}\left[\Delta ^{1}[f](a)+{\frac {x-a-1}{2}}\left(\Delta ^{2}[f](a)+\cdots \right)\right]\\&=f(a)+\sum _{k=1}^{n}\Delta ^{k}[f](a)\prod _{i=1}^{k}{\frac {[(x-a)-i+1]}{i}}\\&=\sum _{k=0}^{n}{x-a \choose k}~\Delta ^{k}[f](a)\\\end{aligned}}}

${\displaystyle {x \choose k}={\frac {(x)_{k}}{k!}}\quad \quad (x)_{k}=x(x-1)(x-2)\cdots (x-k+1)}$

### 實例

{\displaystyle {\begin{matrix}{\begin{array}{|c||c|c|c|c|}\hline x&\Delta ^{0}&\Delta ^{1}&\Delta ^{2}&\Delta ^{3}\\\hline 1&{\underline {1}}&&&\\&&{\underline {3}}&&\\2&4&&{\underline {2}}&\\&&5&&{\underline {0}}\\3&9&&2&\\&&7&&\\4&16&&&\\\hline \end{array}}&\quad {\begin{aligned}f(x)&=\Delta ^{0}+\Delta ^{1}{\dfrac {(x-x_{0})}{1!}}+\Delta ^{2}{\dfrac {(x-x_{0})(x-x_{0}-1)}{2!}}\quad (x_{0}=1)\\&=1+3\cdot {\dfrac {x-1}{1}}+2\cdot {\dfrac {(x-1)(x-2)}{2}}\\&=1+3(x-1)+(x-1)(x-2)\\&=x^{2}\end{aligned}}\end{matrix}}}

### 一般情況

{\displaystyle {\begin{aligned}f(x)&=f(a)+{\frac {x-a}{h}}\left[\Delta _{h}^{1}[f](a)+{\frac {x-a-h}{2h}}\left(\Delta _{h}^{2}[f](a)+\cdots \right)\right]\\&=f(a)+\sum _{k=1}^{n}{\frac {\Delta _{h}^{k}[f](a)}{k!h^{k}}}\prod _{i=0}^{k-1}[(x-a)-ih]\\&=f(a)+\sum _{k=1}^{n}{\frac {\Delta _{h}^{k}[f](a)}{k!}}\prod _{i=0}^{k-1}\left({\frac {x-a}{h}}-i\right)\end{aligned}}}

## 参考

1. ^ 科学出版社 《数值分析及科学计算》 薛毅（编） 第六章 第2节 Newton插值. P204.
2. ^ 科学出版社 《数值分析及科学计算》 薛毅（编） 第六章 第2节 Newton插值. P205.
3. ^ Newton, Isaac, (1687). Principia, Book III, Lemma V, Case 1