The approach to solving linear constant coefficient difference equations is to find the general form of all possible solutions to the equation and then apply a number of conditions to find the appropriate solution. The two main types of problems are initial value problems, which involve constraints on the solution at several consecutive points, and boundary value problems, which involve constraints on the solution at nonconsecutive points.

The number of initial conditions needed for an $N$th order difference equation, which is the order of the highest order difference or the largest delay parameter of the output in the equation, is $N$, and a unique solution is always guaranteed if these are supplied. Boundary value probelms can be slightly more complicated and will not necessarily have a unique solution or even a solution at all for a given set of conditions. Thus, this section will focus exclusively on initial value problems.

Consider some linear constant coefficient difference equation given by $Ay\left(n\right)=f\left(n\right)$, in which $A$ is a difference operator of the form

$$A={a}_{N}{D}^{N}+{a}_{N-1}{D}^{N-1}+...+{a}_{1}D+{a}_{0}$$

1

where $D$ is the first difference operator

$$D\left(y\right(n\left)\right)=y\left(n\right)-y(n-1).$$

2

Let ${y}_{h}\left(n\right)$ and ${y}_{p}\left(n\right)$ be two functions such that $A{y}_{h}\left(n\right)=0$ and $A{y}_{p}\left(n\right)=f\left(n\right)$. By the linearity of $A$, note that $L({y}_{h}\left(n\right)+{y}_{p}\left(n\right))=0+f\left(n\right)=f\left(n\right)$. Thus, the form of the general solution ${y}_{g}\left(n\right)$ to any linear constant coefficient ordinary differential equation is the sum of a homogeneous solution ${y}_{h}\left(n\right)$ to the equation $Ay\left(n\right)=0$ and a particular solution ${y}_{p}\left(n\right)$ that is specific to the forcing function $f\left(n\right)$.

We wish to determine the forms of the homogeneous and nonhomogeneous solutions in full generality in order to avoid incorrectly restricting the form of the solution before applying any conditions. Otherwise, a valid set of initial or boundary conditions might appear to have no corresponding solution trajectory. The following sections discuss how to accomplish this for linear constant coefficient difference equations.

In order to find the homogeneous solution to a difference equation described by the recurrence relation ${\sum}_{k=0}^{N}{a}_{k}y(n-k)=f\left(n\right)$, consider the difference equation ${\sum}_{k=0}^{N}{a}_{k}y(n-k)=0$. We know that the solutions have the form $c{\lambda}^{n}$ for some complex constants $c,\lambda $. Since ${\sum}_{k=0}^{N}{a}_{k}c{\lambda}^{n-k}=0$ for a solution it follows that

$$c{\lambda}^{n-N}\sum _{k=0}^{N}{a}_{k}{\lambda}^{N-k}=0$$

3

so it also follows that

$${a}_{0}{\lambda}^{N}+...+{a}_{N}=0.$$

4

Therefore, the solution exponential are the roots of the above polynomial, called the characteristic polynomial.

For equations of order two or more, there will be several roots. If all of the roots are distinct, then the general form of the homogeneous solution is simply

$${y}_{h}\left(n\right)={c}_{1}{\lambda}_{1}^{n}+...+{c}_{2}{\lambda}_{2}^{n}.$$

5

If a root has multiplicity that is greater than one, the repeated solutions must be multiplied by each power of $n$ from 0 to one less than the root multipicity (in order to ensure linearly independent solutions). For instance, if ${\lambda}_{1}$ had a multiplicity of 2 and ${\lambda}_{2}$ had multiplicity 3, the homogeneous solution would be

$${y}_{h}\left(n\right)={c}_{1}{\lambda}_{1}^{n}+{c}_{2}n{\lambda}_{1}^{n}+{c}_{3}{\lambda}_{2}^{n}+{c}_{4}n{\lambda}_{2}^{n}+{c}_{5}{n}^{2}{\lambda}_{2}^{n}.$$

6

Example 1

Recall that the Fibonacci sequence describes a (very unrealistic) model of what happens when a pair rabbits get left alone in a black box... The assumptions are that a pair of rabits never die and produce a pair of offspring every month starting on their second month of life. This system is defined by the recursion relation for the number of rabit pairs $y\left(n\right)$ at month $n$

$$y\left(n\right)-y(n-1)-y(n-2)=0$$

7

with the initial conditions $y\left(0\right)=0$ and $y\left(1\right)=1$.

Note that the forcing function is zero, so only the homogenous solution is needed. It is easy to see that the characteristic polynomial is ${\lambda}^{2}-\lambda -1=0$, so there are two roots with multiplicity one. These are ${\lambda}_{1}=\frac{1+\sqrt{5}}{2}$ and ${\lambda}_{2}=\frac{1-\sqrt{5}}{2}$. Thus, the solution is of the form

$$y\left(n\right)={c}_{1}{\left(\frac{1+\sqrt{5}}{2}\right)}^{n}+{c}_{2}{\left(\frac{1-\sqrt{5}}{2}\right)}^{n}.$$

8

Using the initial conditions, we determine that

$${c}_{1}=\frac{\sqrt{5}}{5}$$

9

and

$${c}_{2}=-\frac{\sqrt{5}}{5}.$$

10

Hence, the Fibonacci sequence is given by

$$y\left(n\right)=\frac{\sqrt{5}}{5}{\left(\frac{1+\sqrt{5}}{2}\right)}^{n}-\frac{\sqrt{5}}{5}{\left(\frac{1-\sqrt{5}}{2}\right)}^{n}.$$

11

Finding the particular solution is a slightly more complicated task than finding the homogeneous solution. It can be found through convolution of the input with the unit impulse response once the unit impulse response is known. Finding the particular solution ot a differential equation is discussed further in the chapter concerning the z-transform, which greatly simplifies the procedure for solving linear constant coefficient differential equations using frequency domain tools.

Example 2

Consider the following difference equation describing a system with feedback

$$y\left(n\right)-ay(n-1)=x\left(n\right).$$

12

In order to find the homogeneous solution, consider the difference equation

$$y\left(n\right)-ay(n-1)=0.$$

13

It is easy to see that the characteristic polynomial is $\lambda -a=0$, so $\lambda =a$ is the only root. Thus the homogeneous solution is of the form

$${y}_{h}\left(n\right)={c}_{1}{a}^{n}.$$

14

In order to find the particular solution, consider the output for the $x\left(n\right)=\delta \left(n\right)$ unit impulse case

$$y\left(n\right)-ay(n-1)=\delta \left(n\right).$$

15

By inspection, it is clear that the impulse response is ${a}^{n}u\left(n\right)$. Hence, the particular solution for a given $x\left(n\right)$ is

$${y}_{p}\left(n\right)=x\left(n\right)*\left({a}^{n}u\left(n\right)\right).$$

16

Therefore, the general solution is

$${y}_{g}\left(n\right)={y}_{h}\left(n\right)+{y}_{p}\left(n\right)={c}_{1}{a}^{n}+x\left(n\right)*\left({a}^{n}u\left(n\right)\right).$$

17

Initial conditions and a specific input can further tailor this solution to a specific situation.

Linear constant coefficient difference equations are useful for modeling a wide variety of discrete time systems. The approach to solving them is to find the general form of all possible solutions to the equation and then apply a number of conditions to find the appropriate solution. This is done by finding the homogeneous solution to the difference equation that does not depend on the forcing function input and a particular solution to the difference equation that does depend on the forcing function input.