You are on page 1of 20

Pascal Michaillat [p.michaillat@lse.ac.

uk] Mathematical Methods for Macroeconomics

EC400

First-Order Differential Equations

Contents
1 First-Order Differential Equations 1.1 1.2 1.3 1.4 2 Constant Growth Rate . . . . . . . . . . . . . . . . . . . . . . . . Constant Coefcient . . . . . . . . . . . . . . . . . . . . . . . . General Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initial Value Problem . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 5 6 7 8 9

Linear Systems of Differential Equations 2.1 2.2 2.3 General Solution . . . . . . . . . . . . . . . . . . . . . . . . . . Homogenous Systems . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 2.3.2

Example: Two-Variable Homogenous System . . . . . . . . . . . 10 Closed-Form Solution . . . . . . . . . . . . . . . . . . . 10 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 12

Phase Diagrams 3.1 3.2

Construction of the Phase Diagram . . . . . . . . . . . . . . . . . 12 Diagram with a State and a Control Variable . . . . . . . . . . . . 13 14

Nonlinear Systems of Differential Equations 4.1 4.2

Construction of the Phase Diagram . . . . . . . . . . . . . . . . . 15 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

1
1.1

First-Order Differential Equations


Constant Growth Rate

Let x(t) be a function of time t R. Let x (t) dx/dt denote the derivative of x(t) with respect to time. Consider the equation x ( t ) x( t ) = 0 (1)

where R is a constant. Equation (1) is a rst-order differential equation (FODE), because it involves x(t) and the rst-order derivative of x(t) with respect to time: x (t). Equation (1) is a functional equation: the unknown is the function x(t) rather than a number or a vector. Solving equation (1) means nding the functions x(t) that, together with their derivative x (t), satisfy equation (1) for all t R. Equation (1) is an especially simple differential equation. It can be rewritten as x ( t) = , x( t) so it imposes that x(t) has a constant growth rate over time. It admits a simple class of functions as solution: x ( t ) = A e t , (2)

for any constant A R. Furthermore, the constant A can be determined by an additional boundary condition because A = x(0) = x(t0 ) et0 for any date t0 R. 2

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

It is clear that functions of the type (2) satisfy equation (1). We now show that if a function x(t) solves equation (1), it is necessarily of the type (2). Observe that x ( t) d ln (x(t)) = , x( t ) dt which allows us to rewrite differential equation (1) as d ln x(t) = dt Let t0 R. Integrating the equation from t0 to t, x(t) necessarily satises Z
t

d ln x(t) =
t0

ln (x(t)) ln (x (t0 )) = (t t0 )

t t0

dt

Therefore, if x(t) solves equation (1), it is necessarily of the type (2).

x ( t ) = x ( t 0 ) e ( t t 0 ) = x ( t 0 ) e t 0 e t .

1.2

Constant Coefcient

We have solved the simplest FODE, which takes the form of equation (1). We now study a more general FODE: x ( t ) x( t ) = f ( t ) , (3)

where f (t) R. Equation (1) is the special case of equation (3) with f (t) = 0 for all t. Equation (3) admits a simple class of functions as solution: x( t ) = e
t

A+

t 0

f (z ) ez dz

(4)

for any constant A R. Furthermore, the constant A can be determined by an 3

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics additional boundary condition because A = x(0) = x(t0 ) e for any date t0 R.
t 0

EC400

t0 0

f (z ) ez dz

It is clear that functions of the type (4) satisfy equation (3). We now show that if a function x(t) solves equation (3), it is necessarily of the type (4). To be able to solve the FODE, we manipulate a certain function x(t) (t) instead of manipulating x(t) directly. The auxiliary function (t) is called the integrating factor. The integrating factor for this problem is ( t ) = e t . This integrating factor (t) has the desirable property that ( t ) = ( t ) .

We multiply both sides of the differential equation (3) by the integrating factor to obtain x ( t ) ( t ) x ( t ) ( t ) = f ( t ) ( t )

x ( t ) ( t ) + x ( t ) ( t ) = f ( t ) ( t ) d [x(t) (t)] = f ( t ) ( t ) . dt

Integrating the equation from t0 R to t we obtain Z


t t0

