n阶差分与n阶求和的关系

目录

    • 1. 差分的定义
    • 2. 差分与级数部分和的联系

1. 差分的定义

定义 f ( x ) f(x) f(x)的差分(后向差分) ∇ f ( x ) \nabla f(x) f(x)

∇ f ( x ) = f ( x ) − f ( x − 1 ) (1) \nabla f(x)=f(x)-f(x-1)\tag 1 f(x)=f(x)f(x1)(1)
则有公式 ( 2 ) (2) (2)
∇ 2 f ( x ) = ∇ ( ∇ f ( x ) ) = ∇ ( f ( x ) − f ( x − 1 ) ) = f ( x ) − f ( x − 1 ) − [ f ( x − 1 ) − f ( x − 2 ) ] = f ( x ) − 2 f ( x − 1 ) + f ( x − 2 ) (2) \begin{aligned} \nabla^{2} f(x) & =\nabla(\nabla f(x)) \\ & =\nabla(f(x)-f(x-1)) \\ & =f(x)-f(x-1)-[f(x-1)-f(x-2)] \\ & =f(x)-2 f(x-1)+f(x-2) \end{aligned} \tag2 2f(x)=(f(x))=(f(x)f(x1))=f(x)f(x1)[f(x1)f(x2)]=f(x)2f(x1)+f(x2)(2)

因此称 ∇ n f ( x ) \nabla^{n} f(x) nf(x) f ( x ) f(x) f(x) n n n阶差分,并且 ∇ 0 f ( x ) = f ( x ) \nabla^0f(x)=f(x) 0f(x)=f(x)

2. 差分与级数部分和的联系

首先有个比较明显的关系:
∇ n + 1 f ( x ) = ∇ n f ( x ) − ∇ n f ( x − 1 ) \nabla^{n+1} f(x)=\nabla^{n} f(x)-\nabla^{n} f(x-1) n+1f(x)=nf(x)nf(x1)

再结合级数部分和的公式:

f ( x ) = ∑ a = 1 x [ f ( a ) − f ( a − 1 ) ] + f ( 0 ) f(x)=\sum_{a=1}^{x}[f(a)-f(a-1)]+f(0) f(x)=a=1x[f(a)f(a1)]+f(0)

就可以得到:
∇ n f ( x ) = ∑ a = 1 x [ ∇ n f ( a ) − ∇ n f ( a − 1 ) ] + ∇ n f ( 0 ) = ∑ a = 1 x ∇ n + 1 f ( a ) + ∇ n f ( 0 ) (3) \begin{aligned} \nabla^{n} f(x) & =\sum_{a=1}^{x}\left[\nabla^{n} f(a)-\nabla^{n} f(a-1)\right]+\nabla^{n} f(0) \\ & =\sum_{a=1}^{x} \nabla^{n+1} f(a)+\nabla^{n} f(0) \end{aligned} \tag3 nf(x)=a=1x[nf(a)nf(a1)]+nf(0)=a=1xn+1f(a)+nf(0)(3)

用上面的式子不断递归,并记 c n = ∇ n f ( 0 ) c_n= \nabla ^{n} f(0) cn=nf(0)

∇ n f ( x ) = [ ∑ a = 1 x ∇ n + 1 f ( a ) ] + c n = [ ∑ a = 1 x [ ∑ b = 1 a ∇ n + 2 f ( b ) ] + c n + 1 ] + c n = [ ∑ a = 1 x [ ∑ b = 1 a [ ∑ c = 1 b [ ∑ d = 1 c ∇ n + 4 f ( d ) ] + c n + 3 ] + c n + 2 ] + c n + 1 ] + c n (4) \begin{aligned} \nabla^{n} f(x) & =\left[\sum_{a=1}^{x} \nabla^{n+1} f(a)\right]+c_{n} \\ & =\left[\sum_{a=1}^{x}\left[\sum_{b=1}^{a} \nabla^{n+2} f(b)\right]+c_{n+1}\right]+c_{n} \\ & =\left[\sum_{a=1}^{x}\left[\sum_{b=1}^{a}\left[\sum_{c=1}^{b}\left[\sum_{d=1}^{c} \nabla^{n+4} f(d)\right]+c_{n+3}\right]+c_{n+2}\right]+c_{n+1}\right]+c_{n} \end{aligned} \tag4 nf(x)=[a=1xn+1f(a)]+cn=[a=1x[b=1an+2f(b)]+cn+1]+cn=[a=1x[b=1a[c=1b[d=1cn+4f(d)]+cn+3]+cn+2]+cn+1]+cn(4)

然后我们总结下上面发生的关系,并且把后面的常数尾巴提炼出来,写成多项式 :

∇ n f ( x ) = [ ∑ a = 1 x ∑ b = 1 a ∑ c = 1 b ⋯ ∑ q = 1 m ⏟ s ↑ ∇ n + s f ( q ) ] + c ( x ) \nabla^{n} f(x)=[\underbrace{\sum_{a=1}^{x} \sum_{b=1}^{a} \sum_{c=1}^{b} \cdots \sum_{q=1}^{m}}_{\mathrm{s} \uparrow} \nabla^{n+s} f(q)]+c(x) nf(x)=[s a=1xb=1ac=1bq=1mn+sf(q)]+c(x)

n = − s n=-s n=s
∇ − s f ( x ) = [ ∑ a = 1 x ∑ b = 1 a ∑ c = 1 b ⋯ ∑ q = 1 m ⏟ s ↑ ∇ 0 f ( q ) ] + c ( x ) = [ ∑ a = 1 x ∑ b = 1 a ∑ c = 1 b ⋯ ∑ q = 1 m ⏟ s ↑ f ( q ) ] + c ( x ) (5) \begin{aligned} \nabla^{-s} f(x) & =[\underbrace{\sum_{a=1}^{x} \sum_{b=1}^{a} \sum_{c=1}^{b} \cdots \sum_{q=1}^{m}}_{\mathrm{s} \uparrow} \nabla^{0} f(q)]+c(x) \\ & =[\underbrace{\sum_{a=1}^{x} \sum_{b=1}^{a} \sum_{c=1}^{b} \cdots \sum_{q=1}^{m}}_{\mathrm{s} \uparrow} f(q)]+c(x) \end{aligned} \tag5 sf(x)=[s a=1xb=1ac=1bq=1m0f(q)]+c(x)=[s a=1xb=1ac=1bq=1mf(q)]+c(x)(5)

可以看出负数阶差分相当于正数阶求和,求和是差分的逆运算。

你可能感兴趣的:(数字图像处理,python,算法,开发语言)