Upcoming SlideShare
×

# Lesson29 Intro To Difference Equations Slides

1,439 views

Published on

introduction to the concept of difference equations

Published in: Technology, Lifestyle
2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

Views
Total views
1,439
On SlideShare
0
From Embeds
0
Number of Embeds
52
Actions
Shares
0
133
0
Likes
2
Embeds 0
No embeds

No notes for slide

### Lesson29 Intro To Difference Equations Slides

1. 1. 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
2. 2. Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
3. 3. 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.”
4. 4. Diagram of rabbits f0 = 1
5. 5. Diagram of rabbits f0 = 1 f1 = 1
6. 6. Diagram of rabbits f0 = 1 f1 = 1 f2 = 2
7. 7. Diagram of rabbits f0 = 1 f1 = 1 f2 = 2 f3 = 3
8. 8. Diagram of rabbits f0 = 1 f1 = 1 f2 = 2 f3 = 3 f4 = 5
9. 9. Diagram of rabbits f0 = 1 f1 = 1 f2 = 2 f3 = 3 f4 = 5 f5 = 8
10. 10. 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
11. 11. 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
12. 12. 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
13. 13. 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
14. 14. Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
15. 15. 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).
16. 16. Difference equation objectives Know when a sequence satisﬁes a difference equation Solve when possible! Find equilibria Analyze stability of equilibria
17. 17. Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
18. 18. Testing solutions Plug it in!
19. 19. Testing solutions Plug it in! Example Show that x = 3 satisﬁes the equation x 2 − 4x + 3 = 0.
20. 20. 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
21. 21. 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
22. 22. 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.
23. 23. 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
24. 24. 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
25. 25. 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.
26. 26. 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
27. 27. 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
28. 28. 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
29. 29. 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
30. 30. 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
31. 31. 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
32. 32. Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
33. 33. Cobweb diagrams Idea Use graphics to identify and classify equilibria of the difference equation xn+1 = g(xn )
34. 34. 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
35. 35. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x0 ) y = g(x)
36. 36. 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
37. 37. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x0 ) y = g(x)
38. 38. 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 )
39. 39. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x0 , x0 ) y = g(x)
40. 40. 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 )
41. 41. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
42. 42. 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
43. 43. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
44. 44. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
45. 45. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
46. 46. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
47. 47. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
48. 48. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
49. 49. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
50. 50. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x . . . x2 (x0 , x1 ) (x1 , x1 ) (x0 , x0 ) y = g(x)
51. 51. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 y = g(x)
52. 52. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x1 y = g(x)
53. 53. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x1 y = g(x)
54. 54. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x2 x1 y = g(x)
55. 55. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x2 x1 y = g(x)
56. 56. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x3 x2 x1 y = g(x)
57. 57. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 x3 x2 x1 y = g(x)
58. 58. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx3 4 x2 x1 y = g(x)
59. 59. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx3 4 x2 x1 y = g(x)
60. 60. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 xx. ..3 4 x2 x1 y = g(x)
61. 61. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x0 y = g(x)
62. 62. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x1 x0 y = g(x)
63. 63. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x1 x0 y = g(x)
64. 64. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 x1 x0 y = g(x)
65. 65. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x2 x1 x0 y = g(x)
66. 66. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x3 x2 x1 x0 y = g(x)
67. 67. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x x3 x2 x1 x0 y = g(x)
68. 68. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx3 4 x2 x1 x0 y = g(x)
69. 69. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx3 4 x2 x1 x0 y = g(x)
70. 70. Example of a cobweb diagram xk+1 = 5/2xk (1 − xk ) y =x xx. ..3 4 x2 x1 x0 y = g(x)
71. 71. Upshot Equilibria (constant solutions) of the difference equation xk+1 = g(xk ) are solutions to the equation x = g(x).
72. 72. 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
73. 73. 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!
74. 74. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
75. 75. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
76. 76. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
77. 77. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
78. 78. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
79. 79. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
80. 80. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
81. 81. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
82. 82. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
83. 83. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
84. 84. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
85. 85. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
86. 86. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
87. 87. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
88. 88. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
89. 89. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
90. 90. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
91. 91. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
92. 92. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
93. 93. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
94. 94. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
95. 95. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
96. 96. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
97. 97. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
98. 98. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
99. 99. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
100. 100. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
101. 101. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
102. 102. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
103. 103. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
104. 104. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
105. 105. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
106. 106. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
107. 107. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
108. 108. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
109. 109. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
110. 110. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
111. 111. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
112. 112. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
113. 113. Another example xk+1 = (3.1)xk (1 − xk ) y =x y = g(x)
114. 114. Introduction A famous difference equation Other questions What is a difference equation? Goals Testing solutions Analyzing DE with Cobweb diagrams Example: prices
115. 115. 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.
116. 116. 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.
117. 117. 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?