lesson29 intro to difference equations slides

Post on 25-Jun-2015

1.173 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

introduction to the concept of difference equations

TRANSCRIPT

Lesson 29Introduction to Difference Equations

Math 20

April 25, 2007

AnnouncementsI PS 12 due Wednesday, May 2I MT III Friday, May 4 in SC Hall AI Final Exam (tentative): Friday, May 25 at 9:15am

IntroductionA famous difference equationOther questions

What is a difference equation?Goals

Testing solutions

Analyzing DE with Cobweb diagrams

Example: prices

A famous math problem

“A certain man had one pairof rabbits together in acertain enclosed place, andone wishes to know howmany are created from thepair in one year when it isthe nature of them in asingle month to bearanother pair, and in thesecond month those born tobear also. Because theabovewritten pair in the firstmonth bore, you will doubleit; there will be two pairs inone month.”

Leonardo of Pisa(1170s or 1180s–1250)

a/k/a Fibonacci

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

Diagram of rabbits

f0 = 1

f1 = 1

f2 = 2

f3 = 3

f4 = 5

f5 = 8

An equation for the rabbits

Let fn be the number of pairs of rabbits in month n. Each newmonth we have

I The same rabbits as last monthI Every pair of rabbits at least one month old producing a

new pair of rabbits

Sofn = fn−1 + fn−2

An equation for the rabbits

Let fn be the number of pairs of rabbits in month n. Each newmonth we have

I The same rabbits as last monthI Every pair of rabbits at least one month old producing a

new pair of rabbitsSo

fn = fn−1 + fn−2

Some fibonacci numbers

n fn0 11 12 23 34 55 86 137 218 349 55

10 8911 14412 233

QuestionCan we find an explicit formula for fn?

Other questions

Lots of things fluctuate from time step to time step:I Price of a goodI Population of a species (or several species)I GDP of an economy

IntroductionA famous difference equationOther questions

What is a difference equation?Goals

Testing solutions

Analyzing DE with Cobweb diagrams

Example: prices

The big concept

DefinitionA difference equation is an equation for a sequence written interms of that sequence and shiftings of it.

Example

I The fibonacci sequence satisfies the difference equation

fn = fn−1 + fn−2, f0 = 1, f1 = 1

I A population of fish in a pond might satisfy an equationsuch as

xn+1 = 2xn(1−xn)

I supply and demand both depend on price, which isdetermined by supply and demand. So the evolution ofprice depends on itself (more later).

Difference equation objectives

I Know when a sequence satisfies a difference equationI Solve when possible!I Find equilibriaI Analyze stability of equilibria

IntroductionA famous difference equationOther questions

What is a difference equation?Goals

Testing solutions

Analyzing DE with Cobweb diagrams

Example: prices

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 0

3

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Testing solutionsPlug it in!

ExampleShow that x = 3 satisfies the equation x2−4x +3 = 0.

Solution

32−4(3)+3 = 9−12+3 = 03

ExampleShow that the sequence defined by yk = 2k+1−1 satisfies thedifference equation yk+1 = 2yk +1, y0 = 1.

SolutionWe have

yk+1 = 2(k+1)+1−1 = 2k+2−1

2yk +1 = 2(2k+1−1)+1 = 2k+2−13

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1

I y2 = 11+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

Guess and checkExampleFill out the first few terms of the sequence that satisifies

yk+1 =yk

1+yk, y1 = 1

Guess the solution and check it.

Solution

I y1 = 1I y2 = 1

1+1 = 1/2

I y3 =1/2

1+1/2=

1/23/2

= 1/3

I y4 =1/3

1+1/3=

1/31/4

= 4/3

We guess yk = 1k . If that’s true, then

yk+1 =1/k

1+ 1/k=

1/k

k+1/k=

1k +1

3

IntroductionA famous difference equationOther questions

What is a difference equation?Goals

Testing solutions

Analyzing DE with Cobweb diagrams

Example: prices

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

Method

I Draw the graphs y = g(x) and y = xI Pick a point (x0,x0) on the lineI Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

MethodI Draw the graphs y = g(x) and y = x

I Pick a point (x0,x0) on the lineI Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

MethodI Draw the graphs y = g(x) and y = xI Pick a point (x0,x0) on the line

I Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

MethodI Draw the graphs y = g(x) and y = xI Pick a point (x0,x0) on the lineI Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

MethodI Draw the graphs y = g(x) and y = xI Pick a point (x0,x0) on the lineI Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

Cobweb diagrams

IdeaUse graphics to identify and classify equilibria of the differenceequation

xn+1 = g(xn)

MethodI Draw the graphs y = g(x) and y = xI Pick a point (x0,x0) on the lineI Move vertically to (x0, f (x0)). Notice f (x0) = f (x1)

I Move horizontally to (x1,x1)

I Repeat

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

(x0,x0)

(x0,x1)

(x1,x1)

x2. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

x3

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

x3

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

x3x4

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

x3x4

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = xx0

x1

x2

x3x4. . .

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

x3

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

x3

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

x3x4

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

x3x4

Example of a cobweb diagram

xk+1 = 5/2xk (1−xk )

y = g(x)

y = x

x0

x1

x2

x3x4. . .

Upshot

I Equilibria (constant solutions) of the difference equation

xk+1 = g(xk )

are solutions to the equation x = g(x).

I If an equilibrium is stable, nearby points will spiral towardsit

I If an equilibrium is unstable, nearby points will spiral awayfrom it

I There are other possibilities, though!

Upshot

I Equilibria (constant solutions) of the difference equation

xk+1 = g(xk )

are solutions to the equation x = g(x).I If an equilibrium is stable, nearby points will spiral towards

itI If an equilibrium is unstable, nearby points will spiral away

from it

I There are other possibilities, though!

Upshot

I Equilibria (constant solutions) of the difference equation

xk+1 = g(xk )

are solutions to the equation x = g(x).I If an equilibrium is stable, nearby points will spiral towards

itI If an equilibrium is unstable, nearby points will spiral away

from itI There are other possibilities, though!

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

Another example

xk+1 = (3.1)xk (1−xk )

y = g(x)

y = x

IntroductionA famous difference equationOther questions

What is a difference equation?Goals

Testing solutions

Analyzing DE with Cobweb diagrams

Example: prices

A pricing example

ExampleThe amount of a good supplied to the market at time k dependson the price at time k −1. The amount demanded at time kdepends on the price at time k . Suppose

Sk = 500pk−1 +500Dk =−1000pk +1500

Use this to find a difference equation for (pk ) and find theequilibrium price.

SolutionWe have pk =−1/2pk−1 +1, so p∗ = 2/3.

A pricing example

ExampleThe amount of a good supplied to the market at time k dependson the price at time k −1. The amount demanded at time kdepends on the price at time k . Suppose

Sk = 500pk−1 +500Dk =−1000pk +1500

Use this to find a difference equation for (pk ) and find theequilibrium price.

SolutionWe have pk =−1/2pk−1 +1, so p∗ = 2/3.

Next time

I For which g can we solve the difference equationxk+1 = g(xk ) explicitly?

I Can we determine stability of the equilibria using g alone?

top related