Linear Difference Equation of Second Order — Formula & Example
A linear difference equation of second order is a rule that gives each term of a sequence as a weighted sum of the two terms just before it. It is the step-by-step, whole-number version of a second-order linear differential equation.
A second-order linear homogeneous difference equation with constant coefficients has the form for all integers , where and are constants and . Its solutions form a two-dimensional vector space. Each solution is fixed uniquely by two initial values and . Replacing the 0 on the right with a given sequence makes the equation nonhomogeneous.
Key Formula
Where:
- = The nth term of the sequence
- = Constant coefficients, with q ≠ 0 so the equation is truly second order
- = A root of the characteristic equation. Distinct roots give . A repeated root gives .
- = Constants found from the initial values and
Worked Example
Problem: Solve with and . Find in closed form.
Step 1: Try . Substitute and divide by , which is nonzero for . This gives the characteristic equation. Then factor it.
Step 2: The roots are real and distinct, so the general solution combines the two powers. The negative root makes its term flip sign at every step.
Step 3: Set and to use the initial values. From the first equation, . Substitute this into the second: , so .
Answer: . Check: the recurrence gives , and the formula gives .
Why It Matters
Discrete math and computer science courses use these equations to find exact running times of recursive algorithms. They also produce Binet's closed formula for the Fibonacci numbers. In numerical methods, replacing with finite differences turns a second-order ODE into this kind of equation. You can then judge whether the computed solution stays stable.
Common Mistakes
Mistake: Carrying the ODE habit over and writing the solution as .
Correction: In a difference equation, the trial solution is , not . Each root contributes directly. A negative root such as is allowed, and it gives the oscillating term .
