Skip to content

LTI difference equations

In this section, we will only be interested in LTI difference equations and ignore the more general cases.

Definition: Define the operator $\Delta$ as

\[
\Delta y[n]=y[n+1]
\]

$\Delta$ plays the same role in difference equations as $D=\frac{d}{dx}$ plays in differential equations.

Example: Consider the discrete function $x[n]=n^2-2n+U[n-4]$. Then $x[3]=3$, $\Delta x[3]=x[4]=9$.

Definition: A scalar LTI difference equation can be written as

\[
a_m y[n+m]+a_{m-1}y[n+m-1]+\cdots+a_1y[n+1]+a_0y[n]=f[n]
\]

or

\[
a_m\Delta^m y[n]+a_{m-1}\Delta^{m-1}y[n]+\cdots+a_1\Delta y[n]+a_0y[n]=f[n]
\]

or

\[
\left(a_m\Delta^m+a_{m-1}\Delta^{m-1}+\cdots+a_1\Delta+a_0\right)y[n]=f[n]
\tag{1}
\]

or, more economically,

\[
\sum_{r=0}^{m}a_{m-r}\Delta^{m-r}y[n]=f[n]
\]

where $a_m,\ldots,a_0\in\mathbb{R}$ and $a_m\ne0$. As discussed in the chapter on differential equations, we can divide both sides by $a_m$ to make the leading coefficient equal to $1$.

Definition: When $f[n]=0$, the scalar LTI difference equation is defined to be “unforced”.

Factorization of scalar LTI difference equations

Consider the factorized part of Eq. (1).

\[
\left(a_m\Delta^m+a_{m-1}\Delta^{m-1}+\cdots+a_1\Delta+a_0\right)
\]

We may consider this as a polynomial in $x$:

\[
a_m x^m+a_{m-1}x^{m-1}+\cdots+a_1x+a_0
\]

and factor it in terms of its roots. If the polynomial has $k$ distinct roots $\alpha_1,\ldots,\alpha_k$, and the root $\alpha_j$ has multiplicity $m_j$, this factorization takes the form:

\[
\begin{aligned}
&a_m x^m+a_{m-1}x^{m-1}+\cdots+a_1x+a_0\\
&\qquad=a_m(x-\alpha_1)^{m_1}\cdots(x-\alpha_{k-1})^{m_{k-1}}(x-\alpha_k)^{m_k}.
\end{aligned}
\]

Here $m_1+\cdots+m_k=m$. After dividing by $a_m\ne0$, the unforced difference equation can therefore be written as:

\[
(\Delta-\alpha_1)^{m_1}\cdots(\Delta-\alpha_{k-1})^{m_{k-1}}(\Delta-\alpha_k)^{m_k}y[n]=0.
\]

Solution of scalar unforced LTI difference equations

The solution of difference equations is similar to that of differential equations. In the interests of time, we will state the solution as a theorem without giving a proof.

Theorem: For nonzero characteristic roots $\alpha_1,\ldots,\alpha_k$, the general solution of the difference equation

\[
(\Delta-\alpha_1)^{m_1}\cdots(\Delta-\alpha_{k-1})^{m_{k-1}}(\Delta-\alpha_k)^{m_k}y[n]=0
\]

is

\[
\begin{aligned}
y[n]={}&
\left(C_1^1+C_2^1n+\cdots+C_{m_1}^1n^{m_1-1}\right)\alpha_1^n\\
&+\cdots+
\left(C_1^k+C_2^kn+\cdots+C_{m_k}^kn^{m_k-1}\right)\alpha_k^n\\
={}&\sum_{i=1}^{k}\left(\sum_{j=1}^{m_i}C_j^i n^{j-1}\right)\alpha_i^n.
\end{aligned}
\]

Example: Solve $(\Delta+3)^2(\Delta-5)^3y[n]=0$. What is the order of this equation? How many initial conditions are needed?

Solution:

\[
y[n]=\left(C_1^1+C_2^1n\right)(-3)^n
+\left(C_1^2+C_2^2n+C_3^2n^2\right)5^n.
\]

The equation is fifth order, hence it needs five initial conditions to determine the coefficients $C_1^1,C_2^1,C_1^2,C_2^2,C_3^2$.

Example: Solve the difference equation for the Fibonacci sequence.

Solution: The difference equation for the Fibonacci sequence can be written as $y[n+2]=y[n+1]+y[n]$. This is clearly an unforced scalar LTI difference equation. Initial conditions are $y[0]=1$, $y[1]=1$. Applying the steps defined above:

