9.1 Firstorder difference equations
 Definition

A firstorder difference equation is an equation
x_{t} = f(t, x_{t−1}),where f is a function of two variables. A solution of the firstorder difference equation x_{t} = f(t, x_{t−1}) is a function x of a single variable whose domain is the set of integers such that x_{t} = f(t, x_{t−1}) for every integer t, where x_{t} denotes the value of x at t.
We can find a solution of a firstorder difference equation by successive calculation: given the value of x for some value of t, we can use the equation to find the value of x at the next value of t, and then use the equation again to find the value of x at the following value of t, and so forth. For example, given the value x_{0} of x at 0, we have
x_{1}  =  f(1, x_{0}) 
x_{2}  =  f(2, x_{1}) = f(2, f(1, x_{0})) 
and so on. 
 Proposition
 For every number x_{0}, every firstorder difference equation x_{t} = f(t, x_{t−1}) has a unique solution in which the value of x is x_{0} at 0.
Firstorder linear difference equations with constant coefficient
 Definition

A linear firstorder difference equation with constant coefficient is a firstorder difference equation for which
f(t, x_{t−1}) = ax_{t−1} + b_{t}for numbers a and b_{t}, t = 1, ....
If you use the method of successive calculation, you notice a pattern; you can guess that the solution takes the form
k=1a^{t−k}b_{k} for all t.
ax_{t−1} + b_{t}  =  a(a^{t−1}x_{0} +
∑t−1 k=1a^{t−1−k}b_{k}) + b_{t} 
=  a^{t}x_{0} + ∑t−1 k=1a^{t−k}b_{k} + b_{t} 

=  a^{t}x_{0} + ∑t k=1a^{t−k}b_{k} 

=  x_{t}, 
 Proposition

For any given value of x_{0}, the unique solution of the linear firstorder difference equation with constant coefficient
x_{t} = ax_{t−1} + b_{t}is given byx_{t} = a^{t}x_{0} + ∑tif a ≠ 0 and x_{t} = b_{t} for all t if a = 0.
k=1a^{t−k}b_{k} for all t
j=0a^{j} for all t.
 Proposition

For any given value of x_{0}, the unique solution of the linear firstorder difference equation with constant coefficient
x_{t} = ax_{t−1} + bis given byx_{t} = a^{t}(x_{0} − b/(1 − a)) + b/(1 − a) for all tif a ≠ 0 and a ≠ 1, by x_{t} = b for all t if a = 0, and by x_{t} = x_{0} + tb if a = 1.
Equilibrium and stability
An equilibrium of a firstorder difference equilibrium is defined in the same way as an equilibrium of a firstorder initial value problem: a value x* of the variable such that the equation has a solution in which the variable is equal to x* for all t. Definition

If for some value x* of x_{0} the firstorder difference equation
x_{t} = f(t, x_{t−1})has a solution that is equal to x* for all t, x* is an equilibrium of the equation.
 Proposition

The linear firstorder difference equation with constant coefficient
x_{t} = ax_{t−1} + bwith a ≠ 1 has a unique equilibrium, b/(1 − a).
An equilibrium of a firstorder difference equation, like an equilibrium of a firstorder differential equation, is stable if the solution of the equation converges to the equilibrium for all initial conditions.
 Definition

If, for every value of x_{0}, the solution of the linear firstorder difference equation with constant coefficient
x_{t} = ax_{t−1} + bwith a ≠ 1 converges to the equilibrium b/(1 − a) as t increases without bound, then the equilibrium is (globally) stable.
By a previous result, the solution of a firstorder difference equation of the form x_{t} = ax_{t−1} + b is
If a > 1, the absolute value of x_{t} increases without bound, so that the equilibrium is not stable: the system “explodes”. If a > 1 then x_{t} is monotone—if x_{0} < b/(1 − a) it decreases, and if x_{0} > b(/1 − a) it increases—and if a < −1 then x_{t} oscillates.
Thus we have the following result.
 Proposition

The solution of the linear firstorder difference equation with constant coefficient
x_{t} = ax_{t−1} + bwith a ≠ 1 behaves as follows.
 a < 1
 Solution converges to the equilibrium b/(1 − a) (equilibrium is stable)
 0 < a < 1
 Solution is monotonic
 −1 < a < 0
 Solution oscillates, with decreasing amplitude
 a > 1
 Solution diverges
 a > 1
 Divergence is monotonic
 a < −1
 Solution oscillates, with increasing amplitude.
 Example

