1 Preliminaries: Sequences and Difference Equations
1.1 Sequences
A sequence is a set of numbers formed according to some definite rule. For example the sequence
is formed by the squares of the positive integers.
If we write
then the general or term of the sequence (1) is . The notations and are also used sometimes to denote the general term. The notation is used as an abbreviation for a whole sequence.
An alternative way of considering a sequence is to view it as being obtained by sampling a continuous function. In the above example the sequence of squares can be regarded as being obtained from the function
by sampling the function at as shown in Figure 1.
Figure 1
The notation , as opposed to , for the general term of a sequence emphasizes this sampling aspect.
Task!
Find the general term of the sequence .
The terms of the sequence are the integer powers of 2:
so . Here the sequence are the sample values of the continuous function at
An alternative way of defining a sequence is as follows:
- give the first term of the sequence
- give the rule for obtaining the term from the .
A simple example is
where and are constants.
It is straightforward to obtain an expression for in terms of as follows:
(2)
This sequence characterised by a constant difference between successive terms
is called an arithmetic sequence.
Task!
Calculate the term of the arithmetic sequence defined by
.
Write out the first 4 terms of this sequence explicitly.
Suggest why an arithmetic sequence is also known as a linear sequence.
We have, using (2),
or
so (as given),
A graph of against would be just a set of points but all lie on the straight line , hence the term ‘linear sequence’.
1.2 Nomenclature
The equation
(3)
is called a difference equation or recurrence equation or more specifically a first order, constant coefficient, linear, difference equation.
The sequence whose term is
(4)
is the solution of (3) for the initial condition .
The coefficients in (3) are the numbers preceding the terms and so are 1 and respectively.
The classification first order for the difference equation (3) follows because the difference between the highest and lowest subscripts is
Now consider again the sequence
Clearly
so the difference here is dependent on i.e. is not constant. Hence the sequence is not an arithmetic sequence.
Task!
For the sequence calculate . Hence write down a difference equation and initial condition for which is the solution.
Hence is the solution of the homogeneous difference equation
(5)
with initial condition
The term ‘homogeneous’ refers to the fact that the right-hand side of the difference equation (5) is zero.
More generally it follows that
has solution sequence with general term
1.3 A second order difference equation
Second order difference equations are characterised, as you would expect, by a difference of 2 between the highest and lowest subscripts. A famous example of a constant coefficient second order difference equation is
or (6)
The solution of (6) is a sequence where any term is the sum of the two preceding ones.
Task!
What additional information is needed if (6) is to be solved?
Two initial conditions, the values of and must be specified so we can calculate
and so on.
Task!
Find the first 6 terms of the solution sequence of (6) for each of the following sets of initial conditions
- (7)
The sequence (7) is a very famous one; it is known as the Fibonacci Sequence . It follows that the solution sequence of the difference equation (6)
with initial conditions is the Fibonacci sequence. What is not so obvious is what is the general term of this sequence.
One way of obtaining in this case, and for many other linear constant coefficient difference equations, is via a technique involving transforms which we shall introduce shortly.
1.4 Shifting of sequences
Right Shift
Recall the sequence or, writing out the first few terms explicitly,
The sequence contains the same numbers as but they are all shifted one place to the right. The general term of this shifted sequence is
Similarly the sequence
has general term
Task!
For the sequence write out explicitly the first 6 terms and the general terms of the sequences and obtained respectively by shifting the terms of
- one place to the right
- three places the the right.
The operation of shifting the terms of a sequence is an important one in digital signal processing and digital control. We shall have more to say about this later. For the moment we just note that in a digital system a right shift can be produced by delay unit denoted symbolically as follows:
Figure 2
A shift of 2 units to the right could be produced by 2 such delay units in series:
Figure 3
(The significance of writing will emerge later when we have studied transforms.)
Left Shift
Suppose we again consider the sequence of squares
with .
Shifting all the numbers one place to the left (or advancing the sequence) means that the sequence generated has terms
and so has general term
Notice here the appearance of the zero subscript for the first time.
Shifting the terms of one place to the left or equivalently the terms of two places to the left generates a sequence where
and so on.
The general term is
Task!
If is the Fibonacci sequence, write out the terms of the sequences .
where (arrowed),
where (arrowed),
It should be clear from this discussion of left shifted sequences that the simpler idea of a sequence ‘beginning’ at and containing only terms has to be modified.
We should instead think of a sequence as two-sided i.e. defined for all integer values of and zero. In writing out the ‘middle’ terms of a two sided sequence it is convenient to show by an arrow the term .
For example the sequence could be written
A sequence which is zero for negative integers is sometimes called a causal sequence.
For example the sequence, denoted by ,
is causal. Figure 4 makes it clear why is called the unit step sequence .
Figure 4
The ‘curly bracket’ notation for the unit step sequence with the term arrowed is
Task!
Draw graphs of the sequences where is the unit step sequence.