Like this presentation? Why not share!

# Lesson29 Intro To Difference Equations Slides

## by Matthew Leingang, Clinical Associate Professor of Mathematics at New York University on May 21, 2007

• 2,166 views

introduction to the concept of difference equations

introduction to the concept of difference equations

### Views

Total Views
2,166
Views on SlideShare
2,160
Embed Views
6

Likes
2
100
0

### 1 Embed6

 http://www.slideshare.net 6

## Lesson29 Intro To Difference Equations SlidesPresentation Transcript

• Lesson 29 Introduction to Difference Equations Math 20 April 25, 2007 Announcements PS 12 due Wednesday, May 2 MT III Friday, May 4 in SC Hall A Final Exam (tentative): Friday, May 25 at 9:15am
• Introduction A famous difference equation Other 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 pair of rabbits together in a certain enclosed place, and one wishes to know how many are created from the pair in one year when it is the nature of them in a single month to bear another pair, and in the second month those born to bear also. Because the Leonardo of Pisa abovewritten pair in the ﬁrst (1170s or 1180s–1250) month bore, you will double a/k/a Fibonacci it; there will be two pairs in one month.”
• Diagram of rabbits f0 = 1
• Diagram of rabbits f0 = 1 f1 = 1
• Diagram of rabbits f0 = 1 f1 = 1 f2 = 2
• Diagram of rabbits f0 = 1 f1 = 1 f2 = 2 f3 = 3
• Diagram of rabbits f0 = 1 f1 = 1 f2 = 2 f3 = 3 f4 = 5
• 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 new month we have The same rabbits as last month Every pair of rabbits at least one month old producing a new pair of rabbits
• An equation for the rabbits Let fn be the number of pairs of rabbits in month n. Each new month we have The same rabbits as last month Every pair of rabbits at least one month old producing a new pair of rabbits So fn = fn−1 + fn−2
• Some ﬁbonacci numbers n fn 0 1 1 1 2 2 3 3 4 5 5 8 Question 6 13 Can we ﬁnd an explicit formula for fn ? 7 21 8 34 9 55 10 89 11 144 12 233
• Other questions Lots of things ﬂuctuate from time step to time step: Price of a good Population of a species (or several species) GDP of an economy
• Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
• The big concept Deﬁnition A difference equation is an equation for a sequence written in terms of that sequence and shiftings of it. Example The ﬁbonacci sequence satisﬁes the difference equation fn = fn−1 + fn−2 , f0 = 1, f1 = 1 A population of ﬁsh in a pond might satisfy an equation such as xn+1 = 2xn (1 − xn ) supply and demand both depend on price, which is determined by supply and demand. So the evolution of price depends on itself (more later).
• Difference equation objectives Know when a sequence satisﬁes a difference equation Solve when possible! Find equilibria Analyze stability of equilibria
• Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
• Testing solutions Plug it in!
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0.
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0. Solution 32 − 4(3) + 3 = 9 − 12 + 3 = 0
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0. Solution 32 − 4(3) + 3 = 9 − 12 + 3 = 0
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0. Solution 32 − 4(3) + 3 = 9 − 12 + 3 = 0 Example Show that the sequence deﬁned by yk = 2k+1 − 1 satisﬁes the difference equation yk+1 = 2yk + 1, y0 = 1.
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0. Solution 32 − 4(3) + 3 = 9 − 12 + 3 = 0 Example Show that the sequence deﬁned by yk = 2k+1 − 1 satisﬁes the difference equation yk+1 = 2yk + 1, y0 = 1. Solution We have yk+1 = 2(k +1)+1 − 1 = 2k+2 − 1 2yk + 1 = 2(2k+1 − 1) + 1 = 2k+2 − 1
• Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0. Solution 32 − 4(3) + 3 = 9 − 12 + 3 = 0 Example Show that the sequence deﬁned by yk = 2k+1 − 1 satisﬁes the difference equation yk+1 = 2yk + 1, y0 = 1. Solution We have yk+1 = 2(k +1)+1 − 1 = 2k+2 − 1 2yk + 1 = 2(2k+1 − 1) + 1 = 2k+2 − 1
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it.
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution y1 = 1
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution y1 = 1 1 y2 = 1+1 = 1/2
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution 1/2 1/2 y1 = 1 = 1/3 y3 = = 1+1/2 3/2 1 y2 = 1+1 = 1/2
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution 1/2 1/2 y1 = 1 = 1/3 y3 = = 1+1/2 3/2 1 y2 = 1+1 = 1/2 1/3 1/3 = 4/3 y4 = = 1+1/3 1/4
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution 1/2 1/2 y1 = 1 = 1/3 y3 = = 1+1/2 3/2 1 y2 = 1+1 = 1/2 1/3 1/3 = 4/3 y4 = = 1+1/3 1/4 1 We guess yk = k . If that’s true, then 1/k 1/k 1 yk+1 = = = 1 + 1/k k+1/k k +1
• Guess and check Example Fill out the ﬁrst few terms of the sequence that satisiﬁes yk yk+1 = , y1 = 1 1 + yk Guess the solution and check it. Solution 1/2 1/2 y1 = 1 = 1/3 y3 = = 1+1/2 3/2 1 y2 = 1+1 = 1/2 1/3 1/3 = 4/3 y4 = = 1+1/3 1/4 1 We guess yk = k . If that’s true, then 1/k 1/k 1 yk+1 =  = = 1 + 1/k k+1/k k +1
• Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn )
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn ) Method Draw the graphs y = g(x) and y = x
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x0 ) y = g(x)
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn ) Method Draw the graphs y = g(x) and y = x Pick a point (x0 , x0 ) on the line
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x0 ) y = g(x)
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn ) Method Draw the graphs y = g(x) and y = x Pick a point (x0 , x0 ) on the line Move vertically to (x0 , f (x0 )). Notice f (x0 ) = f (x1 )
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x0 , x0 ) y = g(x)
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn ) Method Draw the graphs y = g(x) and y = x Pick a point (x0 , x0 ) on the line Move vertically to (x0 , f (x0 )). Notice f (x0 ) = f (x1 ) Move horizontally to (x1 , x1 )
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn ) Method Draw the graphs y = g(x) and y = x Pick a point (x0 , x0 ) on the line Move vertically to (x0 , f (x0 )). Notice f (x0 ) = f (x1 ) Move horizontally to (x1 , x1 ) Repeat
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x3 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x3 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx3 4 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx3 4 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx. ..3 4 x2 x1 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x3 x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x3 x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx3 4 x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx3 4 x2 x1 x0 y = g(x)
• Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx. ..3 4 x2 x1 x0 y = g(x)
• Upshot Equilibria (constant solutions) of the difference equation xk+1 = g(xk ) are solutions to the equation x = g(x).
• Upshot Equilibria (constant solutions) of the difference equation xk+1 = g(xk ) are solutions to the equation x = g(x). If an equilibrium is stable, nearby points will spiral towards it If an equilibrium is unstable, nearby points will spiral away from it
• Upshot Equilibria (constant solutions) of the difference equation xk+1 = g(xk ) are solutions to the equation x = g(x). If an equilibrium is stable, nearby points will spiral towards it If an equilibrium is unstable, nearby points will spiral away from it There are other possibilities, though!
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
• Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
• A pricing example Example The amount of a good supplied to the market at time k depends on the price at time k − 1. The amount demanded at time k depends on the price at time k . Suppose Sk = 500pk−1 + 500 Dk = −1000pk + 1500 Use this to ﬁnd a difference equation for (pk ) and ﬁnd the equilibrium price.
• A pricing example Example The amount of a good supplied to the market at time k depends on the price at time k − 1. The amount demanded at time k depends on the price at time k . Suppose Sk = 500pk−1 + 500 Dk = −1000pk + 1500 Use this to ﬁnd a difference equation for (pk ) and ﬁnd the equilibrium price. Solution We have pk = −1/2pk−1 + 1, so p∗ = 2/3.
• Next time For which g can we solve the difference equation xk+1 = g(xk ) explicitly? Can we determine stability of the equilibria using g alone?