Suppose that demand depends upon the current price
D_{t} = max{γ − δp_{t}, 0},where γ > 0 and δ > 0, whereas supply depends on the previous priceS_{t} = max{(p_{t−1} − α)/β, 0},where α > 0 and β > 0. (Maybe the lag exists because production takes time—think of agricultural production.) Demand and supply are each specified not simply as a linear function, but the maximum of the value of a linear function and zero, because neither of them can be negative.
The following argument assumes that p_{t} starts in the range for which the both demand and supply are positive, and remains in this range, so that only the linear parts of the specifications are relevant.
For equilibrium in period t we need D_{t} = S_{t}, so that
p_{t} = −(1/(βδ))p_{t−1} + (α + βγ)/(βδ),a firstorder difference equation with constant coefficient. The equilibrium price isp* = (α + βγ)/(1 + βδ),so from a previous result, we can write the solution asp_{t} = p* + (−1/(βδ))^{t}(p_{0} − p*).From another result, the equilibrium is stable ifβδ > 1.A solution path for such parameters is shown in the following figure.If the system is unstable, then eventually a boundary is reached, and the linear parts of the specifications of D_{t} and S_{t} are no longer relevant.
 Example

You have assets of $z_{0}. You can earn a constant rate of return r on these assets. That is, after t years you will have (1 + r)^{t}z_{0} if you do not consume any assets. The rate of inflation is i, where i < r. In each period t ≥ 1 you withdraw an amount of money
equivalent in purchasing power to y in period 1. (That is, you withdraw y(1 + i)^{t−1} in each period t.)
 How long will your assets last if r = 0.08, i = 0.04, y = $50,000, and z_{0} = 1,000,000?
 How large do you assets need to be to last for 30 years of retirement if you want to withdraw $80,000 per year during retirement (with r = 0.08 and i = 0.04)?
z_{t} = (1 + r)z_{t−1} − (1 + i)^{t−1}y,a firstorder difference equation with constant coefficient. So by a previous result we havez_{t} = (1 + r)^{t}z_{0} − ∑t
k=1(1 + r)^{t−k}(1 + i)^{k−1}y= (1 + r)^{t}z_{0} − y(1 + r)^{t−1}[1 − ((1 + i)/(1 + r))^{t}]/[1 − (1 + i)/(1 + r)], z_{t} = (1 + r)^{t}z_{0} − ∑t
k=1(1 + r)^{t−k}(1 + i)^{k−1}y= (1 + r)^{t}z_{0} − y(1 + r)^{t−1} × [1 − ((1 + i)/(1 + r))^{t}]/[1 − (1 + i)/(1 + r)], z_{t} = (1 + r)^{t}z_{0} − y(1 + r)^{t}[1 − ((1 + i)/(1 + r))^{t}]/(r − i) = (1 + r)^{t}[z_{0} − y(1 − ((1 + i)/(1 + r))^{t})/(r − i)]. z_{0} = (y/(r−i))(1 − ((1 + i)/(1 + r))^{t}).Hencet = log(1−(r−i)z_{0}/y) log((1 + i)/(1 + r)) .
Firstorder linear difference equations with variable coefficient
The solution of the equations=ra_{s} denotes the product a_{r}a_{r+1}···a_{t} if r ≤ t and is taken to be 1 if r > t. The result can be proved by checking that the solution satisfies the equation.
 Proposition

For any given value x_{0}, the unique solution of the firstorder difference equation
x_{t} = a_{t}x_{t−1} + b_{t}is given byx_{t} = (Πtif a_{t} ≠ 0 for all t.
s=1a_{s})x_{0} + ∑t
k=1(Πt
s=k+1a_{s})b_{k} for all t
 Example

Modify the previous example by allowing the rate of return and rate of inflation to depend on t. Denoting the rate of return and rate of inflation in period t by r_{t} and i_{t} respectively, the relation between assets in periods t and t − 1 is
z_{t} = (1 + r_{t})z_{t−1} − Πt−1(The second term on the righthand side is the amount of money in period t that has the same purchasing power as y in period 1.)
s=1(1 + i_{s})y.By the previous result, the solution of this difference equation is given by
z_{t} = (Πt
s=1(1 + r_{s}))z_{0} −∑t for all t.
k=1(Πt
s=k+1(1 + r_{s}))(Πk−1
s=1(1 + i_{s}))y