Linear recurrence with constant coefficients
In mathematics, a linear recurrence with constant coefficients sets equal to 0 a polynomial that is linear in the various iterates of a variable—that is, in the values of the elements of a sequence. The polynomial's linearity means that each of its terms has degree 0 or 1. A linear recurrence denotes the evolution of some variable over time, with the current time period or discrete moment in time denoted as, one period earlier denoted as, one period later as, etc.
The solution of such an equation is a function of, and not of any iterate values, giving the value of the iterate at any time. To find the solution it is necessary to know the specific values of of the iterates, and normally these are the iterates that are oldest. The equation or its variable is said to be stable if from any set of initial conditions the variable's limit as time goes to infinity exists; this limit is called the steady state.
Difference equations are used in a variety of contexts, such as in economics to model the evolution through time of variables such as gross domestic product, the inflation rate, the exchange rate, etc. They are used in modeling such time series because values of these variables are only measured at discrete intervals. In econometric applications, linear difference equations are modeled with stochastic terms in the form of autoregressive models and in models such as vector autoregression and autoregressive moving average models that combine AR with other features.
Definitions
A linear recurrence with constant coefficients is an equation of the following form, written in terms of parameters and :or equivalently as
The positive integer is called the order of the recurrence and denotes the longest time lag between iterates. The equation is called homogeneous if and nonhomogeneous if.
If the equation is homogeneous, the coefficients determine the characteristic polynomial
whose roots play a crucial role in finding and understanding the sequences satisfying the recurrence.
Conversion to homogeneous form
If, the equationis said to be nonhomogeneous. To solve this equation it is convenient to convert it to homogeneous form, with no constant term. This is done by first finding the equation's steady state value—a value such that, if successive iterates all had this value, so would all future values. This value is found by setting all values of equal to in the difference equation, and solving, thus obtaining
assuming the denominator is not 0. If it is zero, the steady state does not exist.
Given the steady state, the difference equation can be rewritten in terms of deviations of the iterates from the steady state, as
which has no constant term, and which can be written more succinctly as
where equals. This is the homogeneous form.
If there is no steady state, the difference equation
can be combined with its equivalent form
to obtain
in which like terms can be combined to give a homogeneous equation of one order higher than the original.
Solution example for small orders
The roots of the characteristic polynomial play a crucial role in finding and understanding the sequences satisfying the recurrence. If there are distinct roots then each solution to the recurrence takes the formwhere the coefficients are determined in order to fit the initial conditions of the recurrence. When the same roots occur multiple times, the terms in this formula corresponding to the second and later occurrences of the same root are multiplied by increasing powers of. For instance, if the characteristic polynomial can be factored as, with the same root occurring three times, then the solution would take the form
Order 1
For order 1, the recurrencehas the solution with and the most general solution is with. The characteristic polynomial equated to zero is simply.
Order 2
Solutions to such recurrence relations of higher order are found by systematic means, often using the fact that is a solution for the recurrence exactly when is a root of the characteristic polynomial. This can be approached directly or using generating functions or matrices.Consider, for example, a recurrence relation of the form
When does it have a solution of the same general form as ? Substituting this guess in the recurrence relation, we find that
must be true for all.
Dividing through by, we get that all these equations reduce to the same thing:
which is the characteristic equation of the recurrence relation. Solve for to obtain the two roots, : these roots are known as the characteristic roots or eigenvalues of the characteristic equation. Different solutions are obtained depending on the nature of the roots: If these roots are distinct, we have the general solution
while if they are identical, we have
This is the most general solution; the two constants and can be chosen based on two given initial conditions and to produce a specific solution.
In the case of complex eigenvalues, the use of complex numbers can be eliminated by rewriting the solution in trigonometric form. In this case we can write the eigenvalues as Then it can be shown that
can be rewritten as
where
Here and are real constants which depend on the initial conditions. Using
one may simplify the solution given above as
where and are the initial conditions and
In this way there is no need to solve for and.
In all cases—real distinct eigenvalues, real duplicated eigenvalues, and complex conjugate eigenvalues—the equation is stable if and only if both eigenvalues are smaller than one in absolute value. In this second-order case, this condition on the eigenvalues can be shown to be equivalent to, which is equivalent to and.
General solution
Characteristic polynomial and roots
Solving the homogeneous equationinvolves first solving its characteristic polynomial
for its characteristic roots. These roots can be solved for algebraically if, but not necessarily otherwise. If the solution is to be used numerically, all the roots of this characteristic equation can be found by numerical methods. However, for use in a theoretical context it may be that the only information required about the roots is whether any of them are greater than or equal to 1 in absolute value.
It may be that all the roots are real or instead there may be some that are complex numbers. In the latter case, all the complex roots come in complex conjugate pairs.
Solution with distinct characteristic roots
If all the characteristic roots are distinct, the solution of the homogeneous linear recurrencecan be written in terms of the characteristic roots as
where the coefficients can be found by invoking the initial conditions. Specifically, for each time period for which an iterate value is known, this value and its corresponding value of can be substituted into the solution equation to obtain a linear equation in the as-yet-unknown parameters; such equations, one for each initial condition, can be solved simultaneously for the parameter values. If all characteristic roots are real, then all the coefficient values will also be real; but with non-real complex roots, in general some of these coefficients will also be non-real.
Converting complex solution to trigonometric form
If there are complex roots, they come in conjugate pairs and so do the complex terms in the solution equation. If two of these complex terms are and, the roots can be written aswhere is the imaginary unit and is the modulus of the roots:
Then the two complex terms in the solution equation can be written as
where is the angle whose cosine is and whose sine is ; the last equality here made use of de Moivre's formula.
Now the process of finding the coefficients and guarantees that they are also complex conjugates, which can be written as. Using this in the last equation gives this expression for the two complex terms in the solution equation:
which can also be written as
where is the angle whose cosine is and whose sine is.
Cyclicity
Depending on the initial conditions, even with all roots real the iterates can experience a transitory tendency to go above and below the steady state value. But true cyclicity involves a permanent tendency to fluctuate, and this occurs if there is at least one pair of complex conjugate characteristic roots. This can be seen in the trigonometric form of their contribution to the solution equation, involving and.Solution with duplicate characteristic roots
In the second-order case, if the two roots are identical, they can both be denoted as and a solution may be of the formSolution by conversion to matrix form
An alternative solution method involves converting the th order difference equation to a first-order matrix difference equation. This is accomplished by writing,,, and so on. Then the original single th-order equationcan be replaced by the following first-order equations:
Defining the vector as
this can be put in matrix form as
Here is an matrix in which the first row contains and all other rows have a single 1 with all other elements being 0, and is a column vector with first element and with the rest of its elements being 0.
This matrix equation can be solved using the methods in the article Matrix difference equation.
In the homogeneous case is a para-permanent of a lower triangular matrix
Solution using generating functions
The recurrencecan be solved using the theory of generating functions. First, we write. The recurrence is then equivalent to the following generating function equation:
where is a polynomial of degree at most correcting the initial terms.
From this equation we can solve to get
In other words, not worrying about the exact coefficients, can be expressed as a rational function
The closed form can then be derived via partial fraction decomposition. Specifically, if the generating function is written as
then the polynomial determines the initial set of corrections, the denominator determines the exponential term, and the degree together with the numerator determine the polynomial coefficient.