Dynamic Optimization in Economics
Dynamic Optimization in Economics
An Introduction
Renato Aguilar
Contents
1 Introduction
1.1 Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 The Discrete-Time Case . . . . . . . . . . . . . . . . . . . . .
1.3 Dynamic Optimization Problems . . . . . . . . . . . . . . . .
2 Preliminary Matters
2.1 A few critical definitions.
2.2 An Useful Lemma . . . .
2.3 Integration by Parts . . .
2.4 Differentiating Integrals .
1
1
3
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
7
8
10
11
3 Differential Equations
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . .
3.2 A few basic definitions . . . . . . . . . . . . . . . . . .
3.3 Separable Differential Equations. . . . . . . . . . . . .
3.4 FirstOrder Linear Differential Equations. . . . . . . .
3.4.1 Solving firstorder differential equations. . . . .
3.4.2 An important application: Bernoullis equation
3.4.3 Phase Diagrams: . . . . . . . . . . . . . . . . .
3.5 SecondOrder Linear Differential Equations. . . . . . .
3.6 An application to natural resources. . . . . . . . . . .
3.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13
13
15
15
17
17
20
22
22
29
30
.
.
.
.
.
.
.
.
4 References.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
33
ii
CONTENTS
Chapter 1
Introduction
The main aim of these notes is supporting an introductory course on
dynamic optimization models in economics. We also present several important applications. Some of them are classic dynamic economic models, while
other are interesting but more specialized models appearing in the economic
literature. However, our focus is not on economic theory, or the economic
contents of these models, but the mathematics of their specification and
solution.
When discussing Mathematics a quest for formalization and rigor seems
natural. However, we think that the typical reader of this text is not basically interested in Mathematics, but as an instrument for presenting, discussing, and analyzing economic hypothesis and ideas. Thus, we had to
reach a compromise between rigor and formalization, on one side, and readability and applicability on the other side. Such a tradeoff is not easy to
reach. We can also note that modern Economic Theory has a strong orientation towards formalization and mathematical rigor. Observe, for example,
the insistence on existence theorems in contemporary literature.
1.1
Dynamic Models
Our starting point is the conviction that the economic relationships and
system must be understood and analyzed in a dynamic or temporal perspective. In this sense, we strongly limit, or even reject the possibility of
instantaneous contemporaneous effects between economic variables. We will
consider a real-valued variable t, often defined on an interval [t0 , t1 ] R in
the real line. We will systematically denote this variable as time. Note that,
from a purely mathematical point of view, this is an arbitrary denotation.
1
CHAPTER 1. INTRODUCTION
(1.1)
where x = dx/ dt and f is a function relating the rate of change of the state
variable x to the same variable and time. That is, formally we can write
f : Rn+1 Rn .
There are several interesting question to be answered for a model represented by equation (1.1), most often including initial conditions, such
. First, we need to determine a procedure for finding the path
as x (t0 ) = x
x (t) for interesting and relevant specifications of function f. That is, we
need to solve the differential equation at (1.1). On the other hand, it is
interesting to find the conditions for the existence of a solution, as well as
the possible uniqueness of the solution. The properties of the solution are
also interesting. For example, which conditions leads to a bounded function
as a solution. Thus, analyzing and solving dynamic models is equivalent to
analyzing and solving ordinary differential functions.
Sometimes we write this differential equation in a slightly different manner, including one more variables u : [t0 , t1 ] R Rk , among the arguments of f in (1.1). The new model is, then,
x = f (x, u, t) .
(1.2)
1.2
These models, both the basic dynamic model as well as the control problem, are interesting and useful analytical instruments. But still Economic
Theory some times favors an alternative version. In this case, instead of considering continuous, or at least piece-wise continuous, time-paths as state
variables describing the behavior of the economic system under analysis,
we use time-paths that are real-valued sequences. This is the discrete-time
dynamic model. The model becomes:
xt+1 = f (xt , t) .
(1.3)
In this case the problem is trying to find a sequence1 {xt } that satisfies the
finite differences equation at (1.2).
The corresponding control problem becomes:
xt+1 = f (xt , ut , t) .
(1.4)
Now the problem is trying to find a control sequence {ut }, as well a state
sequence {xt } satisfying the finite differences equation at (1.4).
1.3
CHAPTER 1. INTRODUCTION
y
B
t0
t1
p
1 + y 2 dt,
where y = dy/ dt. Then, the length of the path between point A and point
B is given by
Z t1 p
1 + y 2 dt.
V [y] =
t0
t0
The answer is, obviously, that the shortest distance between A and B is
given by the right line connecting these two points. Eventually we will solve
this problem, giving a mathematical foundation to this well known intuitive
result.
This problem can be given an economic content. We can assume that
point A represents the initial state of an economy, as indicated by the level of
GDP, by the level of consumption, or by a combination of several indicators.
Point B represents the end-state, or desired state at time t1 , of the same
economy as indicated by the same indicators. The problem is that there are
many possible time-paths from A to B. In graph 1.1 we have drawn a few of
these possible paths. We can expect that one of these paths will be optimal,
given a few regularity conditions to be discussed later on. However, an
optimal path in which sense? Thus, we need to introduce an indicator that
evaluates the performance of each path along time, considering its dynamic
behavior. Most often we will use an integral for this purpose. Thus, our
problem can be generalized as
Z t1
max V [y] =
F (y, y,
t) dt,
y
t0
CHAPTER 1. INTRODUCTION
f (K) = C + K C = f (K) K.
The welfare level of the society is represented by a utility function out of
consumption. That is, welfare is given by U (C) . Thus, we are interested on
a time-path for capital K, and consequently for savings and consumption,
that maximizes welfare over a given time horizon. This problem can be
stated as Calculus of Variations problem:
Z t1 h
i
U f (K) K dt,
max
t0
s.t. x = f (x, u, t) ,
where F an f are functions complying with a few regularity conditions to
be discussed later on.
Chapter 2
Preliminary Matters
In this section we discuss a few preliminary matters, which are important
for understanding the argumets presented later on. These are a number of
definitions and results from Calculus, some of them quite classical, that play
a critical role in some of the demonstration and in the procedures for finding
the solution of these models.
2.1
Let us introduce some notation first. Consider the following formal definition.
Definition 2.1. A function x : [t0 , t1 ] R R, x = x (t) is called a
time-path.
In this context, x [t0 , ] and x (, t1 ] are function x restricted to the intervals [t0 , ] and (, t1 , ] respectively, where [t0 , t1 ] . In particular, x (t)
will denote the optimal path in a dynamic problem.
Definition 2.2. Consider F = {x (t) | a time-path} . That is, x (t) is a real
function of a real variable. Then V [x (t)] is a functional if and only if
V : F R.
Observe that there is nothing really new in this definition. We have
just sorted out a particular class of functions: those functions where the
argument is also a function. Notice that the objective functions used in the
Calculus of Variations
Z t1
V (x) =
F (x, x,
t) dt
t0
t1
F (x, u, t) dt
t0
presented in the previous chapter comply with this definition. That is, the
aim of these problems is optimizing a functional.
2.2
An Useful Lemma
Let us now present a lemma that will play a critical role later on when
we discuss the solution of the Calculus of Variations problem
Lemma 2.1. Let f be a continuous real-valued function defined on an interval [t0 , t1 ]. Then, this function has the following property:
Z t1
f (t) p (t) dt = 0,
(2.1)
t0
for every real-valued function p defined on the interval [t0 , t1 ], and such that
p (t0 ) = p (t1 ) = 0, if and only if f (t) = 0 for all t [t0 , t1 ], provided that
the integral indicated in (2.1) exists.
Proof. That f (t) = 0 for all t [t0 , t1 ] implies equation (2.1) is trivial. The
real problem is demonstrating that equation (2.1) implies that f (t) = 0 for
all t [t0 , t1 ]. We demonstrate this by showing that if we assume that there
exists at least one c [t0 , t1 ] for which f (t) 6= 0, then we can find a function
p, defined on the interval [t0 , t1 ], for which the integral in (2.1) exists but
Z t1
f (t) p (t) dt 6= 0.
t0
1. Assume that condition (2.1) is true, but there exists a point c [t0 , t1 ]
such that f (t) > 0. But, because f is continuous, c cannot be an
isolated point. Thus, there must be an open interval (a, b) containing
c such that f (t) > 0 for all t (a, b) [t0 , t1 ]. Now define the function
p as
0
if t
/ (a, b) ,
p (t) =
k
k
(t a) (b t) , for some k {1, 2, 3, . . .} if t (a, b) .
It is easy to see that
lim p (t) = lim p (t) = 0.
ta
tb
t0
t1
But
Z t1
f (t) p (t) dt =
t0
Z
f (t) p (t) dt +
t0
Z
f (t) p (t) dt +
t1
=0+
a
Observe that this a quite general result. We need to put very few conditions on function p. The critical point is that the relevant integrals do exist.
For our purposes we can restrict safely this result to a particular class of
functions; namely to functions p that are twice differentiable. For instance,
choose k 2 in the p function introduced at point 1 of our demonstration.
10
2.3
Integration by Parts
(2.2)
Assume that both u0 (x) v (x) and u (x) v 0 (x) are integrable on the interval
[a, b] . Then, equation 2.2 allows us to write
]u (x) v (x)[ba
Z
=
u (t) v (t) dt +
a
t log t dt.
a
x2
,
2
dx
.
x
t log t dt =
x2
log x
2
b
x2
log x
2
b
b 2
t
dt
,
2 t
t
dt,
2
a
a
2
b 2 b
x
x
=
log x
,
2
4 a
a
b2
1
a2
1
=
log b
log a
.
2
2
2
2
=
2.4
11
Differentiating Integrals
assuming that the function f is integrable with respect to the first variable.
Then we have that
Z b
dI
f (t, x)
=
dt,
dx
x
a
assuming that the function f is differentiable with respect to the second
variable, and this integral exists.
Following the previous result, it is easy to see that
Z b
Z b
f (x, y)
d
f (x, y) dx =
dx.
dy a
y
a
Consider now an integrable function
R y g on an interval [a, b] . We can define a new function I as I (y) = a g (x) dx for all y [a, b] . Then the
fundamental theorem of calculus implies that:
Z y
dI
d
=
g (x) dx = g (y) .
dy
dy a
If y = (z) then, using the chain rule, we can write
dI
dz
dI dy
= g (y) 0 (z) = g ( (z)] 0 (z) , or
dy dz
Z (z)
d
g (x) dx = g [ (z)] 0 (z) .
dz a
Now write
Z u
I (u, v) =
f (x, v) dx,
a
where u = (y) and v = y. Then, using the chain rule once again,
dI
I du I dv
=
+
,
dy
u dy
v dy
Z
f (x, v)
dx,
v
a
Z (y)
Z (y)
d
f (x, y)
0
f (x, y) dx = f [ (y) , y] (y) +
dx.
dy a
y
a
This result is known as the Leibniz formula.
0
= f (u, v) (y) +
(2.3)
12
Chapter 3
Differential Equations
This chapter presents a short and rather concise discussion about Differential Equations. This is an essential topic for understanding dynamical models. We assumed that the reader has some familiarity with differential equations. Thus, this chapter is just a short and fast reminder of the
main ideas in this subject.
3.1
Introduction
14
dx
d2 x
= x(1) , x
= 2 = x(2) , . . .
dt
dt
ds
.
dt
d2 s
dv
= s = 2 .
dt
dt
3.2
15
There are no general methods or approaches for solving differential equations. We have instead a number of solutions or methods for solving a number of families of differential equations. Thus, we are discussing here the
solution of those cases that are more important and relevant for the analysis
and study of dynamic models in economics. We begin our discussion with a
few definitions that will focus our discussion.
Definition 3.1. Consider the differential equation
x = F (x, t).
(3.2)
3.3
(3.3)
Notice that if g (x) has some zero (there exists some point a such that
g (a) = 0) then x (t) = a is a solution. It can be seen that for the case
x (t) = a we would have
f (t) g (a) = 0 = x.
16
x0
if g () 6= 0
d
=
g ()
f (s) ds + C.
t0
Examples
Example 3.4. Consider the separable equation x = rx, x > 0, where r is a
constant. Rewriting this equation as
dx
= r dt,
x
we can see that this differential equation represents a population with size
x (t) at time t, growing at a constant rate r. Integrating this last expression
we get
ln x = rt + log C x = Cert .
If we differentiate this last expression we reproduce our differential equation.
Example 3.5. Consider the following differential equation x = 2tex . This
equation can be rewritten as
ex dx = 2t dt.
Integrating this expression we get
ex = t2 + C,
x = log t2 + C .
3.4
3.4.1
17
(3.4)
where a (t) and b (t) are functions of t not depending on x. We begin our
discussion with the case when function a (t) is a constant. That is, when
a (t) = a for all t [t0 , t1 ]. Thus, equation (3.4) becomes,
x + ax = b (t) .
(3.5)
18
rt
bert dt + C,
=
Z
=b
ert dt + C,
b
xert = ert + C.
r
Thus, the general solution is
b
x = Cert .
r
We can use the initial condition, assuming that t = 0.
b
x (0) = 0 = C ,
r
b
C= .
r
Thus, the particular solution is
x (t) =
b rt
e 1
r
The general case for firstorder linear equations is when a (t) in equation
(3.4) is a function of t. In order to solve this case we can use the following
basic results,
Z
d
a (t) dt = a (t) .
dt
Thus we have that
R
R
R
d h R a(t) dt i
xe
= xe
a(t) dt + a (t) xe a(t) dt = b (t) e a(t) dt .
dt
Integrating both sides we get,
xe
a(t) dt
Z
=
a(t) dt
b (t) dt + C,
19
Rt
t0
a() d
b (s) e
Rt
t0
t0
ye 2 t =
3 2
6te 2 t dt + C,
Z
3 2
= 2 3te 2 t dt + C,
3 2
3 2
ye 2 t = 2te 2 t + C,
3 2
y = 2 + Ce 2 t .
Using the initial condition, and assuming t = 0 we get,
y (0) = 3 = 2 + C C = 1.
Thus the solution is
3 2
y (t) = 2 + e 2 t .
Let us see now a more difficult example.
Example 3.8. Consider the following differential equation,
1 + t2 y + 3ty = 6t and y (0) = 3.
This equation can be rewritten as
y +
3t
6t
y=
.
1 + t2
1 + t2
a() d
ds.
20
3
2
6t
e 2 log (1+t ) dt,
2
1+t
Z
3/2
6t
3/2
1 + t2
dt,
y 1 + t2
=
2
1+t
Z
1/2
= 6t 1 + t2
dt,
Z
1/2
=3
1 + t2
2t dt,
Z
3 2 3/2
= 3 u1/2 du =
u + C,
3
3/2
3/2
y 1 + t2
= 2 1 + t2
+ C,
3/2
y = 2 + C 1 + t2
.
3
2
ye 2 log (1+t ) =
3.4.2
3/2
The following differential equation, called Bernoullis equation, and defined over an interval t [t0 , t1 ] appears often in different contexts.
x = Q (t) x + R (t) xn ,
where Q (t) 6= 0 and R (t) 6= 0 for all t [t0 , t1 ].
(3.6)
21
n
x
x =
z.
1n
Multiplying equation (3.6) by xn we get
xx
n = Q (t) x1n + R (t) .
Substituting in this equation we get,
z
z = Q (t) z + R (t) .
1n
This is a firstorder linear that can be solved using the methods described
above.
Example 3.9. consider the following differential equation
tx + 2x = tx2 ,
(t 6= 0) .
e2 log t dt + C,
Z
= t2 dt + C,
zt2 = t1 + C,
z = t + t2 C,
x1 = t (1 + Ct) ,
1
.
x=
t (1 + Ct)
22
3.4.3
Phase Diagrams:
3.5
(3.7)
23
1 2
4a
1 2
4a
b.
24
1 2
4a
3.
1 2
1
t
4 a b < 0 x = e (A cos t + B sin t) , where = 2 a, =
q
b 14 a2 .
x
= r2 ert .
a2 4b
,
2
with two solutions. There are three possible cases, depending on the sign of
the number under the radical.
1. If a2 4b > 0 the seconddegree equation above has two different real
solutions r1 and r2 . Moreover, both solutions u1 = er1 t and u2 =
er2 t are not proportional. To see this assume that there exists a real
constant k 6= 0 such that er1 t = ker2 t . Taking logarithms we get
r1 t = r2 t + logk,
t (r1 r2 ) = logk.
Because (r1 r2 ) is a constant, there is no constant k satisfying this
last equation for all t [t0 , t1 ]. Thus, following Theorem (3.2) the
general solution is
x (t) = Aer1 t + Ber2 t ,
with A and B arbitrary constants.
25
1
b a2 .
4
26
Unfortunately, the second step, searching for particular solutions for the
nonhomogeneous equation, cannot be treated in a systematic a rigorous
manner. Al we have is a practical rule: For the particular solution to the
non-homogeneous equation, required in step 2, try a function that mimics
f (t) in (3.7). For example
1. f (t) = A u = A/b. (Try u constant).
2. f (t) is a polynomial of degree n. Try u = An tn + An1 tn1 + +
A1 t + A0 . Then, if this fails, try a polynomiall degree n + 1.
3. f (t) = peqt . Try u = Aeqt .
4. f (t) = p sin rt + q cos rt. Try u = A sin rt + B cos rt.
Example 3.10. Solve the following differential equation:
x
+ x 20x = 20t + 19
when x (0) = 6 and x (0) = 3.
The associated homogeneous equation is
x
+ x 20x = 0,
and the characteristic equation is,
r2 + r 20 = 0.
This seconddegree equation solves as
1 1 + 80
19
r=
=
r1 = 4 and r2 = 5.
2
2
Now, in order to look after a particular solution of the nonhomogeneous
equation, let us assume u (t) = Ct + D. Then, we have u = C and u = 0.
Substituting into the non-homogeneous equation gives,
C 20 (Ct + D) = 20t + 19,
20Ct + C 20D = 20t + 19.
We need to solve the last equation for C and D, fo all possible values of
t. This can be done using the indeterminate coefficients approach. We
simply observe that this equation states the equality of two ploinomials in
27
t. This can be true, for all t, only if the corresponding coefficients are equal.
Thus, we can write
20C = 20 C = 1,
and
C 20D = 19 1 20D = 19 20D = 20 D = 1.
So, we can choose u (t) = t 1. The general solution is, then,
x = Ae4t + Be5t t 1,
and, differentiating, we have
x = 4Ae4t 5e5t 1.
We can now use the intial conditions to get,
x (0) = 6 = A + B 1,
x (0) = 3 = 4A 5B 1.
Collecting terms and multiplying the first equation by 5, we get
35 = 5A + 5B,
4 = 4A 5B.
Adding together both equations we bet
39 = 9A A =
39
.
9
24
.
9
39 4t 24 5t
e + e
t 1.
9
9
x (1) = e3 .
28
5 25 24
r1 = 3,
2
r 5r + 6 = 0 r =
r2 = 2
2
29
3.6
(3.9)
A
B
K
+
=
.
x
K x
x (K x)
(3.10)
Now write,
Then, it must be
AK Ax + Bx = K.
This expression gives us two equations:
B A = 0 A = B,
AK = K A = 1 and B = 1.
1
30
(3.11)
3.7
Exercises
2 t3
dy
+ 12y + 2et = 0,
dt
y (0) = 4;
y 0 (0) = 2 .
3.7. EXERCISES
31
2
ac
x + x =
1
1
6= 1, 6= 0.
32
x (1) = e4 .
x(0) = 0,
x (1) = e4 .
x(1) = 2.
Chapter 4
References.
Enders, Walter, (1995), Applied Econometric Time series, New York:
John Wiley & Sonc, Inc.
Samuelson, Paul, (1939), Interactions Between the Multiplier Analysis
and Prinicple of Acceleration, Review of Economics and Statistics, 21, 75-78.
33