Homogeneous Linear Difference Equations with Constant Coefficients

2.4. Homogeneous Linear Difference Equations with Constant Coefficients#

Here we focus on homogeneous linear difference equations with constant coefficients,

(2.12)#\[ a_0 y_n + a_1 y_{n+1} + a_2 y_{n+2} + \ldots + a_{k-1} y_{n+k-1} + a_k y_{n+k} = 0, \]

where \(a_p~(p=0,1,2,\ldots,k)\) are a given set of \(k+1\) constants, with \(a_0 \neq 0\) and \(a_k=1\).

Using the shift operator \(\E\), Eq. (2.12) can be written as

(2.13)#\[ \L (\E) y_n =0, \]

where \(\L (\E)\) is the operator function

(2.14)#\[ \L (\E)= a_0 + a_1 \E + a_2 \E^2 + \ldots + a_{k-1} \E^{k-1} + a_k \E^{k}. \]

Definition 2.10 (Characteristic Equation)

The characteristic equation associated with Eq. (2.12) or (2.13) is

(2.15)#\[ \L (z)= a_0 + a_1 z + a_2 z^2 + \ldots + a_{k-1} z^{k-1} + a_k z^{k}=0. \]

The characteristic equation is also called auxiliary equation.

Note

Note: We can replace the shift operator \(\E\) with \(z\) in Eq. (2.14) to obtain the characteristic equation. \(\L (z)\) is a \(k\)th-degree polynomial and thus has \(k\) roots \(z_p~ (p=1,2,3,\ldots,k)\).

Theorem 2.2

Let \(z_p~(p=1,2,3,\ldots,k)\) be any solution to the characteristic equation (2.15), then

(2.16)#\[\begin{equation} \phi_n = z_p^n \end{equation}\]

is a solution to the homogeneous equation (2.12).

Proof (click to show)

Substituting \(\phi_n=z_p^n\) for \(y_n\) into Eq. (2.13), we get

\[\begin{align*} \L (\E) z_p^n = ~ & \left(a_0 + a_1 \E + a_2 \E^2 + \ldots + a_{k-1}\E^{k-1}+a_k \E^k\right) z_p^n \\ ~ = ~ & a_0 z_p^n + a_1 z_p^{n+1} + a_2 z_p^{n+2} + \ldots + a_{k-1} z_p^{n+k-1} + a_{k} z_p^{n+k} \\ ~ = ~ & \left( a_0 + a_1 z_p + a_2 z_p^{2} + \ldots + a_{k-1} z_p^{k-1} + a_{k} z_p^{k} \right) z_p^n \\ ~ = ~ & 0 \cdot z_p^n \\ ~ = ~ & 0 \end{align*}\]

Note: Eq. (2.13) is equivalent to Eq. (2.12).

Theorem 2.3

Assume the \(k\) roots of the characteristic equation (2.15) are distinct, then a fundamental set of solutions is

(2.17)#\[\begin{equation} z_p^n \quad (p=1,2,\ldots,k). \end{equation}\]

An immediate consequence of this theorem, for this particular case, is that the general solution to the homogeneous equation (2.12) is

(2.18)#\[\begin{equation} y_n = c_1 z_1^n + c_2 z_2^n + \ldots + c_k z_k^n, \end{equation}\]

where the constants \(c_p~(p=1,2,\ldots,k)\) are arbitrary.

Note: There will be a coursework question asking you to prove this theorem.

2.4.1. First-order Difference Equations#

Find the solution to

\[ y_{n+1}-ay_n =0, ~ y_0 = Q.\]

Solution:

From the equation, we get

\[y_{n+1} = a y_n\]

so

\[y_n = a y_{n-1} = a ( a y_{n-2}) = a(a(ay_{n-3}))=\ldots=a^n y_0 = Q a^n.\]

Using the shift operator \(\E\), write the equation into

\[(\E-a) y_n = 0,\]

we get the characteristic equation

\[z -a =0,\]

and it has only one root \(z=a\). So the general solution is

\[y_n = c z^n, \]

Using the initial condition, we get

\[y_0 = Q = c \cdot a^0,\]
\[y_n = Q a^n.\]

2.4.2. Second-order Difference Equations#

Find the solution to

\[A y_{n+2} + B y_{n+1} + C y_n = 0.\]

Solution

Substituting \(y_n = z^n\) into the equation, we get

\[A z^{n+2} + B z^{n+1} + C z^n=0,\]

so

\[z^n (A z^2+B z+C)=0,\]

obviously the characteristic equation is

\[A z^2+Bz+C=0,\]
Note

To obtain the characteristic equation, we can also firstly write the difference equation into the \(\E\) operator form

\[ \left(A\E^2 + B\E + C\right) y_n = 0, \]

replacing \(\E\) with \(z\) gives the characteristic equation

\[ A z^2 + B z + C = 0 \]

