# Understanding difference equation

I was given an example

$$R_n = R_{n-1} + R_{n-2}$$

This equation is given as an second-order equation.

Why is it so?

The fact that it is second-order refers to the fact that the largest difference in indices is $2$. For example,

$$R_{n+4}=3R_{n+1}^2+R_n$$

is a fourth-order difference equation and

$$R_{n+3}=2R_{n+2}\cdot R_{n+1}$$

is a second order difference equation.

If you're familiar with ODEs, the terminology is analogous.

• $$R_n = R_{n-1} + R_{n-2}$$ The difference is because of $$R_n and R_{n-2}$$ which determine the equation to be second-order? Apr 30 '11 at 9:04
• Yes${}{}{}{}{}$ Apr 30 '11 at 9:44
• The techniques for solving second order difference equations are analogous to those used in solving second order differential equations (complementary function, 'particular integral'..) Apr 30 '11 at 11:55
• @liangteh: the reason for interest in the order is that it tells you how many old terms can influence a new one. For a second order equation you need two initial conditions. For the first of GleasSpty's examples you would need 4. Apr 30 '11 at 14:48

One explanation is that one solves (see Recurrence relation, Wikipedia, under "Solving") the following homogeneous difference equation (or recurrence relation) with constant coefficients

$$a_{n}+Aa_{n-1}+Ba_{n-2}=0,$$

by means of the second degree characteristic equation

$$r^2+Ar+B=0,$$

pretty much as one woud solve a homogeneous second-order linear ordinary differential equation with constant coefficients.