### Abstract

Almost every field has a trove of problems whose basic structure is the exploration of how things change over time. Some of the underlying processes are continuous (your kids growing taller) and some are arguably discrete (demographic change due to births, deaths and migration).

It turns out that in many cases we can treat the process as proceeding stepwise, with finite changes happening each time period and accumulating over time.

And so, INDICATIONS: we can use difference equations to model dynamic processes that either are, or can be treated as if they are, discrete (that is, unfold period by period rather than continuously)

General idea of difference equations: IF we can write an equation that tells us how the system, in general, looks one time based on how it looked the time before, AND we know what it looks like on some particular day, then we can make predictions about what it will look like over the long term.

We will sometimes speak of "where a system is" at a given point in time — what we mean is what is the value of the variable of interest describing the state of the system. For example:

• How high is the water in the reservoir?
• How much money is our rainy-day fund?
• How many people can we expect at this week's protest?
• How long is the line at the clinic?

To begin, we want to get comfortable with the mathematical notation and understand the range of phenomena to which the technique can be applied. Then we'll look at the long term behavior of systems and of more complex constellations of stocks and flows.

But first, a review of our motivation here with a few examples.

### Motivation

Consider the five examples on page 49:

Let's draw a picture of the underlying phenomena.

NOTE: Some of these would qualify for "common sense" label — we can figure out how to do them. What DE offers is a systematic technique that can be applied across a wide range of systems. This is one of the senses in which it is a model.

Other examples. Suppose older cars pollute more and are inefficient. At a given point in time I have some fraction of older cars on the road. Every year some are replaced by new cars. And every year some formerly new cars become old cars. How big a "clunker" program should I implement if I want to get the long term proportion of old cars on the road down to a particular level?

Mills College recruits about 150 new freshwomen each year. Between first and second year some fraction of them transfer to other schools. The next year a new class is recruited, perhaps slightly larger. But then some of the sophomores transfer out before junior year. And some students are recruited as transfers. How does the school's population vary over time?

### Notation

You might want to review subscript notation.

#### Basics

How we will, in general proceed:

1. Describe the situation
2. Identify the "variable of interest"
3. Take note of the periodicity — what are our time units?
4. Identify the increases and the decreases. Take note of which ones are amounts and which ones are rates.
5. Write an equation that relates the variable next time in terms of the variable this time
6. Solve this equation in terms of an initial or known value of the variable.

#### Examples

It can be useful to think in terms of a bathtub analogy — difference equations describe in-flows and out-flows and we are interested in the net result. The flows can be either rates or amounts. Rate here means a proportion of the variable of interest — leakage from the tub might be 10% of volume per time unit. Amount means an absolute number per time period — the faucet might supply 3 gallons per minute.

If we start with that distinction between amounts and rates, there are four basic types of difference equations, two simple and two mixed:
 Type Description Example Equation Simple amount in and amount out College enrollment, new recruits, graduates $Enrollment_{i} = Enrollment_{i-1} + Recruits - Graduates$ Simple rate in and rate out Population with a birth rate and a death rate $Population_{i} = Population_{i-1} + Population_{i-1} \times BirthRate - Population_{i-1} \times DeatRate$ Mixed amount in and rate out Reservoir, rainfall, leakage $Reservoir_{i} = Reservoir_{i-1} + RainFall - Reservoir_{i-1} \times LeakageRate$ Mixed rate in and amount out Endowment, interest, expenditure $Endowment_{i} = Endowment_{i-1} + Endowment_{i-1} \times InterestRate - AnnualEndowmentExpenditure$
##### Practice Problems

114, 115, 116, 117, 118, 119, 120, 121, 122, 123

### Thinking Graphically about Difference Equations

#### Preliminaries — A Brief Review

Recall the graph of a line:

And the "45 degree line" (equation Y=X — slope 1, y-intercept 0)

#### Step 1 : General form of a difference equation

(1)
$$P_{n} = a P_{n-1} + b$$

The next value equals something times the previous value plus some increment.

In our compound interest example, a was 1 plus the interest rate and b was zero. In our population models, a was 1 plus the birth rate minus the death rate and b was the recruitment or immigration per time period. In our weasel examples a was 1 plus the reproduction rate and b was the number killed each year by hunters.

#### Step 2. Plot the change from step to step

(2)
$$P_{n+1} = a P_{n} + b$$

This looks a lot like the equation for a line (if we think of pn+1 as y and pn as x). This makes sense since the very essence of difference equations is to express the next value as a function of the previous value (we might write next=f(previous) and this is the same as we do for a line: y=f(x)).

This is an odd little graph. How would we use it? Let's suppose some pn is some number C. We locate this on the horizontal axis. Then, to find pn+1 we go up to the line and across to the corresponding value on the vertical axis. Call this number D.

What comes next? Now D will be pn and we'll seek the next value. We locate D on the horizontal axis and repeat the process.

