Linear recurrence with constant coefficients

From testwiki
Revision as of 14:18, 19 October 2024 by imported>Kumar Dayal (Adding short description: "Relation in Algebra")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:Further

In mathematics (including combinatorics, linear algebra, and dynamical systems), a linear recurrence with constant coefficients[1]Template:Rp[2]Template:Rp (also known as a linear recurrence relation or linear difference equation) 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 Template:Mvar, one period earlier denoted as Template:Math, one period later as Template:Math, etc.

The solution of such an equation is a function of Template:Mvar, 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 (known as initial conditions) of Template:Mvar of the iterates, and normally these are the Template:Mvar 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 (AR) models and in models such as vector autoregression (VAR) and autoregressive moving average (ARMA) 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 Template:Math and Template:Mvar:

yt=a1yt1++anytn+b,

or equivalently as

yt+n=a1yt+n1++anyt+b.

The positive integer n is called the order of the recurrence and denotes the longest time lag between iterates. The equation is called homogeneous if Template:Math and nonhomogeneous if Template:Math.

If the equation is homogeneous, the coefficients determine the characteristic polynomial (also "auxiliary polynomial" or "companion polynomial")

p(λ)=λna1λn1a2λn2an

whose roots play a crucial role in finding and understanding the sequences satisfying the recurrence.

Conversion to homogeneous form

If Template:Math, the equation

yt=a1yt1++anytn+b

is 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 Template:Math such that, if Template:Mvar successive iterates all had this value, so would all future values. This value is found by setting all values of Template:Mvar equal to Template:Math in the difference equation, and solving, thus obtaining

y*=b1a1an

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

(yty*)=a1(yt1y*)++an(ytny*)

which has no constant term, and which can be written more succinctly as

xt=a1xt1++anxtn

where Template:Mvar equals Template:Math. This is the homogeneous form.

If there is no steady state, the difference equation

yt=a1yt1++anytn+b

can be combined with its equivalent form

yt1=a1yt2++anyt(n+1)+b

to obtain (by solving both for Template:Mvar)

yta1yt1anytn=yt1a1yt2anyt(n+1)

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 d distinct roots r1,r2,,rd, then each solution to the recurrence takes the form an=k1r1n+k2r2n++kdrdn, where the coefficients ki 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 n. For instance, if the characteristic polynomial can be factored as (xr)3, with the same root r occurring three times, then the solution would take the form an=k1rn+k2nrn+k3n2rn.[3]

Order 1

For order 1, the recurrence an=ran1 has the solution an=rn with a0=1 and the most general solution is an=krn with a0=k. The characteristic polynomial equated to zero (the characteristic equation) is simply tr=0.

Order 2

Solutions to such recurrence relations of higher order are found by systematic means, often using the fact that an=rn is a solution for the recurrence exactly when t=r is a root of the characteristic polynomial. This can be approached directly or using generating functions (formal power series) or matrices.

Consider, for example, a recurrence relation of the form an=Aan1+Ban2.

When does it have a solution of the same general form as an=rn? Substituting this guess (ansatz) in the recurrence relation, we find that rn=Arn1+Brn2 must be true for all n>1.

Dividing through by rn2, we get that all these equations reduce to the same thing:

r2=Ar+B,r2ArB=0,

which is the characteristic equation of the recurrence relation. Solve for r to obtain the two roots λ1, λ2: 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

an=Cλ1n+Dλ2n

while if they are identical (when A2+4B=0), we have

an=Cλn+Dnλn

This is the most general solution; the two constants C and D can be chosen based on two given initial conditions a0 and a1 to produce a specific solution.

In the case of complex eigenvalues (which also gives rise to complex values for the solution parameters C and D), the use of complex numbers can be eliminated by rewriting the solution in trigonometric form. In this case we can write the eigenvalues as λ1,λ2=α±βi. Then it can be shown that

an=Cλ1n+Dλ2n

can be rewritten as[4]Template:Rp

an=2Mn(Ecos(θn)+Fsin(θn))=2GMncos(θnδ),

where

M=α2+β2cos(θ)=αMsin(θ)=βMC,D=EFiG=E2+F2cos(δ)=EGsin(δ)=FG

Here E and F (or equivalently, G and δ) are real constants which depend on the initial conditions. Using λ1+λ2=2α=A, λ1λ2=α2+β2=B,

one may simplify the solution given above as