d [x(t) (t)] =

x ( t ) ( t ) x ( t 0 ) ( t 0 ) = x( t ) =

t Z 0t t0

f (z ) (z )dz

f (z ) (z )dz Rt x (t0 ) (t0 ) + t0 f (z ) (z )dz ( t )

(5)

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics Given the denition of the integrating factor (t), x( t ) = e
t

EC400

x ( t0 ) e

t 0

t t0

f (z ) ez dz .

Therefore, there exists A R such that x( t ) = e


t

A+

t 0

f (z ) ez dz .

1.3

General Case

We now generalise (3) to allow the coefcient to vary with time t. We solve x ( t ) ( t ) x ( t ) = f ( t ) , with (t) R and f (t) R. Z (6)

Equation (6) admits the following class of functions as solution:


t 0

x(t) = exp

Z Z t (s)ds A + f (z ) exp
0

z 0

(s)ds dz

(7)

for any constant A R. Furthermore, the constant A can be determined by an additional boundary condition because Z A = x(0) = x(t0 ) exp for any date t0 R.
t0 0

(s)ds

t0 0

Z f (z ) exp

z 0

(s)ds dz

Some algebra shows that functions of the type (7) satisfy equation (6). We now show that if a function x(t) solves equation (6), it is necessarily of the type (7). As above, we introduce an integrating factor. The integrating factor for this problem is Z
t

(t) = exp

(s)ds .

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics This integrating factor (t) has the desirable property that ( t ) = ( t ) ( t ) . We multiply both sides of equation (6) by the integrating factor to obtain x ( t ) ( t ) ( t ) ( t ) x ( t ) = f ( t ) ( t )

EC400

x ( t ) ( t ) + x ( t ) ( t ) = f ( t ) ( t ) d [x(t) (t)] = f ( t ) ( t ) . dt

Integrating the equation from t0 R to t we obtain as earlier equation (5). Therefore the solution to equation (6) is necessarily of the type (7).

1.4

Initial Value Problem

Often, an initial condition for x(t) is given: x ( t 0 ) = x0 . (8)

Equation (6) together with equation (8) form an initial value problem. The constant A in (7) must satisfy Z A = x0 exp
t0 0

(s)ds

t0 0

Z f (z ) exp

z 0

(s)ds dz.

Hence the solution to the initial value problem is x(t) = x0 exp Z


t t0

(s)ds +

t t0

f (z ) exp

t z

(s)ds dz.

(9)

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

Linear Systems of Differential Equations

We often encounter dynamic systems with several variables that move together over time. For example in the consumption-saving problem that we solved with optimal control methods, in the case of CRRA utility, the solution is characterised by two FODEs: a (t) = r a(t) c(t), r c ( t) = c( t ) . The rst FODE is the asset accumulation equation and the second FODE is the Euler equation that characterises optimal consumption over time. To solve explicitly for the optimal consumption path, we need to solve the two FODEs simultaneously. This section presents a method to solve systems of FODEs. We consider a system of n FODEs with constant coefcients: x 1 (t) = A11 x1 (t) + A12 x2 (t) + . . . + A1n xn (t) + f1 (t) x 2 (t) = A21 x1 (t) + A22 x2 (t) + . . . + A2n xn (t) + f2 (t) . . . x n (t) = An1 x1 (t) + An2 x2 (t) + . . . + Ann xn (t) + fn (t). Our goal is to solve for the n functions x1 (t), x2 (t), . . . , xn (t). An alternative way of expressing the system is to write it in matrix form: x (t) = Ax(t) + f (t), (10)

where x (t) Rn , x(t) Rn , and f (t) Rn are column vectors with n elements. A Rnn is a constant n n matrix. The system of FODEs is linear because it can be written in matrix form: it involves a linear relationship between the vector x (t) and the vector x(t). If A is diagonal (Aij = 0 for all i 6= j ), the system would reduce to a collection 7

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

of n FODEsone FODE for each xi (t)that can be solved independently using the techniques from Section 1. If A is not diagonal, the different entries in x(t) interact and we must solve the system of FODEs simultaneously.

2.1

General Solution

Assume that A is diagonalizable. There exists V Rnn such that A = VV1 , (11)

