Difference Equations

Describing discrete systems, recursive solving.

Darshan N
Updated: 19 March 2026
6 min read

A linear constant-coefficient difference equation (LCCDE) is the standard mathematical description of a discrete-time LTI system. Just as differential equations describe continuous-time systems, difference equations describe discrete-time systems. They naturally arise in digital filter implementation and are central to understanding recursive computation in IIR filters and non-recursive computation in FIR filters.

Difference Equations: Structure and Signal FlowGeneral LCCDE FormΣ aₖ·y[n-k] = Σ bₖ·x[n-k]k=0 to N (left) k=0 to M (right)With a₀=1: y[n] = Σbₖ·x[n-k] - Σaₖ·y[n-k]k=0..M k=1..NFIR: all aₖ=0 (k≥1) → non-recursiveIIR: some aₖ≠0 (k≥1) → recursiveSignal Flow (Direct Form I)x[n] →[b₀]→ (+) → y[n]x[n-1]→[b₁]→ ↑x[n-2]→[b₂]→ ↑← y[n-1]·(-a₁)← y[n-2]·(-a₂)Each z⁻¹ block = one unit delay = one memory elementN+M delays total in Direct Form IRecursive Solving: Step-by-StepExample: y[n] - 0.5·y[n-1] = x[n], x[n] = δ[n], y[-1] = 0n=0: y[0] = x[0] + 0.5·y[-1] = 1 + 0 = 1n=1: y[1] = x[1] + 0.5·y[0] = 0 + 0.5 = 0.5n=2: y[2] = x[2] + 0.5·y[1] = 0 + 0.25 = 0.25n=3: y[3] = 0.5·y[2] = 0.125 → Pattern: y[n] = (0.5)ⁿ·u[n]Zero-state: initial conditions = 0. Zero-input: input = 0 after n=0.Total response = zero-state response + zero-input response.
Figure 1: Structure of linear constant-coefficient difference equations, signal flow graph, and recursive computation method.

Core Concept Explanation

A difference equation relates the current output y[n] to a linear combination of past outputs and current and past inputs. The general form is: Σ aₖ·y[n−k] = Σ bₖ·x[n−k], where the left side contains output terms (feedback) and the right side contains input terms (feedforward). With the normalization a₀ = 1, this becomes y[n] = Σ bₖ·x[n−k] − Σ aₖ·y[n−k], an explicit formula for computing y[n] one sample at a time.

When all feedback coefficients aₖ for k ≥ 1 are zero, the system is non-recursive or FIR (Finite Impulse Response). The output depends only on current and past inputs, and the impulse response has finite duration. When any aₖ is non-zero for k ≥ 1, the system is recursive or IIR (Infinite Impulse Response). Past outputs feed back, and the impulse response can extend indefinitely. IIR filters are more computationally efficient for sharp frequency selectivity but may be unstable.

Mathematical Expression

Taking the z-transform of the LCCDE converts it from a recursive equation to an algebraic equation. The transfer function H(z) = Y(z)/X(z) = (Σ bₖ·z⁻ᵏ) / (Σ aₖ·z⁻ᵏ), a ratio of polynomials in z⁻¹. The numerator zeros come from the bₖ coefficients (feedforward) and the denominator poles come from the aₖ coefficients (feedback). The system is stable if all poles lie strictly inside the unit circle in the z-plane.

The homogeneous solution of the difference equation is found by setting the input to zero and solving for the natural response. The particular solution matches the form of the input. The complete solution is the sum of both. For GATE, the z-transform method is faster: find H(z), perform partial fraction expansion, and take the inverse z-transform to get h[n].

Practical Understanding

Recursive solving is the iterative method of computing y[n] sample by sample using initial conditions. Start at n = 0 with known initial conditions y[−1], y[−2], etc. Substitute known values of x[n] and previously computed y[n] values to find y[0], then y[1], then y[2], and so on. This method is exact and does not require solving for a closed-form expression, making it practical for digital hardware implementation.

Example
Given:
y[n] - 0.8·y[n-1] = x[n]
x[n] = u[n] (unit step), y[-1] = 0

Why this formula applies:
Recursive form: y[n] = x[n] + 0.8·y[n-1]
For step input x[n] = 1 for n ≥ 0.

Formula:
y[n] = x[n] + 0.8·y[n-1]

Substitution:
y[0] = 1 + 0.8·(0) = 1
y[1] = 1 + 0.8·(1) = 1.8
y[2] = 1 + 0.8·(1.8) = 2.44
y[3] = 1 + 0.8·(2.44) = 2.952

Calculation:
As n → ∞, y[n] → 1/(1-0.8) = 5
Steady-state value = 5
(Pole at z=0.8, inside unit circle → stable)

Final Answer:
y = {1, 1.8, 2.44, 2.952, ...} converging to 5.0
Exam Tip: For GATE, the fastest way to find the steady-state output for a step input is y_ss = H(z)|_{z=1} = (Σbₖ)/(Σaₖ). Also remember: poles inside unit circle = stable, poles outside = unstable, poles on unit circle = marginally stable.

Difference Equation Key Points

  • Recursive (IIR): has feedback terms aₖ·y[n−k], infinite impulse response.
  • Non-recursive (FIR): no feedback terms, finite impulse response, always stable.
  • Transfer function H(z) = Y(z)/X(z) = B(z)/A(z).
  • System stable if all poles of H(z) lie strictly inside the unit circle.
  • Recursive solving requires initial conditions; zero-state assumes all ICs = 0.

Quick Revision

  • LCCDE: Σaₖ·y[n−k] = Σbₖ·x[n−k]. With a₀=1, solve for y[n] explicitly.
  • FIR: aₖ=0 for k≥1. Non-recursive. Always BIBO stable.
  • IIR: aₖ≠0 for some k≥1. Recursive. Stable only if poles inside unit circle.
  • H(z) = B(z)/A(z). Poles from denominator A(z), zeros from numerator B(z).
  • Steady-state for step input: H(1) = Σbₖ / Σaₖ.
  • Recursive solving: compute y[n] sample by sample using initial conditions.
  • Trap: a stable difference equation with non-zero ICs has both zero-state and zero-input components.

Difference Equations Quiz

Test your ability to analyze and solve discrete-time systems described by difference equations.

Question 1 of 3

Q1.A first-order difference equation is y[n] - 0.5*y[n-1] = x[n]. What is the natural (homogeneous) solution of this equation?