an=(B)n2(Ecos(θn)+Fsin(θn)),

where a1 and a2 are the initial conditions and

E=Aa1+a2BF=iA2a1Aa2+2a1BBA2+4Bθ=arccos(A2B)

In this way there is no need to solve for λ1 and λ2.

In all cases—real distinct eigenvalues, real duplicated eigenvalues, and complex conjugate eigenvalues—the equation is stable (that is, the variable a converges to a fixed value [specifically, zero]) 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[5] to be equivalent to |A|<1B<2, which is equivalent to |B|<1 and |A|<1B.

General solution

Template:See also

Characteristic polynomial and roots

Solving the homogeneous equation

xt=a1xt1++anxtn

involves first solving its characteristic polynomial

λn=a1λn1++an2λ2+an1λ+an

for its characteristic roots Template:Math. These roots can be solved for algebraically if Template:Math, 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 recurrence

xt=a1xt1++anxtn

can be written in terms of the characteristic roots as

xt=c1λ1t++cnλnt

where the coefficients Template:Math 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 Template:Mvar can be substituted into the solution equation to obtain a linear equation in the Template:Mvar as-yet-unknown parameters; Template:Mvar such equations, one for each initial condition, can be solved simultaneously for the Template:Mvar parameter values. If all characteristic roots are real, then all the coefficient values Template:Math 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 Template:Math and Template:Math, the roots Template:Math can be written as

λj,λj+1=α±βi=M(αM±βMi)

where Template:Mvar is the imaginary unit and Template:Mvar is the modulus of the roots:

M=α2+β2.

Then the two complex terms in the solution equation can be written as

cjλjt+cj+1λj+1t=Mt(cj(αM+βMi)t+cj+1(αMβMi)t)=Mt(cj(cosθ+isinθ)t+cj+1(cosθisinθ)t)=Mt(cj(cosθt+isinθt)+cj+1(cosθtisinθt))

where Template:Mvar is the angle whose cosine is Template:Math and whose sine is Template:Math; the last equality here made use of de Moivre's formula.

Now the process of finding the coefficients Template:Math and Template:Math guarantees that they are also complex conjugates, which can be written as Template:Math. Using this in the last equation gives this expression for the two complex terms in the solution equation:

2Mt(γcosθtδsinθt)

which can also be written as

2γ2+δ2Mtcos(θt+ψ)

where Template:Mvar is the angle whose cosine is Template:Math and whose sine is Template:Math.

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 Template:Math and Template:Math.

Solution with duplicate characteristic roots

In the second-order case, if the two roots are identical (Template:Math), they can both be denoted as Template:Mvar and a solution may be of the form

xt=c1λt+c2tλt.

Solution by conversion to matrix form

An alternative solution method involves converting the Template:Mvarth order difference equation to a first-order matrix difference equation. This is accomplished by writing Template:Math, Template:Math, Template:Math, and so on. Then the original single Template:Mvarth-order equation

yt=a1yt1+a2yt2++anytn+b

can be replaced by the following Template:Mvar first-order equations:

w1,t=a1w1,t1+a2w2,t1++anwn,t1+bw2,t=w1,t1wn,t=wn1,t1.

Defining the vector Template:Math as

𝐰i=[w1,iw2,iwn,i]

this can be put in matrix form as

𝐰t=𝐀𝐰t1+𝐛

Here Template:Math is an Template:Math matrix in which the first row contains Template:Math and all other rows have a single 1 with all other elements being 0, and Template:Math is a column vector with first element Template:Mvar 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 Template:Math is a para-permanent of a lower triangular matrix [6]

Solution using generating functions

The recurrence

yt=a1yt1++anytn+b,

can be solved using the theory of generating functions. First, we write Y(x)=t0ytxt. The recurrence is then equivalent to the following generating function equation:

Y(x)=a1xY(x)+a2x2Y(x)++anxnY(x)+b1x+p(x)

where p(x) is a polynomial of degree at most n1 correcting the initial terms. From this equation we can solve to get

Y(x)=(b1x+p(x))11a1xa2x2anxn.

In other words, not worrying about the exact coefficients, Y(x) can be expressed as a rational function Y(x)=f(x)g(x).

The closed form can then be derived via partial fraction decomposition. Specifically, if the generating function is written as f(x)g(x)=ifi(x)(xri)mi