and we get

\[z_{1,2}=\frac{-B\pm \sqrt{B^2-4AC}}{2A}.\]
  • Case 1: Two distinct real solutions;

  • Case 2: Two identical real solutions;

  • Case 3: Two complex conjugate solutions.

Case (1) Two different real solutions: \(z_1 \neq z_2\) and \(z_{1,2}\in \mathbb{R}\):

The general solution is

\[y_n = c_1 z_1^n + c_2 z_2^n.\]

Example 2.4

Find the general solution to

\[y_{n+2} + \frac{5}{6} y_{n+1} + \frac{1}{6} y_n = 0.\]

Case (2) Two repeated real solutions: \(z_1 = z_2 = z \in \mathbb{R}\):

The general solution is

\[y_n = \left(c_1 + c_2 n \right) z^n.\]

Example 2.5

Find the general solution to

\[y_{n+2}+y_{n+1}+\frac{1}{4} y_n = 0\]

Case (3) Two conjugate complex solutions: \(z_{1,2}=\alpha\pm \i \beta \in \mathbb{C}\), \(\i=\sqrt{-1}\):

The general solution is

\[y_n = r^n \left(c_1 \cos n\theta + c_2 \sin n\theta \right),\]

where \(r=\sqrt{\alpha^2+\beta^2}\), \(\theta=\tan^{-1}\left(\dfrac{\beta}{\alpha}\right)\).

Example 2.6

\[ y_{n+2} + \frac{1}{4} y_n = 0 \]

2.4.3. Higher-order Difference Equations#

For a \(k\)-th order difference equation

\[ a_0 y_n + a_1 y_{n+1} + a_2 y_{n+2} + \ldots + a_{k-1} y_{n+k-1} + a_k y_{n+k} = 0, \]

its characteristic equation

\[ a_0 + a_1 z + a_2 z^2 + \ldots + a_{k-1} z^{k-1} + a_k z^{k}=0 \]

has \(k\) roots \(z_p~(p=1,2,3,\ldots,k)\).

Case (1) \(k\) distinct real roots: \(z_1 \neq z_2 \neq \ldots \neq z_k \in \mathbb{R}\)

The general solution to the difference equation is

\[ y_n = c_1 z_1^n + c_2 z_2^n + \ldots + c_k z_k^n \]

Case (2) \(k\) repeated real roots: \(z_1 = z_2 = \ldots = z_k = z \in \mathbb{R}\)

The general solution to the difference equation is

\[ y_n = \left( c_1 + c_2 n + c_3 n^2 \ldots + c_k n^{k-1} \right) z^n \]

Case (3) \(m\)-pair (\(k=2m\)) distinct complex conjugate roots:

\[z_1 \sim z_k = \alpha_p \pm \i \beta_p =r_p e^{\pm \i \theta_p}~ \left(\i^2=-1, ~ p=1,2,\ldots,m\right)\]

The general solution to the difference equation is

\[\begin{align*} y_n = & ~ r_1^n \left(c_1 \cos n\theta_1 + c_2 \sin n\theta_1\right) + r_2^n \left(c_3 \cos n\theta_2 + c_4 \sin n\theta_2\right) \\ ~ & ~ + \ldots + r_m^n \left(c_{2m-1} \cos n\theta_m + c_{2m} \sin n\theta_m\right), \end{align*}\]

Case (4) \(m\)-pair (\(k=2m\)) repeated complex conjugate roots

\[z_1 \sim z_k = \alpha \pm \i \beta =r e^{\pm \i \theta}~ \left(i^2=-1, ~ p=1,2,\ldots,m\right)\]

The general solution to the difference equation is

\[\begin{align*} y_n = & ~ r^n \left(c_1 \cos n\theta + c_2 \sin n\theta\right) + r^n n \left(c_3 \cos n\theta + c_4 \sin n\theta\right) \\ ~ & ~ + \ldots + r^n n^{m-1}\left(c_{2m-1} \cos n\theta + c_{2m} \sin n\theta\right) \end{align*}\]

Example 2.7

If the roots of a characteristic equation are

\[z_1 \sim z_{13} = -\frac{1}{2}, \frac{1}{3}, \frac{3}{4}, \frac{3}{4}, \frac{3}{4}, 1\pm\sqrt{3}\i, 1\pm \i, 1\pm i, 1\pm \i, \]

find the general solution to the corresponding difference equation.

Note

If a difference equation with constant coefficients is NOT homogeneous

\[ a_0 y_n + a_1 y_{n+1} + a_2 y_{n+2} + \ldots + a_{k-1} y_{n+k-1} + a_k y_{n+k} = R(n), \quad R(n)\neq 0, \]

then we need to do a bit extra work to find the general solution to the equation. This is beyond the scope of our ODEs unit, so we will not cover it. Student interested in solving non-homogeneous difference equations can read