where Rnn is a diagonal matrix. The diagonal entries of are the n eigenvalues 1 , . . . , n of A, and V is the matrix whose columns are the eigenvectors z1 , . . . , zn of A. By denition, 1 , . . . , n are the n roots of the polynomial equation det (A I) = 0. For any i = 1, . . . , n, the eigenvector zi associated with the eigenvalue i satises (A i I) zi = 0. Using the decomposition (11), we rewrite the system (10) as V 1 x (t) = V1 x(t) + V1 f (t) y (t) = y(t) + g(t), where we dene y ( t ) V 1 x ( t ) (12)

g ( t ) V 1 f ( t ) .

Since the matrix is diagonal, the system is reduced to a collection of n independent FODEsone for each yi (t). Once we have solved for y(t), we can recover 8

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics x(t) by x(t) = Vy(t).

EC400

The nature of the eigenvalues and corresponding eigenvectors determines the dynamics of the solution.

2.2

Homogenous Systems

If f (t) = 0, the system (10) is homogenous; otherwise it is nonhomogenous. For homogenous systems, x (t) = Ax(t). So the transformed system (12) becomes y (t) = y(t), which leads to n independent FODEs: y i ( t ) i y i ( t ) = 0 for i = 1, . . . , n. In other words, each yi (t) is growing at constant rate i . The analysis of Section 1 shows that the solution to the ith FODE is yi (t) = Ai ei t where Ai R is a constant. Finally, x1 (t), . . . , xn (t) are given by x(t) = Vy(t). The columns of V are the eigenvectors z1 , . . . , zn corresponding to the eigenvalues 1 , ...n . Hence the solution of the homogenous system (13) is x(t) = A1 z1 e1 t + . . . + An zn en t . (14) (13)

The nature of the eigenvalues and the corresponding eigenvectors determines the 9

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics dynamics of the solution.

EC400

2.3

Example: Two-Variable Homogenous System

Consider a two-variable homogenous system x 1 ( t ) = a x1 ( t ) + b x2 ( t )

x 2 ( t ) = c x1 ( t ) + d x2 ( t ) . We can write it in matrix form x (t) = Ax(t) where the matrix A is A= Assume det (A) = a d b c 6= 0. 2.3.1 Closed-Form Solution " #

a b c d

Equation (14) implies that to determine a closed-form solution of this homogenous system, we need to nd the eigenvalues and eigenvectors of the matrix A. The eigenvalues are solutions to det (A I) = 0

(a + d) + (a d b c) = 0. Note that the product of the two eigenvalues is equal to the determinant of A: 1 2 = a d b c = det (A) . (15)

( a ) ( d ) b c = 0

10

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics "

EC400

# " # 1 2 Let be the eigenvector correspond to 1 and be the eigenvector 1 2 correspond to 2 . These vectors are solutions to ( A i I ) which yields the system (a i ) i + b i = 0 " i i # =0

c i + (d i ) i = 0.

Consider the cases where the eigenvalues are real and distinct, the general solution (14) implies x1 (t) = A1 1 e1 t + A2 2 e2 t x2 (t) = A1 1 e1 t + A2 2 e2 t where A1 and A2 are arbitrary constants. Note that in the case in which 1 = 2 = , the system [x1 (t), x2 (t)] above is still the general solution of the system of FODEs as long as the two eigenvectors [1 , 1 ] and [2 , 2 ] are linearly independent. Also note that any nonhomogenous system with constant terms [1 , 2 ]: x 1 ( t ) = a x1 ( t ) + b x2 ( t ) + 1

x 2 ( t ) = c x1 ( t ) + d x2 ( t ) + 2 , can be transformed it into an homogenous system.

2.3.2

Stability

Now that we have found a closed-form solution to the system, we can analyse its stability. There are three cases. 11

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

1. 1 < 0 and 2 < 0: As shown by (15), since 1 and 2 have the same sign, det (A) > 0. As t +, x1 (t) 0 and x2 (t) 0. The system is stable. The origin is called a sink. 2. 1 > 0 and 2 > 0: As shown by (15), since 1 and 2 have the same sign, det (A) > 0. As t +, |x1 (t)| + and |x2 (t)| +. The system is unstable. The origin is called a source. 3. 1 and 2 have opposite sign: As shown by (15), since 1 and 2 have opposite sign, det (A) < 0. One part of the solution is stable (it converges to 0 at t +), the other is unstable (it converges to at t +). The origin (0, 0) is called a saddle point.