\[
\begin{aligned}
y[n+2]-y[n+1]-y[n]&=0\\
\Delta^2y[n]-\Delta y[n]-y[n]&=0\\
(\Delta^2-\Delta-1)y[n]&=0\\
\left(\Delta-\frac{1-\sqrt{5}}{2}\right)
\left(\Delta-\frac{1+\sqrt{5}}{2}\right)y[n]&=0.
\end{aligned}
\]

Therefore the solution is

\[
y[n]=C_1\left(\frac{1-\sqrt{5}}{2}\right)^n
+C_2\left(\frac{1+\sqrt{5}}{2}\right)^n.
\]

Applying the initial conditions will set up two equations for $C_1$ and $C_2$:

\[
\begin{aligned}
y[0]&=C_1+C_2=1,\\
y[1]&=C_1\left(\frac{1-\sqrt{5}}{2}\right)
+C_2\left(\frac{1+\sqrt{5}}{2}\right)=1.
\end{aligned}
\]

Complex conjugate roots

Complex conjugate roots are no exception to the above theorem. If our difference equation includes complex conjugate roots, each with multiplicity $m$:

\[
\cdots(\Delta-a-ib)^m(\Delta-a+ib)^m\cdots y[n]=0,
\]

the solution will be

\[
\begin{aligned}
y[n]={}&\cdots+
\left(C_1+C_2n+\cdots+C_m n^{m-1}\right)(a-ib)^n\\
&+\left(D_1+D_2n+\cdots+D_m n^{m-1}\right)(a+ib)^n+\cdots.
\end{aligned}
\]

Using Euler’s formula, we can write

\[
a\pm ib=Re^{\pm i\theta},
\]

where $R=\sqrt{a^2+b^2}$ and $\theta=\operatorname{atan2}(b,a)$. After substitution, we get

\[
\begin{aligned}
y[n]={}&\cdots+
\left(C_1+\cdots+C_m n^{m-1}\right)\left(Re^{-i\theta}\right)^n\\
&+\left(D_1+\cdots+D_m n^{m-1}\right)\left(Re^{i\theta}\right)^n+\cdots\\
={}&\cdots+
\left(C_1+\cdots+C_m n^{m-1}\right)R^n e^{-in\theta}\\
&+\left(D_1+\cdots+D_m n^{m-1}\right)R^n e^{in\theta}+\cdots.
\end{aligned}
\]

Using the same procedure as in the previous chapter, we can express the real-valued solutions as

\[
\begin{aligned}
y[n]={}&\cdots+
\left(A_1+\cdots+A_m n^{m-1}\right)R^n\cos(n\theta)\\
&+\left(B_1+\cdots+B_m n^{m-1}\right)R^n\sin(n\theta)+\cdots,
\end{aligned}
\]

where the constants $A_j$ and $B_j$ are real.

Summary: Steps in solving an unforced LTI difference equation

We can now summarize the method for solving an unforced scalar LTI difference equation with real coefficients and nonzero characteristic roots.

1. Check that the equation is linear, time-invariant, and unforced. Otherwise, the method presented here does not directly apply.

2. Divide the equation by its nonzero leading coefficient $a_m$ to make that coefficient equal to $1$.

3. Factor the characteristic polynomial to find its roots. With real coefficients, nonreal roots occur in complex conjugate pairs.

4. If the factorization contains a term $(\Delta-\alpha)^r$, where $\alpha$ is real, then $\alpha$ is a root of multiplicity $r$. Add the following term to the solution:

\[
\sum_{k=1}^{r}C_k n^{k-1}\alpha^n.
\]

5. If the factorization contains the factors $(\Delta-\alpha+i\beta)^r(\Delta-\alpha-i\beta)^r$, then $\alpha\pm i\beta$ are complex conjugate roots, each of multiplicity $r$. Find the polar representation

\[
\alpha+i\beta=Re^{i\theta},
\]

where $R=\sqrt{\alpha^2+\beta^2}$ and $\theta=\operatorname{atan2}(\beta,\alpha)$. Add the following terms to the solution:

\[
\begin{aligned}
&\left(\sum_{k=1}^{r}A_k n^{k-1}\right)R^n\cos(n\theta)\\
&\quad+\left(\sum_{k=1}^{r}B_k n^{k-1}\right)R^n\sin(n\theta).
\end{aligned}
\]

6. Use the initial conditions to determine the constants.

Stability of Solutions