差分方程

1. 差分的定义

1.1 前向差分

对于函数 f(x){f(x)} ,如果在等距节点:

xk=x0+kh(k=0,1,,n)Δf(xk)=f(xk+1)f(xk)\begin{array}{c} x_k = x_0 + kh \quad (k = 0,1,\cdots,n) \\ \Delta f(x_k) = f(x_{k+1}) - f(x_k) \end{array}

则称 Δf(x){\Delta f(x)}f(x){f(x)} 的一阶前向差分(简称差分),称 Δ\Delta 为(前向)差分算子。

1.2 逆向差分

对于函数 f(x){f(x)} ,如果在等距节点:

xk=x0+kh(k=0,1,,n)f(xk)=f(xk)f(xk1)\begin{array}{c} x_k = x_0 + kh \quad (k = 0,1,\cdots,n) \\ \nabla f(x_k) = f(x_{k}) - f(x_{k-1}) \end{array}

则称 f(xk){\nabla f(x_k)}f(x){f(x)} 的一阶逆向差分,称 \nabla 为逆向差分算子。

1.3 中心差分

对于函数 f(x){f(x)} ,如果在等距节点:

xk=x0+kh(k=0,1,,n)δf(xk)=f(xk+12)f(xk12)\begin{array}{c} x_k = x_0 + kh \quad (k = 0,1,\cdots,n) \\ \delta f(x_k) = f(x_{k+\frac{1}{2}}) - f(x_{k-\frac{1}{2}}) \end{array}

则称 δf(xk){\delta f(x_k)}f(x){f(x)} 的一阶中心差分,称 δ\delta 为中心差分算子。

【注】:一阶差分的差分为二阶差分,二阶差分的差分为三阶差分,以此类推。记 Δnf(xk){\Delta^nf(x_k)}nf(xk){\nabla^nf(x_k)}δnf(xk){\delta^nf(x_k)} 分别为 f(x){f(x)}nn 阶前向/逆向/中心差分。nn 阶前向差分、逆向差分、中心差分公式分别为:

Δnf(xk)=Δ{Δn1f(xk)}=Δn1f(xk+1)Δn1f(xk)nf(xk)={n1f(xk)}=n1f(xk)n1f(xk1)δnf(xk)=δ{δn1f(xk)}=δn1f(xk+12)δn1f(xk12)\begin{array}{c} \Delta^nf(x_k) = \Delta\{\Delta^{n-1}f(x_k)\} = \Delta^{n-1}f(x_{k+1}) - \Delta^{n-1}f(x_k) \\ \nabla^nf(x_k) = \nabla\{\nabla^{n-1}f(x_k)\} = \nabla^{n-1}f(x_{k}) - \nabla^{n-1}f(x_{k-1}) \\ \delta^nf(x_k) = \delta\{\delta^{n-1}f(x_k)\} = \delta^{n-1}f(x_{k+\frac{1}{2}}) - \delta^{n-1}f(x_{k-\frac{1}{2}}) \end{array}

2. 差分的性质

  • ΔC=C=δC=0{\Delta C = \nabla C = \delta C = 0}
  • 线性:如果 aabb 均为常数,则

Δ(af+bg)=aΔf+bΔg(af+bg)=af+bgδ(af+bg)=aδf+bδg\begin{array}{c} \Delta(af + bg) = a\Delta f + b\Delta g \\ \nabla(af + bg) = a\nabla f + b\nabla g \\ \delta(af + bg) = a\delta f + b\delta g \end{array}

  • 乘法定则:

Δ(fg)=fΔg+gΔf+ΔfΔg(fg)=fg+gffgδ(fg)=fδg+gδf\begin{array}{c} \Delta(fg) = f\Delta g + g\Delta f + \Delta f\Delta g \\ \nabla(fg) = f\nabla g + g\nabla f - \nabla f\nabla g \\ \delta(fg) = f\delta g + g\delta f \end{array}

  • 除法定则:

Δ(fg)=1gdet[ΔfΔgfg]det[gΔg11]1=gΔffΔgg(g+Δg)(fg)=1gdet[fgfg]det[gg11]1=gffgg(gg)δ(fg)=1gdet[δfδgfg]det[gδg01]1=gδffδgg2\begin{array}{c} \Delta(\frac{f}{g}) = \frac{1}{g} det \left[ \begin{matrix} \Delta f & \Delta g \\ f & g \end{matrix} \right] det \left[ \begin{matrix} g & \Delta g \\ -1 & 1 \end{matrix} \right]^{-1} = \frac{g\Delta f - f\Delta g}{g \cdot {(g + \Delta g)}} \\ \nabla(\frac{f}{g}) = \frac{1}{g} det \left[ \begin{matrix} \nabla f & \nabla g \\ f & g \end{matrix} \right] det \left[ \begin{matrix} g & \nabla g \\ 1 & 1 \end{matrix} \right]^{-1} = \frac{g\nabla f - f\nabla g}{g \cdot {(g - \nabla g)}} \\ \delta(\frac{f}{g}) = \frac{1}{g} det \left[ \begin{matrix} \delta f & \delta g \\ f & g \end{matrix} \right] det \left[ \begin{matrix} g & \delta g \\ 0 & 1 \end{matrix} \right]^{-1} = \frac{g\delta f - f\delta g}{g^2} \end{array}

  • 级数:

n=abΔf(n)=f(b+1)f(a)n=abf(n)=f(b)f(a1)n=abδf(n)=f(b+12)f(a12)\begin{array}{c} \sum_{n=a}^b\Delta f(n) = f(b+1) - f(a) \\ \sum_{n=a}^b\nabla f(n) = f(b) - f(a-1) \\ \sum_{n=a}^b\delta f(n) = f(b+\frac{1}{2}) - f(a-\frac{1}{2}) \end{array}