Phase Diagrams

Without solving for eigenvalues and eigenvectors explicitly, we can study the properties of a linear system of FODEs by drawing its phase diagram.

3.1

Construction of the Phase Diagram

Consider the following linear nonhomogenous system of two FODEs: x 1 ( t ) = a x1 ( t ) + b x2 ( t ) + 1 (16) (17)

x 2 ( t ) = c x1 ( t ) + d x2 ( t ) + 2 ,

with a < 0, b < 0, c < 0, d > 0, 1 > 0, and 2 > 0. Since a d b c < 0, the eigenvalues of the system are of opposite sign. We are in a saddle-point equilibrium. We construct the phase diagram as follows: 1. Compute the two loci x 1 = 0 and x 2 = 0. The locus for x 1 = 0 is given by a 1 x2 = x1 . b b 12

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

The locus is a straight line with a negative slope in the (x1 , x2 ) plan. The locus for x 2 = 0 is given by c 2 x2 = x1 . d d The locus is a straight line with positive slope in the (x1 , x2 ) plan. 2. The intersection of the two loci is the steady-state solution. Denote the intersection of the two loci as (x 1 , x2 ). These two loci divide the (x1 , x2 ) plane into four areas. 3. From (16), x 1 is decreasing in x2 because b < 0. Thus any point above the x 1 = 0 line must have x 1 < 0 and any point below the x 1 = 0 line must have x 1 > 0. We represent these properties by an horizontal arrow pointing west for any point above the x 1 = 0 line and an horizontal arrow pointing east for any point below the x 1 = 0 line. Similarly, from (17), x 2 is increasing in x2 because d > 0. Thus any point above the x 2 = 0 line must have x 2 > 0 and any point below the x 2 = 0 line must have x 2 < 0. We represent these properties by a vertical arrow pointing north for any point above the x 2 = 0 line and a vertical arrow pointing south for any point below the x 2 = 0 line. These sets of arrows are called streamlines. They determine the trajectories of the system at any point in all the four areas. 4. Last, we derive the saddle path for the system. We know that such a saddle path exist because the eigenvalues of the system have opposite sign. Drawing the phase diagram of a two-variable system is useful to understand the main features of the dynamic system without solving for x1 (t) and x2 (t) explicitly. The phase diagram is represented at the end of the lecture notes.

3.2

Diagram with a State and a Control Variable

Suppose x1 is a state variable: information revealed at t does not inuence its value at t. Suppose x2 is a control variable: information revealed at t may inu ence its value at t. Suppose that we are in the steady state (x 1 , x2 ) of the previous phase-diagram. 13

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

Assume that there is an exogenous, unanticipated increase in 2 . This increase is revelation of news because it is an unanticipated change to one of the parameters or variables of the system. As 2 increases, the x 2 = 0 locus shifts down, so the new steady state (x1 , x2 ) is to the south-east of the previous steady state: x 1 > x1 and x2 < x2 . There is also a new saddle path passing through this new steady state. Where do we start after the news is revealed at t = tr ? That is, what are x1 (tr ) and x2 (tr )? Since x1 is the state variable, it cannot respond to the news, and x1 ( t r ) = x 1 . For the system to converge to the new steady state, it must arrive at the steady-state level x 1 of the state variable along the new saddle path. So x2 (tr ) must be on the new saddle path at x 1 , and over time both x1 (t) and x2 (t) move along the saddle path until they converge to the new steady state. To sum up, the system jumps from (x 1 , x2 ) to (x1 , x2 (tr )), and then moves along the saddle path until it reaches (x1 , x2 ). The response to the news in the phase diagram is represented at the end of the lecture notes.

Nonlinear Systems of Differential Equations

Unlike the systems of FODEs studied in Sections 2 and 3, which are linear, systems of FODEs in macroeconomics are often nonlinear. For example the typical growth model is characterised by the following nonlinear system of FODEs: (t) = f (k (t)) c(t) k (t), k (18) (19)

