You are on page 1of 12

How to Differentiate and Integrate Sequences

Author(s): Donald R. Chalice


Source: The American Mathematical Monthly, Vol. 108, No. 10 (Dec., 2001), pp. 911-921
Published by: Mathematical Association of America
Stable URL: http://www.jstor.org/stable/2695414
Accessed: 04-07-2017 23:36 UTC

JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted
digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about
JSTOR, please contact support@jstor.org.

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at
http://about.jstor.org/terms

Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access
to The American Mathematical Monthly

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
How to Differentiate and Integrate Sequences

Donald R. Chalice

The main purpose of this note is to show how to apply "discrete calculus" to solve cer-
tain discrete differential equations. Along the way we easily obtain closed formulas for
sums such as E>L3 km, and prove discrete analogues of Taylor's formula and the Chain
Rule (involving moving averages). Discrete integrating factors allow us to express the
solutions of certain of our discrete differential equations naturally as convolutions.
Such a solution may be interpreted as a convolution of the "impulse response" of the
system with the "driving sequence". This has an analog in differential equations: The
driven harmonic oscillator whose solution is the convolution of the "impulse response"
with the driver. Our main point is to use one's calculus/differential equations intuition
to solve certain discrete differential equations, whose solutions are usually found by
guessing and induction.
So let us begin by first discussing discrete calculus. All of our sequences are se-
quences of real or complex numbers

Definition 1. Let A(n), n = 0, 1, 2, . .. be a sequence. Define the forward discrete


derivative or simply the discrete derivative of A(n) at n to be

AA(n) = A(n + 1)-A(n), n = 0, 1, 2,.

Let k be a positive integer and let pk (n) denote the space of polynomials of degree
k in n. Evidently, pk(n) has dimension k + 1 and is spanned by 1, n, n2, ... , nk.
The natural basis for pk (n) is the following set of polynomials in n (ordered by
degree):

po(n) = 1, p1(n) = n, p2(n) = n(n-1), p3(n) = n(n- 1)(n-2),

pk(n) = n(n-1)(n-2) ...(n-k + 1).

One verifies that the natural basis is indeed a basis of pk (n). The reason we call
it the natural basis for pk (n) is that, just as the derivative of xk is kxk-1, the discrete
derivative of pk(n) is kpk I(n):

Apk(n) = kpk-1(n) and AII/pk(n)] = -k/Pk+l(n + 1).

Likewise, for any constant m, APpk(n + m) = kpkl (n + m). Evidently, with k fixe
Pk (n) is the number of permutations of size k from n objects.
The following differentiation rules hold:

* A [A(n) + CB(n)] = AA(n) + CAB(n).

* A [A(n)B(n)] = A(n + 1)AB(n) + B(n)AA(n) and also

* A [A(n)B(n)] = B(n + 1)AA(n) + A(n)AB(n)

A [A(n) B(n)AA(n) - A(n)AB(n) B(n + 1)AA(n) - A(n + 1)AB(n)


LB(n) B(n)B(n + 1) B(n)B(n + 1)

December 2001 ] HOW TO DIF;FERENTIATE AND INTEGRATE SEQUENCES 911

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
Since the series E' AA(k) is collapsing, the fundamental theorem is immediate:

* (Fundamental Theorem) / AA(k) = A(k)t [j-o - A(n + 1) - A(O).

Note the 1 appended to the upper limit of the summation in the Fundamental The-
orem. As in Calculus, we differentiate P (k) Q (k) and then integrate both sides from 0
to n to get the integration by parts formula (again notice the added 1):

* ZnP(k)AQ(k) = P(k)Q(k)ln+l _ - nQ(k + I)AP(k).

At this point is it easy to derive formulas for sums:

Proposition 2. En k3 = (n (n + 1) /2)2. Thus, n k3 = (n k)2.

Proof. Expand k3 in terms of the natural basis,

k3 = k(k-1)(k-2) + 3k(k-1) + k =p3(k) + 3p2(k) + pi (k),

then integrate:

nk nLAP4()+ p3( k)+APA() fP4(k)? ~ k PA(


Ek=O 4 2 24 2
(n + 1)n(n-1)(n-2) + 4(n + 1)n(n-1) + 2(n + 1)n
4

(n+ I)n[(n-1)(n+2) +2] = In2(n + 1)21


4 (n4 12

Since Ark = rk(r - 1), it is


is a consequence of the fundamental theorem:

n n Ark rn+l 1

o O r-1 r-1
Definition 3. (Higher Order Derivatives) Let A (n), n = 0, 1, 2, ... be a sequence.
Then the 2ndforward difference or 2nd discrete derivative is found by taking the for-
ward difference twice: A2A (n) = A (A A (n)). The kth forward difference or discrete
derivative is found by taking the forward difference k times; we denote it by

AkA(n) = A(... A (A A (n)) ... ) (k times).

Theorem 4. (Taylor's Theorem) If p (n) E pk (n) then

IL2p (0) Akp (0)


p(n) = p(O) + Alp(0)pl(n) + 2! p2(n)
Proof. Since the Pk (n) are a basis we can expand p (n)
and then differentiation gives the Taylor coefficients

p(n) = aopo(n) +alp,(n) + * * * + akpk(n), so

Ak p(0) = akA\ Pk(0) = akk!pO(0) = akk!

912 ? )THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 108

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
The expansion of k3 used in proving Proposition 2 is actually the Taylor expansion
of k3. The next Taylor theorem holds for any sequence.

Theorem 5. (Generalized Taylor Theorem) For any sequence A(n),

A(n +k) = A(n) + (k) AA(n) + (A2 A(n) + + (k) AkA(n). (*

Proof The result is true for k = 1, so suppose (*) is true for k. Take A of both sides,
and add (*) to get

A(n +k+ 1) -A(n+k) = k(.)/Aj+?A(n)


j=o J

A(n +k + 1) = E 4 j I) AA(n) + (k)A JA(n)

= AA(n) + >3 j-I + A1A(n) + A(J'A(n)

(k+l)AjA( )

Applying the following identities repeatedly also proves Theorem 5.

* A1A(n) = A(n + 1) - A(n)

* A2A(n) = A(n + 2) -2A(n + 1) + A(n)

* A3A(n) = A(n + 3)-3A(n + 2) + 3A(n + 1)-A(n)

* A4A(n) = A(n + 4)-4A(n + 3) + 6A(n + 2)-4A(n + 1) + A(n), etc.

Now suppose N(k) is a sequence of non-negative integers. Then

N(n+l)-1

A(A(N(n)) = A(N(n + 1)) - A(N(n)) = >3 AA(k)


k=N(n)

N(n+l)-1

= AN(n) >3 AA(k)/AN(n)


k=N(n)

= pt(AA(n), AN(n))AN(n),

where

n+N-1

/(AA(n), N) = N > A A(k)

is the moving average of the N derivatives starting at AA(n). Thus we have:

December 2001] HOW TO DIFFERENTIATE AND INTEGRATE SEQUENCES 913

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
Theorem 6. (Chain Rule) If N(n) is a sequence of non-negative integers, then

A(A(N(n)) = ,u(AA(n), AN(n))AN(n),

where ,u(AA(n), AN(n)) is the moving average of the AN(n) derivatives starting at
AA(n).

From Taylor's Theorem the following uniqueness properties are immediate:

* If AA(n) = 0 for all n, then A(n) is constant.

* If AA(n) = A B(n) for all n, then A(n) and B(n) differ by a constant.

* If A2A(n) = 0 for all n, then A(n) = Bn + C is linear.

* If A3A(n) = 0 for all n, then A(n) = Bn(n - 1) + Cn + D is quadratic, etc.

If we let A(n) = En k3, then AA(n-1) = n3, A 2A(n-1) = 3n2 + 3n


A3A(n - 1) = 6n + 6, A4A(n - 1) = 6, and A5A(n - 1) = 0. Thus uniqueness and
Taylor's Theorem may also be used to demonstrate Proposition 2.
We now rely on the analogy to calculus to solve certain discrete differential equa-
tions.
A sequence A (n) of real numbers is an orbit of a first order discrete dynamical
system if there is a function f: R > R such that

A(n + 1) = f(A(n)).

By subtracting A(n) from both sides we get a first order discrete differ
or difference equation: A A (n) = f (A (n)) -A (n) = g (A (n)). As in the continuous
case, a discrete differential equation of the form

AA(n) = g(A(n)), A(O) = aO

is called an initial value problem. An equation that expresses A (n + 1) as a function of


the previous k terms is said to be a dynamical system of order k. It may be convenient
to use the identities after Taylor's Theorem to re-express a dynamical system of order
k as a discrete differential equation involving discrete derivatives up to order k. Here
are some examples and their solutions using discrete calculus.

* The linear dynamical system

A(n + 1) = A(n) + b.

Solution: AA(n) = b. Thus by uniqueness, A(n) = bn + aO.

* The affine dynamical system

A(n + 1) = rA(n) + b.

Solution: AA(n) = rAA(n - 1), so AA(n) = rAA(n - 1) = = rnAA(0).


Thus, by the Fundamental Theorem,

A(n) - A(O) = ErkAA(O) = 1 /r A (0),

914 ? THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 108

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
or

A(n) = 1 AA(O) + A(O)


-r

= A(O)rn + b , its more usual form.


I-r

The equations in the two preceeding examples are easily solved without discrete
calculus as well. The first can be solved by expanding

A(n + 1) = A(n) + b = A(n -1) + 2b = = A(O) + (n + I)b.

The second can be solved by subtracting the fixed point c = rc + b from both sides to
get a homogeneous equation

B(n + 1) = rB(n) = =n+B(O),

where B(n) = A(n) - c. See [5, p. 51].

* The non-homogeneous linear dynamical system

A(n + 1) = A(n) + p(n),

where p(n) is a polynomial of degree k in n.

Solution: This is equivalent to the discrete differential equation AA(n) = p(n), so


by integration, the solution is a polynomial of degree k + 1.

* The non-homogeneous affine dynamical system

A(n + 1) = rA(n) + p(n). (1)

Solution: The method used to solve the affine system can be used for say p(n) a
polynomial of low degree but it becomes notationally complicated. Instead, we observe
that equation (1) is equivalent to

AA(n) + (1 - r)A(n) = p(n).

By analogy, since linear differential equations with constant coefficients are solved
with integrating factors, we try to do the same. Observe that

Ar -n r--1 (- r).

Thus, multiplying both sides by r-n1 gives

r-n-1AA(n) + r (-n- (-r)A(n) = r-n-Ip(n)

or

A(r-nA(n)) = r-n-I p(n).

December 2001] HOW TO DIFFERENTIATE AND INTEGRATE SEQUENCES 915

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
Integration from 0 to n gives

A(n + I)r -n- -A(O) = r-k-I p(k),


0

or

A(n + 1) = r n+A(O) + Ern-kp(k)


0

= rn+?A(O) + (r *p)(n), n > 0,

where the convolution (r * p)(n) of r(n) = rn and p(n) is defined as follows:

Definition 7. Given two sequences A(n), B(n), their convolution is the sequence
n

(A * B)(n) = C(n) = ZA(n - k)B(k).


k=O

The generating function of a sequence A(n) is

00

A(z) = E3A(k)zk.
k=O

Theorem 8. The solution of the non-homogeneous affine dynamical system

A(n + 1) = rA(n) + p(n) (2)

is a linear combination of the exponential


r(n) = rn and p(n) atn - 1:

A(n) = r nA(O) + (r * p)(n-1) n > 1

For illustration, we use discrete integration by parts to calculate the c


of rn and the first and second basis elements, PI and P2. Let n be given

(r*pi)(n~-1)=rnr-k-lk=rn k Ar =rn krn k | n -k

n rn(rn( )
1-r (1r)2'

and
0 0~~00

(r* P2)(n-1

= n-1 -kk1 n= A (-1 r n = k(k I )r n-k n _n-12 rn-k

= r n( klk ) (r- * pk)(n - 1) = [p2(n)-2r(r* pi)(n-1)]


1-r 1-r 1 -r

n(n - 1) 2nr r2 (rn-1)


_ _
1-r _ - +~~~I
(1-r)2 r
(1-r)2

916 ?n THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 108

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
which we can view as a combination of a polynomial of degree 2 with r'. Continuing
the induction shows the following:

Corollary 9. [5, p. 108] If p (n) is a polynomial of degree m, then the solution to the
non-homogeneous affine dynamical system

A(n + 1) = rA(n) + p(n)

is a linear combination of the exponential rn and a polynomial of degree of degree m.

The nth term of the convolution of two sequences is the nth term of the product
of their generating functions, so multiplying generating functions is an easy way to
find convolutions. Discrete integration by parts can also be a way to calculate certain
convolutions.
In the language of differential equations, the solution to a driven harmonic oscillator
is the convolution of the impulse response with the driver [1, p. 544]. In the language
of deterministic time series [4, pp. 157-173], the outgoing time series (sequence) xn
produced by a time invariant linear filter (transformation) xn = L(sn) on an incoming
time series (sequence) Sn is the convolution of the impulse response hn = L(8n) of the
filter with the incoming times series, i.e., xn = (h * S)n. An example of a linear filter
Xn= L(sn) is the so called auto-regressive moving average filter,

Xn= aXn-l + a2xn-2 + b1sn + b2Sn-1

that calculates the nth term xn of the outgoing time series from the average of its
previous two terms (auto-regression) and a moving average of terms of the incom-
ing series n. We consider two impulse responses: The impulse response hn = L( n)
which is the response to

I ifn=O
Sn = 3n =i0 if n :A 0

The second is the impulse response found by changing th

Xn= aXn- +a2xn-2 + bsn + b2sn- + Pn

to Pn = a(n). This second impulse response is analogous to the impulse response of


the driven harmonic oscillator. Comparing this to Theorem 8, we see that rn is the
solution to the undriven equation with initial condition 1 and that

rn-I if n> 1
R(n)= if n10
is the "driver impulse" response of the equation with initial condition A (0) = 0. Thus,
as (R * p)(n) = (r * p)(n - 1) for n > 1, we can interpret the solution to (2) as A(0)
times the undriven solution with initial condition 1 plus the convolution with the driver
p (n) of the "driver impulse" response R (n) of the system with 0 initial condition.

* The non-homogeneous affine dynamical system A(n + 1) = rA(n) + s(n), where


s (n) = Sn is an exponential in n.

December 2001 ] HOW TO DIFFE;RENTIATE AND INTEGRATE SEQUENCES 9 17

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
Solution: The equivalent discrete differential equation is AA(n) + (1 - r)A(n) -
Sn. Applying Theorem 8, we have

A(n) = rnA(O) + (r * s)(n -1), n > 1.

We can calculate the convolution of the exponentials r (n) = rn and s(n) = Sn as

n n-k k n n k 1n (s/r )n?l r n?l - s


(r * s)(n) = j rnksk = r' 2i(s/r) = - fs/r r
Y ,(slr ~ ~~1(s/r) r- s
and as

(r * s)(n) = rnZ(s/r)k = (n + 1)rn if s = r.


0

Thus our solution [5, p. 115] is

A(n) | A(O)rn + _ if r s
A(O)rn + nr n- if r =s.

Theorem 8 applies as well when the right-hand side is a combination of exponen-


tials, or a combination of exponentials and polynomials. One has to calculate only the
appropriate convolution.
We have illustrated the use of discrete integrating factors and discrete integration
in solving linear discrete differential equations. This method is an alternative to the
guessing method that is usually presented to students, and gives more insight into the
appearance of the solutions. We conclude with a look at one higher-order dynamical
system from this point of view.
A higher-order difference equation is really a higher-order discrete differen-
tial equation in disguise. If it is linear, the equivalent higher-order discrete dif-
ferential equation can be transformed to a higher-dimensional first-order discrete
differential equation, just as in linear differential equations. The new first-order dis-
crete differential equation can then be solved using an integrating factor as in the
one-dimensional case. We illustrate with one example.

Example 10. The Fibonacci sequence is generated by the difference equation

A(n + 2) = A(n + 1) + A(n), with A(O) = A(1) = 1. (3)

Solution: This is really a 2nd order discrete differential equation disguised as

A2A(n) = A(n) - AA(n).

To transform (3) to a 2-dimensional discrete differential equation, let B(n) = AA(n):

(/\A(n)) + ( -1 )(A (n)) =0 (4)

Now, AR -n = R-n-1(I - R). Thus setting

I9-R ? TE M A weChave R A [ l

918()TH MAHEMTIAL SSOIAIONOF MEIC [Mnhl 0

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
and our integrating factor is R-n-1:

R-n-1 (A A(n) + R-n- ( 0 1"\ (A (n)) = (O)

A R- is[_ A (n)) :1 (?
Lk B(n)}J0)
Integration gives

R -n A(n)) I (ON or (A (n)~ R=


(B(n)) (O Bn0)) 0
By diagonalization, R = BDB-1, where

B=(+4
B= +,51-VH)
1 2 J5

is the eigenbasis written vertically,

D= ( 2 1_3) and B-1 2


2'1 V35\ 1 2'~

Thus,

A(n')) 2 ) ? -l1
B(n) \ 0 2 n J) o 0
or

A(n) =

Of course, what is striking about this recursion is that irrationals are used
a sequence of integers. It is amusing to use a computer algebra system to d
function A(n) and check the values at various integers. The characteristic f
p. 120] leads to a quick but perhaps less enlightening solution.
We can perturb the Fibonacci tree by pruning at the nth stage by adding a driving
function p (n) to the dynamical system that defines the Fibonacci sequence. This gives
the second-order dynamical system

A(n + 2) = A(n + 1) + A(n) + p(n), (n > 0) with A(0) = A(1) = 1.

Solving this leads to replacing the zero right-hand side in (4) by (0 p(n))T. Thus:

( AA(n) ( 0 -1 "(A(n)8 ( 0
tAB(n)! V-1 1 }B(n)} p(n)}

R_n-1 tAA(n) + R-n-1 0 -1 (A


AB(n) - 1 kB(n) p(n)

A L B(n)] p(n))

December 2001] HOW TO DIFFERENTIATE AND INTEGRATE SEQUENCES 919

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
By integration to n - 1,

R -n ( )_ R-k-I or
( (n) _n I1\nZZI

(B(n) = R 0(o) + pRn-i-k (k))

=R (0) +R*P(n-1) forn>1,

where R(n) = Rn and P(n) = (O p(n))T. Apply diagonalization to further simplify


the final result, which is the superposition of the original Fibonacci sequence and a
convolution.
We give one final interpretation that involves impulse response and unit initial con-
ditions. The solution of the undriven system with initial conditions A(O) = 1 and
A(1) = O is

H?(n) = Rn(1).

The solution of the undriven system with initial conditions A (0) = 0 and A (1) = 1 is

H1(n) =Rn 0

and the response of the system with 0 initial conditions to the impulse driver p(n) =
8(n) is

n-I R1 0 ) Rn-1() if n>1I


H(n) = ER n ( -k ) = Ro (1) l
0 p (k) 0~() if n ='
Thus the general solution with initial conditions Ao and A1 may be written as

=An) R n fYRj E n-l-kr


RB(n) A (-) + Rp(k) (

= AOH0(n) + AiH1(n) + E H(n - k)p(k),


0

which is a linear combination of the Fibonacci sequence delayed by 2 time units and
preceeded by 1 and 0, the Fibonacci sequence delayed by 1 time unit and preceeded
by 0, and the convolution of the impulse driver response with the driver.

REFERENCES

1. Paul Blanchard, Robert L. Devaney, and Glen R. Hall, Differential Equations, Brooks-Cole, Boston, 1998.
2. Robert L. Devaney, An Introduction to Chaotic Dynamical Systems, Benjamin Cummings, Menlo Park,
1986.

920 ? THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 108

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms
3. C.L. Liu, Elements of Discrete Mathematics, McGraw-Hill, New York, 1977.
4. Enders A. Robinson and Manuel T. Silvia, Digital Foundations of Time Series Analysis, Holden-Day, San
Francisco, 1979.
5. James T. Sandefur, Discrete Dynamical Systems, Clarendon Press, Oxford, 1990.

DON CHALICE (ethnic spelling Ceilesh) received his Bachelor's degree at Wisconsin (where he was a Sloan
Scholar) and his Ph.D. at Northwestern University in Banach algebras. He is a strong proponent of the Modified
Moore Method and teaches 80-90% of his courses in this manner. His interests include Banach function
algebras, complex analysis, and discrete dynamics. He lives in Northwest Washington with his wife Coral and
three large dogs.
Western Washington University, Bellingham WA 98225 MS 9063
chalice@cc.wwu.edu

December 2001] HOW TO DIFFERENTIATE AND INTEGRATE SEQUENCES 921

This content downloaded from 129.252.86.83 on Tue, 04 Jul 2017 23:36:06 UTC
All use subject to http://about.jstor.org/terms

You might also like