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(n1)(nm+1)


Conversion from Non-Falling Powers

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

Where S(m,k)=1k!j=0k(1)kj(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(n1)+n
  2. n3=S(3,3)n3_+S(3,2)n2_+S(3,1)n1_+S(3,0)n0_=n(n1)(n2)+3n(n1)+n
  3. n4=S(4,4)n4_+S(4,3)n3_+S(4,2)n2_+S(4,1)n1_+S(4,0)n0_=n(n1)(n2)(n3)+6n(n1)(n2)+7n(n1)+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

Δ=EI

Like in calculus, the difference operator is linear:

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

Examples:

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

Difference of Falling Powers

Δnm_=mnm1_

Proof. If m0, then by definition

Δnm_=(n+1)n(nm+2)n(nm+2)(nm+1)=(m)(n(nm+2))


If m<0, then let μ=m

First, since nm_nm1_=(nm+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_=mnm1_

Difference of Exponentials

Δcn=(c1)cn

In particular, Δ2n=2n

Proof.

Δcn=cn+1cn=ccncn=(c1)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:

n1_δn=1+12++1n=Hn

Where Hn is the nth harmonic number! Thus by inverse, ΔHn=n1_.

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