then the polynomial p(x) determines the initial set of corrections z(n), the denominator (xri)m determines the exponential term rin, and the degree m together with the numerator fi(x) determine the polynomial coefficient ki(n).

Relation to solution to differential equations

The method for solving linear differential equations is similar to the method above—the "intelligent guess" (ansatz) for linear differential equations with constant coefficients is eλx where λ is a complex number that is determined by substituting the guess into the differential equation.

This is not a coincidence. Considering the Taylor series of the solution to a linear differential equation:

n=0f(n)(a)n!(xa)n

it can be seen that the coefficients of the series are given by the n-th derivative of f(x) evaluated at the point a. The differential equation provides a linear difference equation relating these coefficients.

This equivalence can be used to quickly solve for the recurrence relationship for the coefficients in the power series solution of a linear differential equation.

The rule of thumb (for equations in which the polynomial multiplying the first term is non-zero at zero) is that:

y[k]f[n+k] and more generally xm*y[k]n(n1)...(nm+1)f[n+km]

Example: The recurrence relationship for the Taylor series coefficients of the equation:

(x2+3x4)y[3](3x+1)y[2]+2y=0

is given by

n(n1)f[n+1]+3nf[n+2]4f[n+3]3nf[n+1]f[n+2]+2f[n]=0

or

4f[n+3]+2nf[n+2]+n(n4)f[n+1]+2f[n]=0.

This example shows how problems generally solved using the power series solution method taught in normal differential equation classes can be solved in a much easier way.

Example: The differential equation

ay+by+cy=0

has solution

y=eax.

The conversion of the differential equation to a difference equation of the Taylor coefficients is

af[n+2]+bf[n+1]+cf[n]=0.

It is easy to see that the n-th derivative of eax evaluated at 0 is an.

Solving with z-transforms

Certain difference equations - in particular, linear constant coefficient difference equations - can be solved using z-transforms. The z-transforms are a class of integral transforms that lead to more convenient algebraic manipulations and more straightforward solutions. There are cases in which obtaining a direct solution would be all but impossible, yet solving the problem via a thoughtfully chosen integral transform is straightforward.

Stability

In the solution equation

xt=c1λ1t++cnλnt,

a term with real characteristic roots converges to 0 as Template:Mvar grows indefinitely large if the absolute value of the characteristic root is less than 1. If the absolute value equals 1, the term will stay constant as Template:Mvar grows if the root is +1 but will fluctuate between two values if the root is −1. If the absolute value of the root is greater than 1 the term will become larger and larger over time. A pair of terms with complex conjugate characteristic roots will converge to 0 with dampening fluctuations if the absolute value of the modulus Template:Mvar of the roots is less than 1; if the modulus equals 1 then constant amplitude fluctuations in the combined terms will persist; and if the modulus is greater than 1, the combined terms will show fluctuations of ever-increasing magnitude.

Thus the evolving variable Template:Mvar will converge to 0 if all of the characteristic roots have magnitude less than 1.

If the largest root has absolute value 1, neither convergence to 0 nor divergence to infinity will occur. If all roots with magnitude 1 are real and positive, Template:Mvar will converge to the sum of their constant terms Template:Math; unlike in the stable case, this converged value depends on the initial conditions; different starting points lead to different points in the long run. If any root is −1, its term will contribute permanent fluctuations between two values. If any of the unit-magnitude roots are complex then constant-amplitude fluctuations of Template:Mvar will persist.

Finally, if any characteristic root has magnitude greater than 1, then Template:Mvar will diverge to infinity as time goes to infinity, or will fluctuate between increasingly large positive and negative values.

A theorem of Issai Schur states that all roots have magnitude less than 1 (the stable case) if and only if a particular string of determinants are all positive.[2]Template:Rp

If a non-homogeneous linear difference equation has been converted to homogeneous form which has been analyzed as above, then the stability and cyclicality properties of the original non-homogeneous equation will be the same as those of the derived homogeneous form, with convergence in the stable case being to the steady-state value Template:Math instead of to 0.

See also

References

Template:Reflist

  1. Template:Cite book
  2. 2.0 2.1 Template:Cite book
  3. Template:Citation.
  4. Chiang, Alpha C., Fundamental Methods of Mathematical Economics, third edition, McGraw-Hill, 1984.
  5. Papanicolaou, Vassilis, "On the asymptotic stability of a class of linear difference equations," Mathematics Magazine 69(1), February 1996, 34–43.
  6. Template:Cite journal