Now we know three points – three "states" of the system in succession. If we look up at the line and imagine how we have "moved" along it, we can depict how the system has moved.

Now

#### Step 3. Recall that at equilibrium, the system stays the same from one period to the next.

Call the value at which the system settles pe "p sub e" or the equilibrium value. It is still governed by the generic difference equation but it looks like this

(3)
$$P_{e} = a P_{e} + b$$

This can be solved for pe:

(4)
\begin{align} P_e = \frac {b}{(1-a)} \end{align}

And, the equation can be written out in our usual terms, it looks like this

(5)
$$p_{(n+1)} = p_{n}$$

But this is just the equation for a "45 degree line" – a line with slope 1 that goes through the origin (that is, the point 0,0).

Any time the system is at equilibrium it will be somewhere on this line – since, by definition, equilibrium is when pn=pn+1
Thus, if we draw a 45 degree line on the graph we drew above, we can locate the equilibrium.

Note that in the example above our line had a slope of less than 1. What happens if we have a line with a slope greater than 1?

For positions both above and below the equilibrium, the tendency is for the system to move AWAY from the equilibrium.
The difference we are recognizing here is between STABLE and UNSTABLE equilibria. In a stable equilibrium, a small change in the system results in a "self-correcting" move back to the equilibrium. In an unstable equilibrium, a small perturbation or bump results in a sharp and accelerating movement AWAY from the equilibrium point.
Consider these real world examples.

#### What Can We Learn from the Slope of the Pn+1=f(Pn) Line?

Something we've seen graphically is very interesting. When the line describing our difference equation crosses the 45 degree line with slope less than one we get a stable equilibrium. When the line crosses with a slope greater than one we get an unstable equilibrium.
Let's think for a second whether there is any intuition in this. Recall that

(6)
\begin{align} P_e = \frac {b}{(1-a)} \end{align}

Consider a point one unit away from Pe. Since the slope of the line is a the next point would be Pe+a. If a<1 then our new point is closer to Pe than Pe+1 was. If a>1 then the new point is further away.
What is a is negative? If we move one unit away from equilibrium, what happens? Our next point is at Pe+a but this is on the other side of Pe since a is negative. A little thinking will get us to the fact that the point after this will again be to the right of Pe. With a negative sloping line our sequence oscillates. But does it converge or diverge. It turns out that the same rule holds as before. For absolute value greater than 1 we get divergence (an unstable equilibrium) and for absolute value less than 1 we get convergence (stable equilibrium).

Let's try our step by stepping with the following two diagrams

### Computer Skills

Writing equations in Word

File nameFile typeSize
DE-equilib-01.gifGIF image data10.27 kBInfo
DE-equilib-02.gifGIF image data8.13 kBInfo
DE-equilib-03.gifGIF image data5.9 kBInfo
DE-equilib-04.gifGIF image data7.92 kBInfo
DE-equilib-05.gifGIF image data4.84 kBInfo
DE-equilib-06.gifGIF image data6.38 kBInfo
DE-equilib-07.gifGIF image data2.55 kBInfo
DE-equilib-08.gifGIF image data4.68 kBInfo
DE-equilib-09.gifGIF image data8.32 kBInfo
DE-equilib-10.gifGIF image data9.95 kBInfo
DE-equilib-11.gifGIF image data22.63 kBInfo
DE-equilib-12.gifGIF image data2.08 kBInfo
DE-equilib-13.gifGIF image data3.79 kBInfo
DE-equilib-14.gifGIF image data8.48 kBInfo
DE-equilib-15.gifGIF image data4.97 kBInfo
DE-equilib-16.gifGIF image data31.25 kBInfo
DE-equilib-17.gifGIF image data9.46 kBInfo
Diff-Eqns-LAB-PROBSET.pdfPDF document314.39 kBInfo
Diff-Eqns-practice01.pdfPDF document104.88 kBInfo
Difference Equation Lab 2.docMicrosoft Office Document Microsoft Word Document187.5 kBInfo
Difference-Equations-2.pdfPDF document237.29 kBInfo
Difference-Equations-Practice-Problems.pdfPDF document80.53 kBInfo
examples for lab.xlsxZip archive data16.4 kBInfo
examples.xlsxZip archive data22.89 kBInfo
labexercises (1).xlsxZip archive data95.1 kBInfo
problem set solutions.xlsxZip archive data39.88 kBInfo
problems sec14.pdfPDF document109.93 kBInfo
reservoir01.gifGIF image data5.04 kBInfo
SnZ-p49-DE-examples.gifGIF image data113.55 kBInfo
S&ZCh4-Difference-Equations2 (1).docxZip archive data582.62 kBInfo
S&ZCh4-Difference-Equations2.docxZip archive data582.62 kBInfo
S&Z chapter 4 difference equations.xlsxZip archive data70.27 kBInfo

### References and Resources

BLOSSOMS - Fabulous Fractals and Difference Equations

page revision: 46, last edited: 16 Jan 2016 02:38