You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/scalar_dynam.md
+55-53Lines changed: 55 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,31 @@ kernelspec:
20
20
(scalar_dynam)=
21
21
# Dynamics in One Dimension
22
22
23
-
```{admonition} Migrated lecture
24
-
:class: warning
25
-
26
-
This lecture has moved from our [Intermediate Quantitative Economics with Python](https://python.quantecon.org/intro.html) lecture series and is now a part of [A First Course in Quantitative Economics](https://intro.quantecon.org/intro.html).
27
-
```
28
23
29
24
## Overview
30
25
31
-
In this lecture we give a quick introduction to discrete time dynamics in one dimension.
26
+
In economics many variables depend on their past values
27
+
28
+
For example, it seems reasonable to believe that inflation last year with affects inflation this year.
29
+
30
+
(Perhaps high inflation last year will lead people to demand higher wages to
31
+
compensate, which will feed into higher prices this year.)
32
+
33
+
Letting $\pi_t$ be inflation this year and $\pi_{t-1}$ be inflation last year, we
34
+
can write this relationship in a general form as
32
35
33
-
* In one-dimensional models, the state of the system is described by a single variable.
34
-
* The variable is a number (that is, a point in $\mathbb R$).
36
+
$$ \pi_t = f(\pi_{t-1}) $$
35
37
36
-
While most quantitative models have two or more state variables, the
37
-
one-dimensional setting is a good place to learn the foundations of dynamics
38
-
and understand key concepts.
38
+
where $f$ is some function describing the relationship between the variables.
39
+
40
+
This equation is an example of one-dimensional discrete time dynamic system.
41
+
42
+
In this lecture we cover the foundations of one-dimensional discrete time
43
+
dynamics.
44
+
45
+
(While most quantitative models have two or more state variables, the
46
+
one-dimensional setting is a good place to learn foundations
47
+
and understand key concepts.)
39
48
40
49
Let's start with some standard imports:
41
50
@@ -44,6 +53,7 @@ import matplotlib.pyplot as plt
44
53
import numpy as np
45
54
```
46
55
56
+
47
57
## Some definitions
48
58
49
59
This section sets out the objects of interest and the kinds of properties we study.
@@ -78,7 +88,7 @@ $$
78
88
f^2(x) = \sqrt{\sqrt{x}} = x^{1/4}
79
89
$$
80
90
81
-
Similarly, if $n$ is an integer, then $f^n$ is $n$ compositions of $f$ with
91
+
Similarly, if $n$ is a positive integer, then $f^n$ is $n$ compositions of $f$ with
82
92
itself.
83
93
84
94
In the example above, $f^n(x) = x^{1/(2^n)}$.
@@ -103,10 +113,6 @@ form a dynamic system, since $g(1) = 2$.
103
113
104
114
* $g$ does not always send points in $S$ back into $S$.
105
115
106
-
107
-
108
-
### Dynamic systems
109
-
110
116
We care about dynamic systems because we can use them to study dynamics!
111
117
112
118
Given a dynamic system consisting of set $S$ and function $g$, we can create
@@ -137,7 +143,7 @@ Recalling that $g^n$ is the $n$ compositions of $g$ with itself,
137
143
we can write the trajectory more simply as
138
144
139
145
$$
140
-
x_t = g^t(x_0) \quad \text{ for } t \geq 0.
146
+
x_t = g^t(x_0) \quad \text{ for } t = 0, 1, 2, \ldots
141
147
$$
142
148
143
149
In all of what follows, we are going to assume that $S$ is a subset of
@@ -149,10 +155,10 @@ Equation {eq}`sdsod` is sometimes called a **first order difference equation**
149
155
150
156
151
157
152
-
### Example: A Linear Model
158
+
### Example: a linear model
153
159
154
160
One simple example of a dynamic system is when $S=\mathbb R$ and $g(x)=ax +
155
-
b$, where $a, b$ are fixed constants.
161
+
b$, where $a, b$ are constants (sometimes called ``parameters'').
156
162
157
163
This leads to the **linear difference equation**
158
164
@@ -174,14 +180,14 @@ a^2 x_0 + a b + b, \quad \text{etc.}
174
180
```
175
181
176
182
Continuing in this way, and using our knowledge of {doc}`geometric series
177
-
<geom_series>`, we find that, for any $t \geq 0$,
183
+
<geom_series>`, we find that, for any $t = 0, 1, 2, \ldots$,
178
184
179
185
```{math}
180
186
:label: sdslinmod
181
187
x_t = a^t x_0 + b \frac{1 - a^t}{1 - a}
182
188
```
183
189
184
-
We have an exact expression for $x_t$ for all $t$ and hence a full
190
+
We have an exact expression for $x_t$ for all non-negative integer $t$ and hence a full
185
191
understanding of the dynamics.
186
192
187
193
Notice in particular that $|a| < 1$, then, by {eq}`sdslinmod`, we have
@@ -192,32 +198,32 @@ Notice in particular that $|a| < 1$, then, by {eq}`sdslinmod`, we have
192
198
x_t \to \frac{b}{1 - a} \text{ as } t \to \infty
193
199
```
194
200
195
-
regardless of $x_0$
201
+
regardless of $x_0$.
196
202
197
203
This is an example of what is called global stability, a topic we return to
198
204
below.
199
205
200
206
201
207
202
208
203
-
### Example: A Nonlinear Model
209
+
### Example: a nonlinear model
204
210
205
211
In the linear example above, we obtained an exact analytical expression for
206
-
$x_t$ in terms of arbitrary $t$ and $x_0$.
212
+
$x_t$ in terms of arbitrary non-negative integer $t$ and $x_0$.
207
213
208
214
This made analysis of dynamics very easy.
209
215
210
216
When models are nonlinear, however, the situation can be quite different.
211
217
212
-
For example, recall how we [previously studied](https://python-programming.quantecon.org/python_oop.html#example-the-solow-growth-model) the law of motion for the Solow growth model, a simplified version of which is
218
+
For example, in a later lecture {doc}`solow`, we will study the Solow-Swan growth model, which has dynamics
213
219
214
220
```{math}
215
221
:label: solow_lom2
216
222
217
223
k_{t+1} = s z k_t^{\alpha} + (1 - \delta) k_t
218
224
```
219
225
220
-
Here $k$ is capital stock and $s, z, \alpha, \delta$ are positive
226
+
Here $k$ is the per capita capital stock and $s, z, \alpha, \delta$ are positive
221
227
parameters with $0 < \alpha, \delta < 1$.
222
228
223
229
If you try to iterate like we did in {eq}`sdslinmodpath`, you will find that
@@ -232,7 +238,7 @@ Analyzing the dynamics of this model requires a different method (see below).
232
238
233
239
## Stability
234
240
235
-
Consider a fixed dynamic system consisting of set $S \subset \mathbb R$ and
241
+
Consider a dynamic system consisting of set $S \subset \mathbb R$ and
236
242
$g$ mapping $S$ to $S$.
237
243
238
244
(scalar-dynam:steady-state)=
@@ -247,9 +253,9 @@ $S$.
247
253
For example, for the linear model $x_{t+1} = a x_t + b$, you can use the
248
254
definition to check that
249
255
250
-
* $x^* := b/(1-a)$ is a steady state whenever $a \not= 1$.
256
+
* $x^* := b/(1-a)$ is a steady state whenever $a \not= 1$,
251
257
* if $a = 1$ and $b=0$, then every $x \in \mathbb R$ is a
252
-
steady state.
258
+
steady state,
253
259
* if $a = 1$ and $b \not= 0$, then the linear model has no steady
254
260
state in $\mathbb R$.
255
261
@@ -304,13 +310,13 @@ There is no single way to tackle all nonlinear models.
304
310
However, there is one technique for one-dimensional models that provides a
305
311
great deal of intuition.
306
312
307
-
This is a graphical approach based on **45degree diagrams**.
313
+
This is a graphical approach based on **45-degree diagrams**.
308
314
309
-
Let's look at an example: the Solow model with dynamics given in {eq}`solow_lom2`.
315
+
Let's look at an example: the Solow-Swan model with dynamics given in {eq}`solow_lom2`.
310
316
311
317
We begin with some plotting code that you can ignore at first reading.
312
318
313
-
The function of the code is to produce 45degree diagrams and time series
319
+
The function of the code is to produce 45-degree diagrams and time series
0 commit comments