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
This updates the editorial suggestion in #426
(Delete %matplotlib inline)
- If $n$ is an integer -> if $n$ is a positive integer
- Change the duplicated heading for 22.2.3. Dynamic systems.
- Capitalize the first letter in the section headings.
- where $a, b$ are fixed constants -> where $a, b$ are constants. Sometimes they are referred to as parameters
- $t \geq 0$ -> t = 0, 1, 2
- Arbitrary $t$ to non-negative integer $t$
- For example, recall how we [previously studied](https://python-programming.quantecon.org/python_oop.html#example-the-solow-growth-model) -> For example, in the simple Solow-Swan growth model.
- $k$ is capital stock -> $k$ is capital stock per capita
- a fixed dynamic system consisting -> a dynamic system consisting
- Use commas instead of full stops below the sentence: "For example, for the linear model $x_{t+1} = a x_t + b$, you can use the definition to check that"
- 45 degree -> 45-degree
## Code
- Add labels to axis in `plot45` function x_t and x_{t+1}
- Put the global variables into function $g$
- Missing full stop in 'study the trajectories'
- Change the Solow model to Solow-Swan model
Copy file name to clipboardExpand all lines: lectures/scalar_dynam.md
+34-43Lines changed: 34 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,6 @@ and understand key concepts.
40
40
Let's start with some standard imports:
41
41
42
42
```{code-cell} ipython
43
-
%matplotlib inline
44
43
import matplotlib.pyplot as plt
45
44
import numpy as np
46
45
```
@@ -79,7 +78,7 @@ $$
79
78
f^2(x) = \sqrt{\sqrt{x}} = x^{1/4}
80
79
$$
81
80
82
-
Similarly, if $n$ is an integer, then $f^n$ is $n$ compositions of $f$ with
81
+
Similarly, if $n$ is a positive integer, then $f^n$ is $n$ compositions of $f$ with
83
82
itself.
84
83
85
84
In the example above, $f^n(x) = x^{1/(2^n)}$.
@@ -104,10 +103,6 @@ form a dynamic system, since $g(1) = 2$.
104
103
105
104
* $g$ does not always send points in $S$ back into $S$.
106
105
107
-
108
-
109
-
### Dynamic systems
110
-
111
106
We care about dynamic systems because we can use them to study dynamics!
112
107
113
108
Given a dynamic system consisting of set $S$ and function $g$, we can create
@@ -138,7 +133,7 @@ Recalling that $g^n$ is the $n$ compositions of $g$ with itself,
138
133
we can write the trajectory more simply as
139
134
140
135
$$
141
-
x_t = g^t(x_0) \quad \text{ for } t \geq 0.
136
+
x_t = g^t(x_0) \quad \text{ for } t = 0, 1, 2, \ldots
142
137
$$
143
138
144
139
In all of what follows, we are going to assume that $S$ is a subset of
@@ -150,10 +145,10 @@ Equation {eq}`sdsod` is sometimes called a **first order difference equation**
150
145
151
146
152
147
153
-
### Example: A Linear Model
148
+
### Example: a linear model
154
149
155
150
One simple example of a dynamic system is when $S=\mathbb R$ and $g(x)=ax +
156
-
b$, where $a, b$ are fixed constants.
151
+
b$, where $a, b$ are constants (sometimes they are referred as parameters).
157
152
158
153
This leads to the **linear difference equation**
159
154
@@ -175,14 +170,14 @@ a^2 x_0 + a b + b, \quad \text{etc.}
175
170
```
176
171
177
172
Continuing in this way, and using our knowledge of {doc}`geometric series
178
-
<geom_series>`, we find that, for any $t \geq 0$,
173
+
<geom_series>`, we find that, for any $t = 0, 1, 2, \ldots$,
179
174
180
175
```{math}
181
176
:label: sdslinmod
182
177
x_t = a^t x_0 + b \frac{1 - a^t}{1 - a}
183
178
```
184
179
185
-
We have an exact expression for $x_t$ for all $t$ and hence a full
180
+
We have an exact expression for $x_t$ for all non-negative integer $t$ and hence a full
186
181
understanding of the dynamics.
187
182
188
183
Notice in particular that $|a| < 1$, then, by {eq}`sdslinmod`, we have
@@ -193,32 +188,32 @@ Notice in particular that $|a| < 1$, then, by {eq}`sdslinmod`, we have
193
188
x_t \to \frac{b}{1 - a} \text{ as } t \to \infty
194
189
```
195
190
196
-
regardless of $x_0$
191
+
regardless of $x_0$.
197
192
198
193
This is an example of what is called global stability, a topic we return to
199
194
below.
200
195
201
196
202
197
203
198
204
-
### Example: A Nonlinear Model
199
+
### Example: a nonlinear model
205
200
206
201
In the linear example above, we obtained an exact analytical expression for
207
-
$x_t$ in terms of arbitrary $t$ and $x_0$.
202
+
$x_t$ in terms of arbitrary non-negative integer $t$ and $x_0$.
208
203
209
204
This made analysis of dynamics very easy.
210
205
211
206
When models are nonlinear, however, the situation can be quite different.
212
207
213
-
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
208
+
For example, thelaw of motion for the Solow-Swan growth model, a simplified version of which is
214
209
215
210
```{math}
216
211
:label: solow_lom2
217
212
218
213
k_{t+1} = s z k_t^{\alpha} + (1 - \delta) k_t
219
214
```
220
215
221
-
Here $k$ is capital stock and $s, z, \alpha, \delta$ are positive
216
+
Here $k$ is the per capita capital stock and $s, z, \alpha, \delta$ are positive
222
217
parameters with $0 < \alpha, \delta < 1$.
223
218
224
219
If you try to iterate like we did in {eq}`sdslinmodpath`, you will find that
@@ -233,7 +228,7 @@ Analyzing the dynamics of this model requires a different method (see below).
233
228
234
229
## Stability
235
230
236
-
Consider a fixed dynamic system consisting of set $S \subset \mathbb R$ and
231
+
Consider a dynamic system consisting of set $S \subset \mathbb R$ and
237
232
$g$ mapping $S$ to $S$.
238
233
239
234
### Steady states
@@ -247,9 +242,9 @@ $S$.
247
242
For example, for the linear model $x_{t+1} = a x_t + b$, you can use the
248
243
definition to check that
249
244
250
-
* $x^* := b/(1-a)$ is a steady state whenever $a \not= 1$.
245
+
* $x^* := b/(1-a)$ is a steady state whenever $a \not= 1$,
251
246
* if $a = 1$ and $b=0$, then every $x \in \mathbb R$ is a
252
-
steady state.
247
+
steady state,
253
248
* if $a = 1$ and $b \not= 0$, then the linear model has no steady
254
249
state in $\mathbb R$.
255
250
@@ -303,13 +298,13 @@ There is no single way to tackle all nonlinear models.
303
298
However, there is one technique for one-dimensional models that provides a
304
299
great deal of intuition.
305
300
306
-
This is a graphical approach based on **45degree diagrams**.
301
+
This is a graphical approach based on **45-degree diagrams**.
307
302
308
-
Let's look at an example: the Solow model with dynamics given in {eq}`solow_lom2`.
303
+
Let's look at an example: the Solow-Swan model with dynamics given in {eq}`solow_lom2`.
309
304
310
305
We begin with some plotting code that you can ignore at first reading.
311
306
312
-
The function of the code is to produce 45degree diagrams and time series
307
+
The function of the code is to produce 45-degree diagrams and time series
0 commit comments