Professional Documents
Culture Documents
Leksioni 4 Modelim
Leksioni 4 Modelim
Difference Equations
Part 1
Difference Equation
• Fibonacci Sequence :
• 1,1,2,3,5,8,13,21,34
• +2 = +1 +
• 0 = 1 = 1, = 0,1, …
Growth model
orbit { , , , ,…}
dependent on
• Example: +1 = ≔ , 0 = , = 0,1,2,3 …
0 = 1, ⇒ 1,1,1,1, …
0 = −1 ⇒ −1,1,1,1, …
0 =2⇒ 2,4,16,256,65536, …
1
0 = ⇒ {0.5,0.25,0.0625, 0.00390625, … }
2
Difference Equations
• Example +1 = = , 0 = , = 0,1,2,3
1
0 = ⇒ {0.5,0.25,0.0625, 0.00390625, … }
2
Cobweb Function:
0 ,0 → 0 , 1 →
→ 1 , (1) → 1 , 2 →
→ 2 , (2) → 2 , 3 →
→ 3 , (3) → 3 , 4 →
…
„oscillates“ between
y= and =
Difference Equations
( + 1) +1 = 4 7
+1 = +
9 2
+1 = ( ) Cobweb Diagram
⋮ • Graphical technique to
3 investigate iterated functions
2
(1) • Iteration is performed
graphically
• Consists of
– Iterated Function
– 1.Mediane +1 =
– Cobweb path
(0) (1) 2 … ( )
Cobweb Functions
( + 1) +1 = ( ) ( + 1) +1 = ( )
( ) ( )
(0) ( ) (0) ( )
Inward spirals lead to Outward spirals from repelling
attracting fixed points fixed points
Cobweb Functions
• Example
+1 = ≔ , 0 = , = 0,1,2,3 …
⇒ ∗
= ∗
= ∗
⇒ ∗ ∈ {0,1}
Cobweb Function:
0 ,0 → 0 , 1 →
→ 1 , (1) → 1 , 2 →
→ 2 , (2) → 2 , 3 →
→ 3 , (3) → 3 , 4 →
… → (0,0)
∗
attracts =0
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Examples in Finance
– Actual balance y(n)
- after n compounding periods
- with annual interest I
- compounded m times a year
- and constant amount b added at the
end of every compounding period:
+1 = 1+ +
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1 = 0 + = +
2 = 1 + = + + = + +
3 = 2 + = + + +
= + + +1
…
= + 1 + + + ⋯+
= +
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
= + 1+ + +⋯+ = +
• Hence
1−
= + , ≠1
1−
+ , =1
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + , ≠1 ( + 1) +1 =
1−
+ , =1
Example: +1 = ( )
4 7 ⋮
+1 = + ,
9 2 3
9 2
0 = 2.25 = (1)
4
⋅
= + =
⋅
(0) (1) 2 … ( )
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Equilibrium / Fixed Point
• ∗= ∗ ∗
= ∗+
∗
= , ≠1
1−
∗
– Attractive/stable: , , , , … .
∗
– Repelling/unstable: , , , , … .
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + = ( + 1) +1 = ( )
1−
∗ ∗ ∗
− + , = , ≠1 ( )
1−
• Example
+ 1 = −0.6 + 8, =2
∗
• = = =5
.
• = − 2−5 +5=
−1 3 (0) ( )
+5
5
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + = ( + 1) +1 = ( )
1−
∗ ∗ ∗ ( )
− + , = , ≠1
1−
• Example
+ 1 = −2.5 + 17.5, = 4.8
∗ .
• = = =5
.
• = − −5 +5=
−1 5 (0) ( )
+5
2
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + = ( + 1) +1 =
1−
− ∗ + ∗, ∗ = , ≠1
1− +1 = ( )
• Example
⋮
4 3 9
+1 = + 3.5,
2 =
9 4
∗
(1)
• = = 6.3
• = − − 6.3 + 6.3 =
2 3
− + 6.3
5 (0) (1) 2 … ( )
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + =
1−
− ∗ + ∗, ∗ = , ≠1
1−
• Stability:
< 1, ∗
un ≥ 1, ∗
Linear Affine Difference Equations
+1 = = + , 0 = , = 0,1,2, …
• Solution
1−
= + =
1−
− ∗ + ∗, ∗ = , ≠1
1−
• Classification of Solutions
Typ of solution depends on , and
1. >1
Main 2. =1 1. =
Sub-
classification 3. 0 < < 1 classification 2. >
4. −1 < < 0
5. = −1 3. <
6. < −1
Parameters Solution Type
1 a > 1, y0 = y* Constant
2 a > 1, y0 > y* Exponentially increasing without bound
3 a > 1, y0 < y* Exponentially decreasing without bound
4 a = 1, b = 0 Constant Linear
5
6
a = 1, b > 0
a = 1, b < 0
Linearly increasing without bound
Linearly decreasing without bound
Affine
7 0 < a < 1, y0 = y* Constant Difference
8
9
0 < a < 1, y0 > y*
0 < a < 1, y0 < y*
Exponentially decreasing to a bound
Exponentially increasing to a bound
Equations
10 -1 < a < 0, y0 = y* Constant +1
11 -1 < a < 0, y0 > y* Oscillating with decreasing amplitude = +
12 -1 < a < 0, y0 < y* Oscillating with decreasing amplitude 0 =
13 a = -1, y0 = b/2 Constant ∗ = , ≠1
14 a = -1, y0 > b/2 Oscillating with constant amplitude 1−
15 a = -1, y0 < b/2 Oscillating with constant amplitude y (k 1) f ( y (k ))
16 a < -1, y0 = y* Constant a y (k ) b
17 a < -1, y0 > y* Oscillating with increasing amplitude k 0,1,2,3,
18 a < -1, y0 < y* Oscillating with increasing amplitude y (0) y0
b
y* ,a 0
1 a
Linear Affine Difference Equations -
Classification of Solutions
+1 = + , 0 = , ∗ = , ≠1
1−
No Solution Type Solution Sketch Parameters
a > 1, y0 = y*
a = 1, b = 0
1 Constant
0 < a < 1, y0 = y*
-1 < a < 0, y0 = y*
a = -1, y0 = b/2
a < -1, y0 = y*
Linearly
increasing
2
without a = 1, b > 0
bound
Linear Affine Difference Equations -
Classification of Solutions
+1 = + , 0 = , ∗ = , ≠1
1−
No Solution Type Solution Sketch Parameters
Linearly
decreasing
3
without
a = 1, b < 0
bound
Exponentially
increasing
4
without
a > 1, y0 > y*
bound
Linear Affine Difference Equations -
Classification of Solutions
+1 = + , 0 = , ∗ = , ≠1
1−
No Solution Type Solution Sketch Parameters
Exponentially
decreasing
5
without
a > 1, y0 < y*
bound
Exponentially
6 increasing 0 < a < 1, y0 < y*
to a bound
Linear Affine Difference Equations -
Classification of Solutions
+1 = + , 0 = , ∗ = , ≠1
1−
No Solution Type Solution Sketch Parameters
Exponentially
7 decreasing 0 < a < 1, y0 > y*
to a bound
Oscillating
8 with constant
a = -1, y0 > b/2
amplitude a = -1, y0 < b/2
Linear Affine Difference Equations -
Classification of Solutions
+1 = + , 0 = , ∗ = , ≠1
1−
No Solution Type Solution Sketch Parameters
Oscillating
9
with a < -1, y0 > y*
increasing a < -1, y0 < y*
amplitude
Oscillating
10
with -1 < a < 0, y0 > y*
decreasing -1 < a < 0, y0 < y*
amplitude
Applications to finance
• +1 = +
first order affine dynamical system
• Fixed Point: ∗ =
• General Solution:
= − + Cobweb theorem of economics
stable for
−1 < − <1