Calculus of Finite Differences

From Notes
Jump to navigation Jump to search

This is the calculus of computer scientists.
This is the calculus of discrete mathematics I tried to discover when I was bored one day.
This is the calculus of making everything make sense.
This is the calculus of finite differences!

Motivation

Find closed form of the sum

∑k+1nk2

…without looking it up or guessing (then proving) the solution.


Falling Powers

The m-th falling power of n is defined as

nm_=n(n−1)…(n−m+1)


Conversion from Non-Falling Powers

nm=∑k=0mS(m,k)nk_

Where S(m,k)=1k!∑j=0k(−1)k−j(kj)jm is a Stirling number of the second kind.

Examples:

  1. n2=S(2,2)n2_+S(2,1)n1_+S(2,0)n0_=n(n−1)+n
  2. n3=S(3,3)n3_+S(3,2)n2_+S(3,1)n1_+S(3,0)n0_=n(n−1)(n−2)+3n(n−1)+n
  3. n4=S(4,4)n4_+S(4,3)n3_+S(4,2)n2_+S(4,1)n1_+S(4,0)n0_=n(n−1)(n−2)(n−3)+6n(n−1)(n−2)+7n(n−1)+n


Difference Operator

Analogous to derivative of continuous calculus.

Δg(n)=g(n+1)−g(n)

Let E denote the shift operator Eg(n)=g(n+1), and I the identity operator, then

Δ=E−I

Like in calculus, the difference operator is linear:

Δ(αf(n)+βg(n))=αΔf(n)+βΔg(n)

Examples:

  1. f(n)=n: Δf(n)=n+1−n=1
  2. f(n)=n2: Δf(n)=(n+1)2−n2=2n+1
  3. f(n)=n3: Δf(n)=(n+1)3−n3=3n2+3n+1

Difference of Falling Powers

Δnm_=mnm−1_

Proof. If m≥0, then by definition

Δnm_=(n+1)n…(n−m+2)−n…(n−m+2)(n−m+1)=(m)(n…(n−m+2))


If m<0, then let μ=−m

First, since nm_nm−1_=(n−m+1), we expect n−μ_=1(n+1)(n+2)…(n+μ). Thus by definition,

Δn−μ_=1(n+2)(n+3)…(n+μ)(n+μ+1)−1(n+1)(n+2)…(n+μ)=(n+1)−(n+μ+1)(n+1)(n+2)…(n+μ)(n+μ+1)=−μ(n+1)…(n+μ+1)=−μn−μ−1_=mnm−1_

Difference of Exponentials

Δcn=(c−1)cn

In particular, Δ2n=2n

Proof.

Δcn=cn+1−cn=c⋅cn−cn=(c−1)cn

Q.E.D.


Antidifference Operator

Analogous to antiderivative or indefinite integral of continuous calculus.

Δf(n)=g(n)⟺∑g(n)δn=f(n)

The antidifference operator is also linear:

∑(αf(n)+βg(n))δn=α∑f(n)δn+β∑g(n)δn

Antidifference of Falling Powers

∑nm_δn=1m+1nm+1_

Except in the case of m=−1:

∑n−1_δn=1+12+…+1n=Hn

Where Hn is the nth harmonic number! Thus by inverse, ΔHn=n−1_.

Antidifference of Exponentials

∑cnδn=1c+1cn


Sums

Analogous to definite integrals of continuous calculus.

∑k=abg(k) corresponds with ∫abg(x)dx

And so,

THE FUNDAMENTAL THEOREM OF CALCULUS
ddxf(x)=g(x)⟹∫abg(x)dx=f(b)−f(a)

is perfectly paralleled by

THE FUNDAMENTAL THEOREM OF FINITE DIFFERENCES
Δf(n)=g(n)⟹∑n=abg(n)=f(b+1)−f(a)


References

  • D. Gleich: Finite Calculus: A tutorial for solving Nasty Sums. Local PDF. External Link
  • Graham, Knuth, Patashnik: Concrete Mathematics, Addison Wesley
  • Ch. Jordan: Calculus of finite differences, AMS Chelsea, 1965