c (t) = [f 0 (k (t)) ( + )] c(t),

where > 0,and (0, 1) are parameters, the capital stock k (t) is a state variable with k0 given, and the production function f satises the Inada conditions: f (0) = 0, f 0 > 0, f 00 < 0, lim f 0 (k ) = 0, lim f 0 (k ) = +.
k + k 0

It is difcult to solve this system explicitly. But without solving it explicitly, we can characterise its properties by constructing its phase diagram. This is what we do in this section. 14

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

4.1

Construction of the Phase Diagram

We draw the phase diagram in a plane with the state variable k on the x-axis and the control variable c on the y-axis. We proceed as follows: = 0 curve dened by 1. We draw the k c = f (k ) k and the c = 0 curve dened by f 0 (k ) = + . = 0 curve is concave and the c The k = 0 curve is a vertical line in the (k, c) plane. 2. The intersection of these two loci is the steady state (k , c ) of the system. 3. To determine the directions of the streamlines, we partially differentiate equations (18) and (19): k = 1 < 0 c c = c f 00 (k ) < 0. k decreases. So, the horizontal arrows point eastTherefore as c increases, k = 0 curve and westward above it. Similarly as k increases, ward below the k c decreases. So the vertical arrows point northward to the left of the c =0 curve and southward to the right of it. 4. The streamlines drawn yield a saddle-point equilibrium at the steady state (k , c ). The only way for the economy to converge to the steady state is on the saddle path leading to it. This means that given any initial capital k0 , initial consumption c0 is such that the pair (k0 , c0 ) lies on the saddle path. The phase diagram is represented at the end of the lecture notes.

15

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics

EC400

4.2

Linearization

The streamlines suggest that we are in a saddle-point equilibrium. We can check the validity of the conclusion by linearizing the nonlinear system (18)(19) using a rst-order Taylor expansion around the steady state: =k + ( k k ) k + ( c c ) k k k c c c c =c + (k k ) + ( c c ) . k c = c Given that k = 0, we have " k c # = J " k k c c # ,

where J is the Jacobian matrix evaluated at the steady state:

J =

"

k k (k ,c ) c k (k ,c )

k c (k ,c ) c c (k ,c )

This system is a two-variable nonhomogenous system of FODEs for " k c #

x=

But it is a two-variable homogenous system for the transformed variable y, where y = x x = " k k c c #

The constant matrix A of Section 2 is J . The analysis of Section 2 shows that the properties of the steady state depend on the eigenvalues of J . The four partial

16

Pascal Michaillat [p.michaillat@lse.ac.uk] Mathematical Methods for Macroeconomics derivatives are k k k c c k c c = f 0 (k ) = > 0 = 1 < 0 = c f 00 (k ) < 0 = f 0 ( k ) ( + ) = 0

EC400

(k ,c )

(k ,c )

(k ,c )

(k ,c )

It follows that the Jacobian matrix can be written J = " 1 00 c f (k ) 0 #

As shown by (15), the product of the two eigenvalues is the determinant of J : det (J ) = c f 00 (k ) < 0. Therefore, the two eigenvalues have opposite sign. This property establishes that the steady state is a saddle point locally.

17

Phase Diagram (Section 3.6) x2 dx2/dt=0 x2

Phase Diagram (Section 3.6)

dx2/dt=0

dx1/dt=0

dx1/dt=0

x1

x1

Phase Diagram (Section 3.6) x2 dx2/dt=0 x2

Phase Diagram (Section 3.6)

dx2/dt=0

Saddlepath dx1/dt=0 dx1/dt=0

x1

x1

Section 3.6 changes in parameters original dx2/dt=0 new dx2/dt=0 A new Saddlepath

x2

dx1/dt=0

x1 (predetermined)

Phase Diagram (section 3.7)

Phase Diagram (section 3.7)

c dc/dt=0

c dc/dt=0

dk/dt=0

dk/dt=0

k k* k*

Phase Diagram (section 3.7)

Phase Diagram (section 3.7)

c dc/dt=0

c dc/dt=0

dk/dt=0

dk/dt=0

k k* k*

You might also like