Mathematics.

discrete dynamical systems

Difference Equations

Differential Equations30 minDifficulty5 out of 10

You should know: recurrence relations

Overview

A difference equation (also called a discrete-time dynamical system) is the discrete analogue of a differential equation: instead of relating a function to its derivatives, it relates a sequence aₙ to its own earlier terms aₙ₋₁, aₙ₋₂, etc. A linear difference equation with constant coefficients, aₙ = c₁aₙ₋₁ + c₂aₙ₋₂ + ⋯ + cₖaₙ₋ₖ + g(n), is solved with machinery that closely mirrors constant-coefficient linear ODEs: a 'characteristic equation' whose roots determine the homogeneous solution, plus a particular solution for any forcing term g(n) found by an undetermined-coefficients-style guess. Difference equations arise naturally whenever a process is sampled or updated at discrete time steps — compound interest, population census data, and any recursively-defined sequence.

Intuition

Where a differential equation's trial solution eʳˣ survives differentiation by picking up a factor of r each time, a difference equation's trial solution rⁿ survives the shift n → n+1 by picking up the same factor of r each time: r^{n+1} = r · rⁿ. That single parallel — 'multiplying by r' replaces 'differentiating' — is why every technique for constant-coefficient ODEs (characteristic equations, superposition of exponential solutions, undetermined coefficients for particular solutions) has a direct discrete counterpart for difference equations, with rⁿ playing the role that eʳˣ plays continuously.

Formal Definition

Definition

For a constant-coefficient linear difference equation, substituting the trial solution aₙ = rⁿ into the homogeneous equation produces a characteristic (auxiliary) polynomial equation in r, exactly as eʳˣ does for ODEs:

an=c1an1+c2an2++ckank(homogeneous, order k)a_n = c_1 a_{n-1} + c_2 a_{n-2} + \cdots + c_k a_{n-k} \quad \text{(homogeneous, order } k\text{)}
Linear homogeneous difference equation
an=rn    rk=c1rk1+c2rk2++cka_n = r^n \implies r^k = c_1 r^{k-1} + c_2 r^{k-2} + \cdots + c_k
Characteristic equation from trial solution a_n = r^n
an=A1r1n+A2r2n++Akrkn(distinct roots)a_n = A_1 r_1^n + A_2 r_2^n + \cdots + A_k r_k^n \quad \text{(distinct roots)}
General homogeneous solution

Derivation

Solve the second-order linear homogeneous difference equation aₙ = 3aₙ₋₁ - 2aₙ₋₂ with a₀=1, a₁=2, by finding its characteristic roots:

an=rn    rn=3rn12rn2    r23r+2=0(divide by rn2)a_n = r^n \implies r^n = 3r^{n-1} - 2r^{n-2} \implies r^2 - 3r + 2 = 0 \quad \text{(divide by } r^{n-2}\text{)}

Substitute the trial solution and divide out the lowest power of r

(r1)(r2)=0    r1=1, r2=2(r-1)(r-2) = 0 \implies r_1 = 1,\ r_2 = 2

Factor the characteristic equation

an=A(1)n+B(2)n=A+B2na_n = A(1)^n + B(2)^n = A + B\cdot 2^n

General solution, a linear combination of the two characteristic-root sequences

a0=A+B=1,a1=A+2B=2    B=1, A=0a_0 = A + B = 1, \quad a_1 = A + 2B = 2 \implies B = 1,\ A = 0

Solve for A, B using the two given initial terms

Applications

Compound interest and loan amortization schedules are linear difference equations: balance_n = (1+r)·balance_{n-1} - payment, solved with exactly this characteristic-root technique.

Worked Examples

  1. Characteristic equation r²-3r+2=0 factors as (r-1)(r-2)=0.

    r1=1, r2=2    an=A+B2nr_1=1,\ r_2=2 \implies a_n = A + B\cdot 2^n
  2. Apply initial conditions a₀=1, a₁=2 to solve for A and B.

    A+B=1, A+2B=2    B=1, A=0A+B=1,\ A+2B=2 \implies B=1,\ A=0

Answer: aₙ = 2ⁿ (verified by direct computation: a₀=1,a₁=2,a₂=4,a₃=8,… matches 3aₙ₋₁-2aₙ₋₂ term by term, e.g. a₂=3(2)-2(1)=4 ✓).

Practice Problems

Difficulty 5/10

Using aₙ = 4·2ⁿ - 3, compute a₅ two ways: from the closed form, and by iterating aₙ=2aₙ₋₁+3 from a₄.

Difficulty 6/10

Find the general solution of aₙ = 5aₙ₋₁ - 6aₙ₋₂ (find the characteristic roots and write the general form; do not apply initial conditions).

Difficulty 6/10

A loan balance follows balance_n = 1.05·balance_{n-1} - 100 (5% monthly interest, $100 payment), with balance₀ = 1000. Find the closed form for balance_n.

Common Mistakes

Common Mistake

Treating a difference equation's characteristic equation as if the trial solution were e^{rn} rather than r^n.

The natural trial solution for a difference equation is aₙ=rⁿ (a geometric sequence), not an exponential of n in the continuous sense — dividing by the lowest power of r after substitution gives the polynomial characteristic equation directly in r.

Common Mistake

Applying the initial conditions before finding the general (homogeneous + particular) solution form.

As with ODEs, first find the complete general solution (all arbitrary constants included) and only then use the given initial terms to pin down the constants — applying conditions too early loses degrees of freedom needed for a k-term recurrence.

Quiz

For a constant-coefficient linear difference equation, the discrete analogue of trying y=e^{rx} for ODEs is:
For the homogeneous equation aₙ=3aₙ₋₁-2aₙ₋₂, the characteristic equation is:
For a nonhomogeneous difference equation with constant forcing (like aₙ=2aₙ₋₁+3), the particular solution is typically sought as:

Summary

  • A linear difference equation with constant coefficients relates aₙ to previous terms aₙ₋₁,…,aₙ₋ₖ, and is the discrete analogue of a constant-coefficient linear ODE.
  • Trying aₙ=rⁿ converts the homogeneous equation into a polynomial characteristic equation in r, exactly paralleling y=e^{rx} for ODEs.
  • Distinct characteristic roots r₁,…,rₖ give a general solution aₙ = A₁r₁ⁿ + ⋯ + Aₖrₖⁿ, with constants fixed by the initial terms.
  • Nonhomogeneous difference equations are solved by adding a particular solution found via an undetermined-coefficients-style guess matching the forcing term's form.

References

  1. BookElaydi, S. An Introduction to Difference Equations, 3rd ed., Ch. 2.