Professional Documents
Culture Documents
Mathematical
Economics
Part 2
Loglinear
Publishing
Michael Sampson
Copyright © 2001 Michael Sampson.
Loglinear Publications: http://www.loglinear.com Email: mail@loglinear.com.
Terms of Use
This document is distributed "AS IS" and with no warranties of any kind, whether express or
implied.
Until November 1, 2001 you are hereby given permission to print one (1) and only one hardcopy
version free of charge from the electronic version of this document (i.e., the pdf file) provided
that:
Until November 1, 2001 you are hereby given permission to make (and if you wish sell) an
unlimited number of copies on paper only from the electronic version (i.e., the pdf file) of this
document or from a printed copy of the electronic version of this document provided that:
1. You agree to pay a royalty of either $3.00 Canadian or $2.00 US per copy to the
author within 60 days of making the copies or to destroy any copies after 60 days for
which you have not paid the royalty of $3.00 Canadian or $2.00 US per copy.
Payment can be made either by cheque or money order and should be sent to the
author at:
2. If you intend to make five or more copies, or if you can reasonably expect that five
or more copies of the text will be made then you agree to notify the author before
making any copies by Email at: sampson@loglinear.com or by fax at 514-848-
4536.
3. You agree to include on each paper copy of this document and at the same page
number as this page on the electronic version of the document: 1) the above
Copyright Notice, 2) the URL: http://www.loglinear.com and the Email address
sampson@loglinear.com. You may then if you wish remove this Terms of Use
from the paper copies you make.
Contents
0.1 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
1 Total Di¤erentials 1
1.1 Endogenous and Exogenous Variables . . . . . . . . . . . . . . . 1
1.2 Structural and Reduced Forms of a Model . . . . . . . . . . . . . 2
1.2.1 The Structural Form of a Model . . . . . . . . . . . . . . 2
1.2.2 The Reduced Form of a Model . . . . . . . . . . . . . . . 2
1.2.3 Implicit and Explicit Functions . . . . . . . . . . . . . . . 3
1.2.4 Calculating Derivatives . . . . . . . . . . . . . . . . . . . 4
1.3 Total Di¤erentials for Beginners . . . . . . . . . . . . . . . . . . . 5
dy
1.3.1 A Recipe for Calculating dx . . . . . . . . . . . . . . . . . 6
1.4 Total Di¤erentials for Intermediates . . . . . . . . . . . . . . . . 9
@y
1.4.1 A Recipe for Calculating @x j
. . . . . . . . . . . . . . . . 10
1.4.2 Example 1: A Simple Linear Function . . . . . . . . . . . 11
1.4.3 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.4 Example 3: The Bivariate Normal Density . . . . . . . . . 13
1.4.5 Example 4: Labour Demand . . . . . . . . . . . . . . . . 14
1.5 Total Di¤erentials for Experts . . . . . . . . . . . . . . . . . . . . 16
1.5.1 Systems of Implicit Functions . . . . . . . . . . . . . . . . 16
@yi
1.5.2 A Recipe for Calculating @x j
. . . . . . . . . . . . . . . . 17
1.5.3 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.5.4 Example 2: Supply and Demand I . . . . . . . . . . . . . 22
1.5.5 Example 3: Supply and Demand II . . . . . . . . . . . . . 24
1.5.6 Example 4: The IS=LM Model . . . . . . . . . . . . . . . 25
1.6 Total Di¤erentials and Optimization . . . . . . . . . . . . . . . . 29
1.6.1 A General Discussion . . . . . . . . . . . . . . . . . . . . 29
1.6.2 A Quick Derivation of the Main Principle . . . . . . . . . 30
1.6.3 Pro…t Maximization . . . . . . . . . . . . . . . . . . . . . 31
1.6.4 Constrained Optimization . . . . . . . . . . . . . . . . . . 33
1.6.5 Utility Maximization . . . . . . . . . . . . . . . . . . . . . 34
1.6.6 Cost Minimization . . . . . . . . . . . . . . . . . . . . . . 35
i
CONTENTS ii
Rb 2
3.3.9 Example 1: a (cf (x) + dg (x)) dx . . . . . . . . . . . . . 90
Rb 2
3.3.10 Example 2: a (f (x) + d) dx . . . . . . . . . . . . . . . . 91
3.4 Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.4.2 Discrete Random Variables . . . . . . . . . . . . . . . . . 91
3.4.3 The Bernoulli Distribution . . . . . . . . . . . . . . . . . 93
3.4.4 The Binomial Distribution . . . . . . . . . . . . . . . . . . 93
3.4.5 The Poisson Distribution . . . . . . . . . . . . . . . . . . 94
4 Dynamics 138
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
4.2 Trigonometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
4.2.1 Degrees and Radians . . . . . . . . . . . . . . . . . . . . . 138
4.2.2 The Functions cos (x) and sin (x) . . . . . . . . . . . . . . 139
0.1 Preface
Thanks go to my Economics 326 students from the Winter 1999 and Winter
2000 semesters for working so hard on the …rst and second versions of these
lecture notes. I would in particular like to thank Tamarha Louis-Charles, Dana
Al-Aghbar, Christopher Martin and Samnang Om for pointing out many typos
and errors.
Chapter 1
Total Di¤erentials
1
CHAPTER 1. TOTAL DIFFERENTIALS 2
M (y; x) = N (y; x) :
This form of the model is often referred to as the structural form of the model
since it is in this form that the basic assumptions (or structure) of the model
are most apparent.
y = h (x)
An Example
Suppose y is the number of workers that a …rm hires, x1 is the price of the good
that the …rm sells, and x2 is the nominal wage. From a model we …nd that the
marginal revenue of hiring an extra worker is:
1
M (y; x1 ; x2 ) = x1 y ¡ 2
To get the reduced form we need to get y alone on the left-hand side. In this
case this is not hard to do. By a little algebra we …nd that:
x1
y = h (x1 ; x2 ) = :
x2
Suppose x1 = x2 = 1: We then know that y = 1: Consider three experiments:
1) doubling x1 while keeping x2 …xed, 2) doubling x2 while keeping x1 …xed,
and 3) doubling both x1 and x2 : We see from the reduced form that the …rst
experiment results in doubling y to 2; the second experiment results in halving
y to 12 ; while in the third experiment nothing happens to y:
g (y; x) = 0:
so that both the y 0 s and x0 s appear jumbled together on the left-hand side and
zero is on the right-hand side.
y = h (x) :
Thus an explicit function and the reduced form are essentially the same
thing.
Given an explicit function or reduced form it is always possible to write it
as an implicit function as:
g (y; x) = y ¡ h (x) = 0:
there is no way of getting y alone on the left-hand side. The best we could do
is:
y ln (y) = ln (x)
or
y y = x:
1.8
1.6
y
1.4
1.2
1
1 2 3 4 5
x
which tells us the relationship between the j th exogenous variable and the ith
endogenous variable when all other exogenous variables are held constant. This
corresponds to the experiment of keeping all other exogenous variables except
xj constant, changing xj by a small amount and seeing how much yj changes.
@yi
De…nition 3 If @x j
> 0 then a positive relationship exists between xi and yj ;
that is, an increase (decrease) in xj will result in an increase (decrease) in yi :
@yi
De…nition 4 If @x j
< 0 then a negative relationship exists between xi and yj ;
that is, an increase (decrease) in xj will result in an decrease (increase ) in yi :
CHAPTER 1. TOTAL DIFFERENTIALS 5
dy
1.3.1 A Recipe for Calculating dx
Step 1. If it is not already clear to you, identify the endogenous variable y and
the exogenous variable x in your model.
Step 2. If the structural model is not written as an implicit function of the
form g (y; x) = 0; rewrite it so that it is in this form.
Step 3. Take the partial derivative of g (y; x) with respect to y and call this
a: Thus: a = @g(y;x)
@y : Verify that a 6= 0 which insures that the explicit function
exists by the Implicit Function Theorem. Multiply a by dy to get:
a £ dy:
Step 4. Take the partial derivative of g (y; x) with respect to x and call this
b: Thus: b = @g(y;x)
@x : Multiply b by dx to get:
b £ dx:
Step 5. Add the results of steps 3 and 4 together and set them equal to
zero to get the total di¤erential:
a £ dy + b £ dx = 0:
dy
Step 6. Solve for the ratio dx to get:
dy b
=¡
dx a
or alternatively using the de…nition of a and b :
@g(y;x)
dy @x
= ¡ @g(y;x) :
dx
@y
3Q ¡ 4R = 9:
g (Q; R) = 3Q ¡ 4R ¡ 9 = 0:
3dQ ¡ 4dR = 0
since:
@g (Q; R) @g (Q; R)
a= = 3; b = = ¡4:
@Q @R
Note that a = 3 6= 0 and so the explicit function exists by the Implicit Function
Theorem.
Solving for dQ
dR from the total di¤erential it then follows that:
dQ 4
= :
dR 3
This is the same answer we would get from working with the explicit form
of the function or the reduced form. We obtain this by solving g (Q; R) =
3Q ¡ 4R ¡ 9 = 0 for Q to obtain:
4
Q= R+3
3
dQ
from which it easily follows that: dR = 43 :
Example 2
Consider the implicit function:
1 1
g (y; x) = ln (y) + x2 + ln (2¼) = 0:
2 2
This can be written explicitly or as a reduced form as:
1 1 2
y = h (x) = p e¡ 2 x
2¼
which is the standard normal density. From h (x) we can directly calculate h0 (x)
as:
dy 1 1 2
= ¡x p e¡ 2 x = ¡xy:
dx 2¼
| {z }
=y
CHAPTER 1. TOTAL DIFFERENTIALS 8
Let us obtain now attempt to obtain the derivative via the total di¤erential.
Using Steps 3, 4, and 5 we obtain a = @g(y;x)
@y = y1 and b = @g(y;x)
@x = x so that
the total di¤erential is:
1
dy + xdx = 0:
y
dy
Solving for dx we then get:
dy
= ¡xy:
dx
Example 3
Suppose we were given a structural equation of the form:
y y = x:
Here from the notation y is the endogenous variable and x is the exogenous
variable. From Step 2; by taking the ln ( ) of both sides we can write this as an
implicit function:
g (y; x) = y ln (y) ¡ ln (x) = 0
which we have already seen cannot be written as an explicit function y = h (x) :1
From Steps 3; 4 and 5 the total di¤erential of g (y; x) is:
1
(1 + ln (y)) dy ¡ dx = 0:
x
since:
@g (y; x) @g (y; x) 1
a= = 1 + ln (y) ; b = =¡ :
@y @x x
dy
Solving for dx :
dy 1
= :
dx x (1 + ln (y))
dy
We can use this result to show that 0 < dx < 1 for x > 1 and hence a
positive relationship exists between x and y: This follows since:
x > 1 =) ln (y) y = ln (x) > 0
implies that y > 1 since if y < 1 then ln (y) < 0: Therefore from x > 1 and
(1 + ln (y)) > 1 we have
dy 1
x > 1 =) 0 < = < 1:
dx x (1 + ln (y))
1 Note that we could have just as correctly used g (y; x) = y y ¡ x = 0; that is there are
As an exercise di¤erentiate this one more time with respect to x and show that:
µ ¶
d2 y 1 1 1 dy
= ¡ + <0
dx2 x (1 + ln (y)) x y (1 + ln (y)) dx
so that the function is concave as the plot above illustrates.
y = h (x1 ; x2 ; : : : xm )
@g (y; x1 ; x2 ; : : : xm )
6= 0:
@y
We wish to calculate: @x @y
j
= @h(x1 ;x2 ;:::xm )
@xj in order to determine how a
change in the j th exogenous variable xj will a¤ect the endogenous variable y. To
do this from the implicit function g (y; x) = 0 we calculate the total di¤erential
de…ned by:
@y
1.4.1 A Recipe for Calculating @xj
We proceed as follows:
Step 1. If it is not already clear to you, identify the endogenous variable y
and the exogenous variables x1 ; x2 ; : : : xm in your model.
Step 2. Write the structural form of the model as an implicit function of
the form:
g (y; x1 ; x2 ; : : : xm ) = 0:
This generally means just collecting all terms on the left-hand side of the struc-
tural model and setting them equal to zero.
Step 3. Take the partial derivative of g (y; x) with respect to y and call
this a: Make sure that a 6= 0 so that the explicit function exists by the Implicit
Function Theorem. Multiply a by dy to get:
a £ dy:
Step 4. Take the partial derivative of g (y; x) with respect to x1 and call
this b1 : Multiply b1 by dx1 to get b1 dx1 : Repeat this for x2 ; x3 ; : : : xm and add
them together to get:
b1 dx1 + b2 x2 + ¢ ¢ ¢ + bm dxm :
CHAPTER 1. TOTAL DIFFERENTIALS 11
Step 5. Add the results of steps 3 and 4 together and set them equal to
zero to get the total di¤erential:
a £ dy + b1 dx1 + b2 x2 + ¢ ¢ ¢ + bm dxm = 0:
@y
Step 6. To get the partial derivative @x j
set all dx0 s equal to zero except
dxj ; and then replacing the remaining d0 s in the total di¤erential with @ 0 s:
Thus we set dy = @y; dxj = @xj and dxi = 0 for i 6= j in the total di¤erential
to get:
a@y + bj @xj = 0:
@y
Now solve for the ratio @xj :
@g(y;x)
@y bj @xj
= ¡ = ¡ @g(y;x) :
@xj a
@y
3Q ¡ 4R ¡ 7S = 9
g (Q; R; S) = 3Q ¡ 4R ¡ 7S ¡ 9 = 0:
3dQ ¡ 4dR ¡ 7S = 0
since
@g (Q; R; S) @g (Q; R; S)
a = = 3; b1 = = ¡4;
@Q @R
@g (Q; R; S)
b2 = = ¡7:
@S
Suppose we wish to calculate @Q@S : Following step 6 …rst set dR = 0 and then
replace the remaining d0 s with @ 0 s so that: dQ = @Q and dS = @S: We then
obtain:
3@Q ¡ 7@S = 0:
CHAPTER 1. TOTAL DIFFERENTIALS 12
@Q
Solving for the ratio @S then yields:
@Q 7
= :
@S 3
1.4.3 Example 2
Consider the implicit function:
1 1
g (y; x1 ; x2 ) = x1 y¡ 2 ¡ x2 y 2 = 0:
@y
Solving for the ratio @x1 yields:
1
@y 2y ¡ 2
=³ ´:
@x1 3 1
x1 y¡ 2 + x2 y¡ 2
As an exercise use the reduced form y = xx12 to prove that the above expression
@y
for @x 1
is equal to x12 :
@y
To calculate @x 2
set dx1 = 0 and replace the remaining d0 s with @ 0 s to
obtain:
1³ 3 1
´ 1
¡ x1 y ¡ 2 + x2 y ¡ 2 @y ¡ y 2 @x2 = 0:
2
@y
Solving for @x2 yields:
1
@y ¡2y 2
=³ ´ < 0:
@x2 3 1
x1 y 2 + x2 y¡ 2
¡
x1
As an exercise use the reduced form y = x2 to prove that the above expression
@y
for @x2
is equal to ¡ (xx21)2 :
0.16
0.14
0.12
0.1
0.08
0.06
0.04
0.02
0
-3 -3
-2 -2
-1 -1
w0 0x
1 1
2 2
3 3
1 ¡ 12 (x21 +x22 )
y = h (x1 ; x2 ) = 2¼ e
CHAPTER 1. TOTAL DIFFERENTIALS 14
@x2 2¼
If instead we calculate the total di¤erential we …nd that:
1
dy + x1 dx1 + x2 dx2 = 0
y
since
@g (y; x1 ; x2 ) 1
a = = ;
@y y
@g (y; x1 ; x2 ) @g (y; x1 ; x2 )
b1 = = x1 ; b2 = = x2 :
@x1 @x2
@y
To calculate @x1 set dy = @y; dx1 = @x1 and dx2 = 0 in the total di¤erential
to obtain:
1
@y + x1 @x1 = 0
y
@y
so that solving for the ratio @x1 we …nd:
@y
= ¡x1 y:
@x1
@y
To calculate @x2 set dy = @y; dx2 = @x2 and dx1 = 0 in the total di¤erential
to obtain:
1
@y + x2 @x2 = 0
y
@y
so that solving for the ratio @x2 we …nd:
@y
= ¡x2 y:
@x2
¼ (L) = P f (L) ¡ W L:
CHAPTER 1. TOTAL DIFFERENTIALS 15
gi (y; x) = 0; for i = 1; 2; : : : n:
yi = hi (x) ; for i = 1; 2; : : : n
det [A] 6= 0
where:
2 @g1 (y;x) @g1 (y;x) @g1 (y;x) 3
@y1 @y2 ¢¢¢ @yn
6 @g2 (y;x) @g2 (y;x) @g2 (y;x) 7
6 @y1 @y2 ¢¢¢ @yn 7
A=6
6 .. .. .. ..
7:
7
4 . . . . 5
@gn (y;x) @gn (y;x) @gn (y;x)
@y1 @y2 ¢¢¢ @yn
For example suppose that we have a structural model where apple production
Q1 and honey production Q2 are related to the amount of rainfall R; sunshine
S and temperature T as:
3Q1 + 2Q2 + 3S + 5T = 2R ¡ 7
Q1 ¡ 2Q2 + 6R ¡ 3T = ¡2S + 4:
Here Q1 and Q2 are the endogenous variables and R; S; and T are the exogenous
variables. Note that we have two equations and two endogenous variables.
This can then be written as two implicit functions as:
Here:
" @g1 @g1
# · ¸
@Q1 @Q2 3 2
A= @g2 (y;x) @g2 (y;x) =
@Q1 @Q2
1 ¡2
CHAPTER 1. TOTAL DIFFERENTIALS 17
and
·· ¸¸
3 2
det = ¡8 6= 0
1 ¡2
Q1 = h1 (R; S; T )
Q2 = h2 (R; S; T )
Ady + Bdx = 0
where:
2 3 2 3
dy1 dx1
6 dy2 7 6 dx2 7
6 7 6 7
dy = 6 .. 7 ; dx = 6 .. 7
4 . 5 4 . 5
dyn dxm
@yi
The recipe for calculating the total di¤erential and from this @xj
is as follows:
@yi
1.5.2 A Recipe for Calculating @xj
g1 (y1 ; y2 ; : : : yn ; x1 ; x2 ; : : : xm ) = 0;
g2 (y1 ; y2 ; : : : yn ; x1 ; x2 ; : : : xm ) = 0;
..
.
gn (y1 ; y2 ; : : : yn ; x1 ; x2 ; : : : xm ) = 0;
Step 5. Add the results of steps 3 and 4 together and set them equal to
zero. This gives you the total di¤erential for the …rst implicit function.
a11 dy1 + a12 dy2 + ¢ ¢ ¢ + a1n dyn + b11 dx1 + b12 dx2 + ¢ ¢ ¢ + b1m dxm = 0
a21 dy1 + a22 dy2 + ¢ ¢ ¢ + a2n dyn + b21 dx1 + b22 dx2 + ¢ ¢ ¢ + b2m dxm = 0
a11 dy1 + a12 dy2 + ¢ ¢ ¢ + a1n dyn + b11 dx1 + b12 dx2 + ¢ ¢ ¢ + b1m dxm = 0
a21 dy1 + a22 dy2 + ¢ ¢ ¢ + a2n dyn + b21 dx1 + b22 dx2 + ¢ ¢ ¢ + b2m dxm = 0
..
.
an1 dy1 + an2 dy2 + ¢ ¢ ¢ + ann dyn + bn1 dx1 + bn2 dx2 + ¢ ¢ ¢ + bnm dxm = 0
Now put the terms involving @xj on the right-hand side to get:
or:
2 32 3 2 3
a11 a12 ¢¢¢ a1n @y1 b1j
6 a21 a22 ¢¢¢ a2n 76 @y2 7 6 b2j 7
6 76 7 6 7
6 .. .. .. .. 76 .. 7 = ¡6 .. 7 @xj :
4 . . . . 54 . 5 4 . 5
an1 an2 ¢¢¢ ann @yn bnj
Divide both sides by the scalar @xj and re-write this in matrix notation:
@y
A = ¡bj
@xj
@y
where @xj and bj are n £ 1 column vectors given respectively by:
2 @y1 3 2 3
@xj b1j
6 @y2 7 6 b2j 7
@y 6 7
=6
@xj
7 and bj = 6
6 ..
7
7:
@xj 6 .. 7 4 . 5
4 . 5
@yn bnj
@xj
where Ai (¡bj ) is the matrix you obtain by replacing the ith column of A with
the vector ¡bj :
CHAPTER 1. TOTAL DIFFERENTIALS 20
1.5.3 Example 1
Given the apple/honey production example above, we have two linear implicit
equations:
Similarly since:
@g2 @g2
a21 = = 1; a22 = = ¡2;
@Q1 @Q2
@g2 @g2 @g2
b21 = = 6; b22 = = 2; b23 = = ¡3
@R @S @T
the total di¤erential for g2 (Q1 ; Q2 ; R; S; T ) is:
To calculate @Q
@S from the total di¤erential set dR = dT = 0 and replace
2
the remaining d s with @ 0 s so that dS = @S; dQ1 = @Q1 and dQ2 = @Q2 to
0
obtain:
or in matrix notation:
· ¸· ¸ · ¸
3 2 @Q1 ¡3
= @S:
1 ¡2 @Q2 ¡2
CHAPTER 1. TOTAL DIFFERENTIALS 21
and replace the remaining d s with @ 0 s so that dR = @R; dQ1 = @Q1 and
0
or in matrix notation:
· ¸· ¸ · ¸
3 2 @Q1 2
= @R:
1 ¡2 @Q2 ¡6
so that:
2 3
· ¸ · ¸¡1 · ¸ R
Q1 3 2 ¡2 3 5 4 S 5
= ¡
Q2 1 ¡2 6 2 ¡3
T
· ¸¡1 · ¸
3 2 7
¡
1 ¡2 ¡4
2 3
· ¸ R · ¸
¡1 ¡ 54 ¡ 12 4 S 5 + ¡19
3
4
= 5 3 :
2 8 ¡ 74 ¡8
T
Here there are no exogenous variables, the …rst equation says that the demand
curve slopes downward, the second that the supply curve slopes upward and the
third that in equilibrium supply equals demand.
We can re-write this as two implicit functions with two endogenous variables
Q and P as:
g1 (Q; P ) = Q ¡ D (P ) = 0
g2 (Q; P ) = Q ¡ S (P ) = 0:
Qd = D (P + TH ) ;
Qs = S (P ¡ TF ) ;
Qs = Qd = Q:
CHAPTER 1. TOTAL DIFFERENTIALS 23
or as implicit functions:
g1 (Q; P; TH ; TF ) = Q ¡ D (P + TH ) = 0
g2 (Q; P; TH ; TF ) = Q ¡ S (P ¡ TF ) = 0:
Q = h1 (TH ; TF )
P = h2 (TH ; TF ) :
DP ´ D0 (P + TH )
SP ´ S 0 (P ¡ TF ) :
dQ ¡ DP dP ¡ DP dTH = 0
dQ ¡ SP dP + SP dTF = 0
since:
and:
@g2 (Q;P;TH ;TF )
a21 = @Q = 1 a22 = @g2 (Q;P;T
@P
H ;TF )
= ¡SP
@g2 (Q;P;TH ;TF )
b21 = @TH = 0 b22 = @g2 (Q;P;T
@TF
H ;TF )
= SP :
@Q
To …nd @T H
set dTF = 0 and replace all the remaining d0 s in the total
di¤erential with @ 0 s to obtain:
@Q ¡ DP @P ¡ DP @TH = 0
@Q ¡ SP @P = 0
or
· ¸· ¸ · ¸
1 ¡DP @Q DP
= @TH :
1 ¡SP @P 0
g1 (Q; P; a; b) = Q ¡ D (P; a) = 0
g2 (Q; P; a; b) = Q ¡ S (P; b) = 0:
dQ ¡ DP dP ¡ Da da + 0db = 0
dQ ¡ SP dP + 0da ¡ Sb db = 0:
Suppose we want to see what happens if the demand curve shifts to the right
while the supply curve stays …xed. Set db = 0; da = @a; dQ = @Q and dP = @P
so that from the total di¤erential:
· ¸ · @Q ¸ · ¸
1 ¡DP @a
Da
@P =
1 ¡SP @a
0
CHAPTER 1. TOTAL DIFFERENTIALS 25
Thus anything which shifts the demand curve to the right increases Q and P:
Verify this using a diagram!
y = c (y) + i (r) + go
which is the structural form of the IS curve. We can write this as an implicit
function as:
where y and r are the endogenous variables and go and (the not yet introduced
exogenous money supply) mso are the exogenous variables.
The total di¤erential for the IS curve is then:
Since 0 < c0 (y) < 1 it follows that 0 < 1 ¡ c0 (y) < 1 so the …rst term in the
0 0
denominator is positive. The second term: i (r)k l0 (r)
(y)
represents the crowding out
e¤ect and is also positive since i (r) < 0 , l (r) < 0 and k0 (y) > 0: We therefore
0 0
@y
conclude that @g o
> 0 so that an increase in government expenditure increases
GN P:
@r
Using Cramer’s rule to solve for @g o
we …nd that:
· ¸
1 ¡ c0 (y) 1
det
@r k0 (y) 0
= · ¸
@go 1 ¡ c0 (y) ¡i0 (r)
det
k0 (y) l0 (r)
¡k0 (y)
= · ¸ >0
1 ¡ c0 (y) ¡i0 (r)
det
k0 (y) l0 (r)
so that an increase in government expenditure increases interest rates.
It follows from this that investment falls when government expenditure in-
creases. Using the chain rule we have:
@i (r (go ; mso )) @r (go ; mso )
= i0 (r (go ; mso )) <0
@go @go
since i0 (r) < 0:
(1 ¡ c0 (y)) @y ¡ i0 (r) @r = 0
k (y) @y + l0 (r) @r ¡ @mso
0
= 0:
CHAPTER 1. TOTAL DIFFERENTIALS 29
or
· ¸" @y
# · ¸
1 ¡ c0 (y) ¡i0 (r) @mso 0
= :
k0 (y) l0 (r) @r
@mso
1
f (y; x) :
Hdy + Bdx = 0
While this derivation has skipped some details and is perhaps hard to follow
in the details, the essential point is easy to grasp and is this:
When taking the total di¤erential from an unconstrained optimization prob-
lem, the matrix of coe¢cients on the dy0 s is identical to the Hessian: H from
the second-order conditions. This fact can then be used in signing the partial
@yi
derivatives like @x j
:
The second-order conditions are then that the Hessian H given by:
· ¸
P FLL P FLK
H=
P FLK P FKK
is negative de…nite. Therefore:
P FLL (L¤ ; K ¤ ) < 0; P FKK (L¤ ; K ¤ ) < 0
det [H] > 0:
CHAPTER 1. TOTAL DIFFERENTIALS 32
Note that the matrix of coe¢cients on the vector of dL¤ and dK ¤ ; the
endogenous variables, is H; the Hessian¤ from the¤ second-order conditions.
Suppose now we wish to calculate @L @K
@W and @W : Set dP = dR = 0 and change
the remaining d s to @ s so that dL = @L ; dK ¤ = @K ¤ ; and dW = @W; put
0 0 ¤ ¤
¤
Thus as one would expect: @K @R < 0 so that the long-run demand curve for
capital is downward sloping. ¤
@L¤
Comparing the expressions for @K
@W with @R we …nd that:
@L¤ @K ¤ P FLK
= =¡ :
@R @W det [H]
This (very surprising! ) symmetry result often occurs in these kind of problems.
where:
¸¤ = ¸¤ (Y; P1 ; P2 ) ;
X1¤ = X1¤ (Y; P1 ; P2 ) ;
X2¤ = X2¤ (Y; P1 ; P2 ) :
which satis…es:
2 3
0 ¡P1 ¡P2
det [H] = det 4 ¡P1 U100 (X1¤ ) 0 5
00 ¤
¡P2 0 U2 (X2 )
= ¡ (P1 )2 U200 (X2¤ ) ¡ (P2 )2 U100 (X1¤ ) > 0:
Writing this in matrix notation and dividing both sides by @P1 we obtain:
2 3 2 @¸¤ 3 2 ¤ 3
0 ¡P1 ¡P2 @P1¤ X1
6 1 7
4 ¡P1 U100 0 5 4 @X @P1¤ 5 = 4 ¸¤ 5
00 @X2
¡P2 0 U2 0
| {z } @P1
=H
so that:
2 3
0 X1¤ ¡P2
det 4 ¡P1 ¸¤ 0 5
¤
@X1 ¡P2 0 U200 P1 X1¤ U200 ¡ (P2 )2 ¸¤
= = <0
@P1 det [H] det [H]
since det [H] > 0 from the second order conditions, U200 < 0 and ¸¤ > 0:
For which of you, desiring to build a tower, doth not …rst sit
down and count the cost...Luke 14:28
CHAPTER 1. TOTAL DIFFERENTIALS 36
satis…es:
0d¸¤ ¡ FL dL¤ ¡ FK dK ¤ + dQ = 0
¡FL d¸¤ ¡ ¸¤ FLL dL¤ ¡ ¸¤ FLK dK ¤ + dW = 0
¡FK d¸¤ ¡ ¸¤ FLK dL¤ ¡ ¸¤ FKK dK ¤ + dR = 0:
¤
Suppose we wish to calculate: @L @W . Setting: dR = dQ = 0 and changing the
remaining d0 s to @ 0 s we …nd that:
0@¸¤ ¡ FL @L¤ ¡ FK @K ¤ = 0
¡FL @¸ ¡ ¸ FLL @L¤ ¡ ¸¤ FLK @K ¤ + @W
¤ ¤
= 0
¡FK @¸¤ ¡ ¸¤ FLK @L¤ ¡ ¸¤ FKK @K ¤ = 0:
so that:
2 3
0 0 ¡FK
det 4 ¡FL ¡1 ¡¸¤ FLK 5
@L¤ ¡FK 0 ¡¸¤ FKK (FK )2
= = <0
@W det [H] det [H]
2
since det [H] < 0 from the second-order conditions and (FK ) > 0:
As an exercise show that:
@K ¤
<0
@R
and that:
@L¤ @K ¤
= :
@R @W
Chapter 2
38
CHAPTER 2. THE ENVELOPE THEOREM 39
Of course in economics we do not believe that the …rm will choose irrational
values for L: Instead it will choose the pro…t maximizing L¤ which satis…es the
…rst-order conditions:
@¼ (L¤ ; w) 1
= p ¡ w = 0:
@L 2 L¤
This implicitly de…nes the labour demand curve L¤ = L¤ (w) : In this case we
can …nd L¤ (w) explicitly as:
L¤ (w) = (2w)¡2 :
Thus facing a real wage of w = 12 the clever or pro…t maximizing …rm would
hire
µ ¶ µ ¶¡2
1 1
L¤ = 2£ =1
2 2
Consider taking the derivative of the naive pro…t function with respect to
the real wage w: We obtain:
@¼ (L; w) @ ³p ´
= L ¡ wL = ¡L:
@w @w
Now suppose we do the same thing with the clever pro…t. We …nd that:
µ ¶
d¼¤ (w) d 1 1
= =¡ 2
dw dw 4w 4w
= ¡L¤ (w) :
Note the parallel between the two results where we get ¡L and ¡L¤ respectively.
This is no coincidence but follows from the envelope theorem which states
that:
y ¤ = y ¤ (x) :
f ¤ (x) = f (y ¤ (x) ; x) :
To calculate the derivative of the clever function with respect to x use the
chain rule to obtain:
µ ¶
df ¤ (x) @f (y ¤ (x) ; x) @y ¤ (x) @f (y ¤ (x) ; x)
= + :
dx @y @x @x
CHAPTER 2. THE ENVELOPE THEOREM 41
¯
df ¤ (x) @f (y; x) ¯¯
= ¯ y = y ¤ (x)
dx @x
¤
@f (y (x) ; x)
= :
@x
Thus the derivative of the clever version of the function is identical to the
partial derivative of the naive version of the function with respect to x:
We therefore have:
Theorem 11 Envelope Theorem I: If f (y; x) is the naive function and f ¤ (x)
is the clever function then:
¯
df ¤ (x) @f (y; x) ¯¯
= ¯ y = y ¤ (x)
dx @x
@f (y ¤ (x) ; x)
= :
@x
that one can obtain the negative of the demand for labour L¤ (w) by di¤erenti-
ating the clever pro…t function with respect to w as:
Furthermore the clever pro…t function is convex since we have already show
¤
that dLdw(w) < 0 and hence:
Again ¼ (L; K; P; W; R) is naive because it gives pro…ts for any choice of L and
K; even irrational choices that do not maximize pro…ts.
Again, in economics we do not believe …rms are irrational, that they will
just choose any L and K. Instead that they will choose that L¤ and K ¤ which
maximizes pro…ts. These will satisfy the …rst-order conditions:
@F (L¤ ; K ¤ )
P ¡W = 0
@L
@F (L¤ ; K ¤ )
P ¡R = 0
@K
which implicitly de…ne:
L¤ = L¤ (P; W; R)
K¤ = K ¤ (P; W; R)
that is, the demand for labour L¤ (P; W; R) and the demand for capital K ¤ (P; W; R) :
If we replace L and K by in Q = F (L; K) with L¤ and K ¤ then we obtain
the …rm’s supply curve Q¤ (P; W; R) given as:
@¼ ¤ (P; W; R) @
= (P F (L¤ ; K ¤ ) ¡ W L¤ ¡ RK ¤ ) = ¡L¤
@W @W
which looks almost the same as the derivative of the naive pro…t function:
@¼ (L; K; P; W; R)
= ¡L:
@W
However, this line of reasoning is based on an error since the pro…t maxi-
mizing amount of labour L¤ (P; W; R) and capital K ¤ (P; W; R) also depend on
W . Nevertheless, this incorrect reasoning still gives the correct answer! This
is, again, the envelope theorem.
Doing the di¤erentiation properly we obtain the correct expression:
@¼¤ (P; W; R) @
= (P F (L¤ ; K ¤ ) ¡ W L¤ ¡ RK ¤ )
@W @W
= ¡L¤ (P; W; R)
µ ¶
@F (L¤ ; K ¤ ) @L¤ (P; W; R)
+ P ¡W
@L @W
µ ¤ ¤
¶ ¤
@F (L ; K ) @K (P; W; R)
+ P ¡R :
@K @W
¤ ¤ ¤ ¤
However, by the …rst-order conditions P @F (L@L;K ) ¡ W = 0 and P @F (L
@K
;K )
¡
R = 0: Thus the last two terms in brackets are zero and we are back to (what
was actually correct but now for the correct reason):
@¼ ¤ (P; W; R)
= ¡L¤ (P; W; R)
@W
or alternatively:
¯
@¼ ¤ (P; W; R) @¼ (L; K; P; W; R) ¯¯
= ¯ L=L¤ (P;W;R) :
@W @W ¯K=K ¤ (P;W;R)
From the …rst-order conditions we then have that the optimal value of y
denoted by y¤ will satisfy :
@f (y¤ ; x)
= 0 for i = 1; 2; : : : n:
@yi
This implicitly de…nes the yi¤0 s as a functions of the exogenous variables as:
f ¤ (x) ´ f (y ¤ (x) ; x)
or more explicitly:
Theorem 12 Envelope Theorem II: If f (y; x) is the naive function and f ¤ (x)
is the clever function then:
@f ¤ (x1 ; x2 ; : : : xm ) @f (y; x) ¯¯
= y=y ¤ (x)
@xi @xi
@f (y¤ (x) ; x)
= :
@xi
Thus the partial derivative of the clever version of the function is identical
to the partial derivative of the naive version of the function when we replace y
by the optimal y ¤ (x) :
CHAPTER 2. THE ENVELOPE THEOREM 45
@f ¤ (x)
:
@xi
Step 1: First calculate the partial derivative of the naive version of the
function with respect to the ith exogenous variable or
@f (y; x)
:
@xi
Step 2: Replace all occurrences of the endogenous variables y with the
maximized values y ¤ (x) : This gives the correct answer, that is:
¯
@f ¤ (x) @f (y; x) ¯¯
=
@xi @xi ¯ y = y¤ (x)
@f (y ¤ (x) ; x)
= :
@xi
@¼¤ (P; W; R)
:
@W
Step 1: Calculate the derivative of the naive pro…t function:
@¼ (L; K; P; W; R) @
= (P F (L; K) ¡ W L ¡ RK)
@W @W
= ¡L:
@¼ ¤ (P; W; R)
= ¡L¤ (P; W; R)
@W
which is the (negative of the) …rm’s demand curve for labour.
CHAPTER 2. THE ENVELOPE THEOREM 46
An Example
Suppose the …rm’s production function Q = F (L; K) is Cobb-Douglas or:
Q = L® K ¯
where ® + ¯ < 1 (the production function is homogeneous of degree ® + ¯):
Then it can be shown that the clever pro…t function ¼¤ (P; W; R) is given by:
® ¯ 1 ¡® ¡¯
¼ ¤ (P; W; R) = (1 ¡ ® ¡ ¯) ® 1¡®¡¯ ¯ 1¡®¡¯ P 1¡®¡¯ W 1¡®¡¯ R 1¡®¡¯ :
CHAPTER 2. THE ENVELOPE THEOREM 47
¼¤ (P; W; R) = BP c W d Re
where:
® ¯
B = (1 ¡ ® ¡ ¯) ® 1¡®¡¯ ¯ 1¡®¡¯
1
c =
1¡®¡¯
¡®
d =
1¡®¡¯
¡¯
e = :
1¡®¡¯
which also has the Cobb-Douglas functional form.
Note that the pro…t function is homogeneous of degree 1 since
1 ¡® ¡¯
c+d+e = + +
1¡®¡¯ 1¡®¡¯ 1¡®¡¯
= 1
with c ¸ 0, d · 0 and e · 0:
Sometimes we start with the production function, derive L¤ (P; W; R) ; K ¤ (P; W; R)
and Q¤ (P; W; R) and then ¼¤ (P; W; R) : However, we can also start with ¼¤ (P; W; R)
and from there derive L¤ (P; W; R) ; K ¤ (P; W; R) and Q¤ (P; W; R) :
For example, suppose the clever pro…t function is given by:
5 3 3
¼¤ (P; W; R) = 10P 2 W ¡ 4 R¡ 4 :
@¼ ¤ (P; W; R)
L¤ (P; W; R) = ¡
@W
@ ³ 5 3 3
´
= ¡ 10P 2 W ¡ 4 R¡ 4
@W
15 5 ¡ 7 ¡ 3
= P 2W 4R 4:
2
CHAPTER 2. THE ENVELOPE THEOREM 48
@¼¤ (P; W; R)
K ¤ (P; W; R) = ¡
@R
@ ³ 5 3 3
´
= ¡ 10P 2 W ¡ 4 R¡ 4
@R
15 5 ¡ 3 ¡ 7
= P 2W 4R 4:
2
Note that K ¤ (P; W; R) is homogenous of degree 0:
De…nition
Let us review the de…nition of a homogenous function.
or:
f (¸x) = ¸k f (x) :
An Example
The classic example of a homogeneous function is the Cobb-Douglas functional
form where:
k = ®1 + ®2 + ¢ ¢ ¢ + ®n
CHAPTER 2. THE ENVELOPE THEOREM 49
since:
@F (L; K) 1 2 1
= L¡ 3 K 6
@L 3
is homogeneous of degree k ¡ 1 = ¡ 12 :
For example we have said that a function is (globally) convex if f 00 (x) > 0
for all x in the domain of f: Consider the function
y = jxj
-4 -2 0 2 4
x :
y = jxj
This function is clearly valley-like and hence we would like to say that it is
convex. However for this function f 00 (x) = 0 for x 6= 0 and f 00 (x) is not de…ned
when x = 0 so according to the calculus de…nition of convexity, the function is
not convex.
Another problem arises with functions such as:
f (x) = x4
600
500
400
300
200
100
-4 -2 0 2 4
x :
y = x4
This is also clearly valley-like. For x 6= 0 we have f 00 (x) = 12x2 > 0 but
f 00 (0) = 0 so the de…nition of convexity we have used fails here as well.
CHAPTER 2. THE ENVELOPE THEOREM 51
For these and other reasons we will now discuss a more satisfactory de…nition
of concavity and convexity.
It turns out that it is possible to de…ne concavity and convexity without
resorting to calculus. The basic idea is that if a function is convex, then the
line connecting any two points of the graph of the function must lie above the
function, while if it is concave it must lie everywhere below. This is illustrated
in the diagrams below:
Theorem 17 If f (x) has …rst and second derivatives then f (x) is convex if
and only if the Hessian of f (x) is positive semi-de…nite for all x:
Theorem 22 If f (x) has …rst and second derivatives then f (x) is concave if
and only if the Hessian of f (x) is negative semi-de…nite for all x:
CHAPTER 2. THE ENVELOPE THEOREM 53
Proof of Homogeneity
We …rst prove that f ¤ (x) given by:
y ¤ (¸x) = y ¤ (x) :
where the second line follows by the homogeneity of y ¤ (x) : This proves that
f ¤ (x) is homogeneous of degree 1:
However:
where:
2 3 2 3
P · ¸ F (K; L)
L
x = 4 W 5; y = ; Á (y) = 4 L 5:
K
R K
The fact that L¤ (P; W; R), K ¤ (P; W; R) and Q¤ (P; W; R) are homogeneous
of degree 0 is a basic requirement of rationality; that the …rm is not subject to
money illusion. For example if a 100% in‡ation doubles P; W and R then a
rational …rm does not change its production or factor demands, or:
We can use the convexity of ¼¤ (P; W; R) to show that the …rm’s factor
demand curves slope downwards and the …rm’s supply curve slopes upwards.
Since ¼ ¤ (P; W; R) is convex (and assuming …rst and second derivatives exist)
we have that the Hessian given by:
2 @ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R) 3
@P 2 @P @W @P @R
6 @ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R) 7
H (P; W; R) = 4 @P @W @W 2 @W @R
5
@ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R) @ 2 ¼¤ (P;W;R)
@P @R @W @R @R2
@L¤ (P; W; R)
·0
@W
so that the …rm’s demand curve for labour slopes downwards.
@K ¤ (P; W; R) @ 2 ¼¤ (P; W; R)
¡ = ¸0
@R @R2
where the inequality follows from (2:2) : It therefore follows that:
@K ¤ (P; W; R)
·0
@R
so the demand curve for capital slopes downwards.
@Q¤ (P; W; R)
¸0
@P
so the …rm’s supply curve slopes upwards.
1 Recall that if ¡X ¸ a then X · ¡a: For example if ¡5 ¸ ¡7 it follows that 5 · 7:
h (y; x) = 0:
As before we call f (y; x) the naive the version of the function because it
does not restrict the choice of y to be optimal or rational.
The optimal value of y; say y ¤ ; will along with the Lagrange multiplier ¸¤ ,
satis…es the …rst-order conditions:
@L (¸¤ (x) ; y ¤ (x) ; x)
= h (y¤ ; x) = 0;
@¸
@L (¸¤ (x) ; y ¤ (x) ; x) @f (y ¤ ; x) @h (y ¤ ; x)
= + ¸¤ = 0 for i = 1; 2; : : : n:
@yi @yi @yi
This implicitly de…nes n + 1 functions:
¸¤ = ¸¤ (x)
yi¤ = yi¤ (x) for i = 1; 2; : : : n:
We can replace y with y ¤ (x) in f (y; x) to get the clever version of the
function:
f ¤ (x) = f (y ¤ (x) ; x) :
We could also replace ¸ and y in the Lagrangian L (¸; y; x) with y ¤ (x) and
¸ (x) to obtain the clever Lagrangian: L (¸¤ (x) ; y ¤ (x) ; x) : Since y ¤ (x) satis…es
¤
so that all the derivatives in brackets above are zero. We therefore have that:
Theorem 32 Envelope Theorem III: Let f (y; x) be the naive function which is
optimized subject to a constraint: h (y; x) = 0 with Lagrangian:
L (¸; y; x) = f (y; x) + ¸h (y; x) :
Then:
¯
¯
@f ¤ (x1 ; x2 ; : : : xm ) @L (¸; y; x) ¯¯ ¤
= ¯ ¸ = ¸¤ (x)
@xi @xi ¯ y = y (x)
@L (¸¤ (x) ; y ¤ (x) ; x)
= :
@xi
The envelope theorem for constrained optimization states that to calculate
the derivative of the clever version of the function f ¤ (x) with respect to xi ; …rst
take the derivative of the Lagrangian: L (¸; y; x) with respect to xi and evaluate
this at ¸¤ (x) and y¤ (x) :
f (y; x) = xT Á (y)
and the constraint does not depend on x so that:
h (y; x) = h (y)
Proof of Homogeneity
We …rst prove that f ¤ (x) given by:
f ¤ (x) = xT Á (y¤ (x))
Therefore since ¸ > 0 and since h (y¤ (x)) = 0 or y ¤ (x) satis…es the constraint,
it follows that if y ¤ (x) maximizes or minimizes f (y; x) subject to h (y) = 0 it
also maximizes or minimizes f (y; ¸x) subject to h (y) = 0 and so
y ¤ (¸x) = y ¤ (x) :
where the second line follows by the homogeneity of y ¤ (x) : This proves that
f ¤ (x) is homogeneous of degree 1:
However we have:
factor demands are not the same as the ordinary factor demands which, as we saw earlier
with pro…t maximization, depend on P; W and R:
CHAPTER 2. THE ENVELOPE THEOREM 64
@C ¤ (Q; W; R)
:
@W
Following the recipe for the envelope theorem we proceed as follows:
Step 1: Di¤erentiate the Lagrangian L (¸; L; K; Q; W; R) with respect to W
to obtain:
@L (¸; L; K; Q; W; R) @
= (W L + RK + ¸ (Q ¡ F (L; K)))
@W @L
= L:
@C ¤ (Q; W; R)
= L¤ (Q; W; R) :
@W
This is an example of Shepard’s lemma. It states that to …nd the conditional
demand for labour one need only di¤erentiate the cost function C ¤ (Q; W; R)
with respect to W:
@C ¤ (Q; W; R)
:
@R
Following the recipe for the envelope theorem we proceed as follows:
Step 1: Di¤erentiate the Lagrangian L (¸; L; K; Q; W; R) with respect to R
to obtain:
@L (¸; L; K; Q; W; R) @
= (W L + RK + ¸ (Q ¡ F (L; K)))
@R @R
= K:
@C ¤ (Q; W; R)
= K ¤ (Q; W; R) :
@R
This is again Shepard’s lemma. It states that we can …nd the conditional demand
for capital by di¤erentiating the cost function C ¤ (Q; W; R) with respect to the
rental cost of capital R:
CHAPTER 2. THE ENVELOPE THEOREM 65
Marginal Cost
Finally, suppose we attempt to calculate marginal cost:
@C ¤ (Q; W; R)
MC (Q; W; R) = :
@Q
Following the recipe for the envelope theorem we proceed as follows:
Step 1: Di¤erentiate the Lagrangian L (¸¤ ; L¤ ; K ¤ ; Q; W; R) with respect to
Q to obtain:
@L (¸; L; K; Q; W; R) @
= (W L + RK + ¸ (Q ¡ F (L; K)))
@Q @Q
= ¸:
An Example
It is a fact that if the …rm’s production function Q = F (L; K) is Cobb-Douglas
or:
Q = L® K ¯
or
C ¤ (Q; W; R) = BQc W d Re
where:
® ¯
B = (® + ¯) ®¡ ®+¯ ¯ ¡ ®+¯
1
c =
®+¯
®
d =
®+¯
¯
e = :
®+¯
Note that:
d+e=1
CHAPTER 2. THE ENVELOPE THEOREM 66
An Example
Suppose the cost function is given by:
3 1
C ¤ (Q; W; R) = Q2 W 4 R 4
C = W L + RK
= xT Á (y)
where:
· ¸ · ¸
W L
x= ; y= ; Á (y) = y:
R K
From this and the fact that the constraint does not depend on W or R it follows
that (see page 26 ):
The fact that L¤ (Q; W; R) and K ¤ (Q; W; R) and Q¤ (P; W; R) are homo-
geneous of degree 0 is a basic requirement of rationality; that the …rm is not
subject to money illusion.
For example if a 100% in‡ation doubles W and R then a rational …rm does
not change its means of producing Q units of output or:
A Symmetry Result
Just as with the pro…t function we can establish a certain symmetry results
regarding the partial derivatives of the factor demands.
Di¤erentiate both sides of
@C ¤ (Q; W; R)
= L¤ (Q; W; R)
@W
with respect to R to obtain:
@L¤ (Q; W; R) @ 2 C ¤ (Q; W; R)
= :
@R @R@W
Now di¤erentiate both sides of
@C ¤ (Q; W; R)
= K ¤ (Q; W; R)
@R
with respect to W to obtain:
@K ¤ (Q; W; R) @ 2 C ¤ (Q; W; R)
= :
@W @W @R
@ 2 C ¤ (Q;W;R) @ 2 C ¤ (Q;W;R)
By Young’s theorem: @R@W = @W @R and so we conclude that:
@L¤ (Q; W; R) @K ¤ (Q; W; R)
= :
@R @W
CHAPTER 2. THE ENVELOPE THEOREM 69
More Results
Using Euler’s theorem (see page 49) and the fact that L¤ (Q; W; R) is homoge-
neous of degree 0 we have:
@L¤ (Q; W; R)
·0
@W
it follows that:
@L¤ (Q; W; R)
¸0
@R
so that an increase in the price of capital increases (or more precisely does not
decrease) the conditional demand for labour.
¤ ¤
We have shown the symmetry result that: @L (Q;W;R)
@W = @K (Q;W;R)
@W and so
we have immediately that:
@K ¤ (Q; W; R)
¸ 0:
@W
An Example
Note that in the example above where:
3 1
C ¤ (Q; W; R) = Q2 W 4 R 4
W
is homogeneous of degree 0 and can be written as a function of R as:
µ ¶¡ 14
3 W
¤
L (Q; W; R) = Q2
4 R
so that:
µ ¶ µ ¶¡ 14
¹ Q; W 3 2 W
L = Q :
R 4 R
Similarly
@ ³ 2 3 1´
K ¤ (Q; W; R) = Q W 4 R4
@R
1 2 3 ¡3
= Q W 4R 4
4
W
is homogeneous of degree 0 and can be written as a function of R as:
µ ¶ 34
1 W
¤
K (Q; W; R) = Q2
4 R
so that:
µ ¶ µ ¶3
¹ W 1 2 W 4
K Q; = Q :
R 4 R
U = U (Q1 ; Q2 ) :
It has income Y and faces prices P1 and P2 so that the budget constraint is:
Y = P1 Q1 + P2 Q2 :
L (¸; Q1 ; Q2 ; P1 ; P2 ; Y ) = U (Q1 ; Q2 ) + ¸ (Y ¡ P1 Q1 ¡ P2 Q2 )
¸¤ = ¸¤ (P1 ; P2 ; Y ) ;
Q¤1 = Q¤1 (P1 ; P2 ; Y ) ;
Q¤2 = Q¤2 (P1 ; P2 ; Y ) :
Here Q¤1 (P1 ; P2 ; Y ) and Q¤2 (P1 ; P2 ; Y ) are the Marshallian curves for the
two goods. In general Marshallian demand curves are functions of prices and
nominal income Y: Later we will investigate another kind of demand curve, the
Hicksian demand curve, which is a function of prices and real income.
The indirect utility function (or the clever utility function) is given by:
@U ¤ (P1 ; P2 ; Y )
@Y
and apply the envelope theorem recipe as follows:
Step 1: Take the derivative of the Lagrangian with respect to Y to get:
@L (¸; Q1 ; Q2 ; P1 ; P2 ; Y ) @
= (U (Q1 ; Q2 ) + ¸ (Y ¡ P1 Q1 ¡ P2 Q2 ))
@Y @Y
= ¸:
@U ¤ (P1 ; P2 ; Y )
= ¸¤ (P1 ; P2 ; Y ) :
@Y
Thus the Lagrange multiplier turns out to be the marginal utility of income.
Exercise: Show that: ¸¤ (P1 ; P2 ; Y ) is homogeneous of degree ¡1:
@U ¤ (P1 ;P2 ;Y )
Calculating @P1
@U ¤ (P1 ; P2 ; Y )
:
@P1
CHAPTER 2. THE ENVELOPE THEOREM 72
@U ¤ (P1 ;P2 ;Y )
Calculating @P2
Roy’s Identity
Up until now when we di¤erentiated a clever function with respect to a price
we have always obtained either a demand or a supply curve. With utility maxi-
mization this turns out not to be the case. Nevertheless, we can use the indirect
utility function to calculate the demand for Q1 and Q2 :
Thus using:
@U ¤ (P1 ; P2 ; Y )
= ¸¤ (P1 ; P2 ; Y )
@Y
@U ¤ (P1 ; P2 ; Y )
= ¡¸¤ (P1 ; P2 ; Y ) £ Q¤1 (P1 ; P2 ; Y )
@P1
we obtain:
@U ¤ (P1 ;P2 ;Y )
@P1
Q¤1 (P1 ; P2 ; Y ) =¡ @U ¤ (P1 ;P2 ;Y )
@Y
CHAPTER 2. THE ENVELOPE THEOREM 73
so that:
@U ¤ (P1 ;P2 ;Y )
@P1
Q¤1 (P1 ; P2 ; Y ) = ¡ @U ¤ (P1 ;P2 ;Y )
@Y
¡1
3P1 Y
= ¡ 1 = 3P
Y 1
E = P1 Q1 + P2 Q2
Uo = U (Q1 ; Q2 ) :
¸¤ = ¸¤ (P1 ; P2 ; Uo ) ;
Q¤1 = Q¤1 (P1 ; P2 ; Uo ) ;
Q¤2 = Q¤2 (P1 ; P2 ; Uo ) :
CHAPTER 2. THE ENVELOPE THEOREM 75
Here Q¤1 (P1 ; P2 ; Uo ) and Q¤2 (P1 ; P2 ; Uo ) are the Hicksian demand curves.
They di¤er from the Marshallian demand curves only in that Uo , which can
be thought of as real income, takes the place of Y (or nominal income) in the
Marshallian demand curves.
Substituting Q¤1 (P1 ; P2 ; Uo ) and Q¤2 (P1 ; P2 ; Uo ) into the naive expenditure
function E = P1 Q1 + P2 Q2 ; we obtain the clever expenditure function:
E = P1 Q1 + P2 Q2
= xT Á (y)
where:
· ¸ · ¸
P1 Q1
x= ; y= ; Á (y) = y:
P2 Q2
A Symmetry Result
The Hicksian demand curves display the same symmetry as the conditional
factor demand functions.
Di¤erentiate both sides of
@E ¤ (P1 ; P2 ; Uo )
= Q¤1 (P1 ; P2 ; Uo )
@P1
with respect to P2 to obtain:
@Q¤1 (P1 ; P2 ; Uo ) @ 2 E ¤ (P1 ; P2 ; Uo )
= :
@P2 @P2 @P1
Now di¤erentiate both sides of
@E ¤ (P1 ; P2 ; Uo )
= Q¤2 (P1 ; P2 ; Uo )
@P2
CHAPTER 2. THE ENVELOPE THEOREM 77
3.1 Introduction
The economic world is a world of uncertainty. To understand models of economic
decision making under uncertainty, whether it is insuring a house against …re or
picking a portfolio of risky assets, one needs to be able to manipulate variables
which take on di¤erent outcomes with di¤erent probabilities. These variables
are known as random variables.
The basic tool for working with a random variable X is the expectations
operator E [X] : E [ ] in turn is
Pbased on either discrete summation, which in-
n
volves the sigma notation or i=1 ; or continuous summation, which involves
Rb
integration or a ( ) dx.
Therefore, before studying random variables we will …rst study discrete sum-
Pn Rb
mation or i=1 and then continuous summation or a ( ) dx.
X1 + X2 + X3 + ¢ ¢ ¢ + Xn :
I call this the dot; dot; dot notation. The dot; dot; dot notation is the safest
way of working with sums, but also the most cumbersome.
78
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 79
Sums can be represented more compactly using the sigma notation as:
n
X
Xi ´ X1 + X2 + X3 + ¢ ¢ ¢ + Xn :
i=1
P
Here i is the summation index. Underneath the we write i = 1 to indicate
that we begin the sum with X1 . After including X1 , we then increase i to 2
and include X2 in the sum. This process continues until we reach i = n with
Xn included in the sum, at which point we stop.
This notation can be modi…ed in a number of ways. ForP23example to start
the summation with X5 and end with X23 we would write: i=5 Xi or
23
X
Xi = X5 + X6 + X7 + ¢ ¢ ¢ + X23 :
i=5
The sigma notation is much more e¢cient than the dot; dot; dot notation,
but it is also more dangerous. One strategy for avoiding these dangers when
deriving results is to revert to the safe dot; dot; dot notation and then, once we
think we have the answer, convert back into the summation notation. Here are
some examples.
Pn
3.2.2 Example 1: i=1 aXi
Converting to the dot; dot; dot notation we have:
n
X
aXi = aX1 + aX2 + aX3 + ¢ ¢ ¢ + aXn
i=1
0 1
B C
= a @X1 + X2 + X3 + ¢ ¢ ¢ + Xn A
| P
{z }
n
= i=1 Xi
n
X
= a Xi
i=1
Pn
3.2.3 Example 2: i=1 (aXi + bYi )
Converting to the dot; dot; dot notation we have:
n
X
(aXi + bYi ) = (aX1 + bY1 ) + (aX2 + bY2 ) + ¢ ¢ ¢ + (aXn + bYn )
i=1
= a (X1 + X2 + ¢ ¢ ¢ + Xn ) + b (Y1 + Y2 + ¢ ¢ ¢ + Yn )
Xn n
X
= a Xi + b Yi :
i=1 i=1
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 80
Pn
3.2.4 Example 3: i=1 (aXi + b)
Pn Pn
This one is tricky. It is a great temptation to write: i=1 (aXi + b) = a i=1 Xi +
b which is wrong. Instead:
n
X
(aXi + b) = (aX1 + b) + (aX2 + b) + ¢ ¢ ¢ + (aXn + b)
i=1
= a (X1 + X2 + ¢ ¢ ¢ + Xn ) + (b + b + ¢ ¢ ¢ + b)
| {z }
n times
n
X
= a Xi + nb
i=1
Pn
3.2.5 Example 4: i=1 (aXi + b)2
Again converting into the dot; dot; dot notation we have
n
X
(aXi + b)2 = (aX1 + b)2 + (aX2 + b)2 + ¢ ¢ ¢ + (aXn + b)2
i=1
¡ 2 2 ¢ ¡ ¢ ¡ ¢
= a X1 + 2abX1 + b2 + a2 X22 + 2abX2 + b2 + ¢ ¢ ¢ + a2 Xn2 + 2abXn + b2
¡ ¢ ¡ ¢
= a2 X12 + ¢ ¢ ¢ + Xn2 + 2ab (X1 + ¢ ¢ ¢ + Xn ) + b2 + ¢ ¢ ¢ + b2
| {z }
n times
n
X n
X
= a2 Xi2 + 2ab Xi + nb2 :
i=1 i=1
Pn ¡ ¹
¢
3.2.6 Example 5: i=1 Xi ¡ X = 0
¹ is:
The sample mean X
X n
¹= 1
X
1
Xj = (X1 + X2 + ¢ ¢ ¢ + Xn )
n j=1 n
and so:
n
X ¡ ¢ ¡ ¢ ¡ ¢ ¡ ¢
¹
Xi ¡ X ¹ + X2 ¡ X
= X1 ¡ X ¹ + ¢ ¢ ¢ + Xn ¡ X
¹
i=1
= (X1 + X2 + ¢ ¢ ¢ + Xn ) ¡ nX¹
1
= (X1 + X2 + ¢ ¢ ¢ + Xn ) ¡ n (X1 + X2 + ¢ ¢ ¢ + Xn )
n
= (X1 + X2 + ¢ ¢ ¢ + Xn ) ¡ (X1 + X2 + ¢ ¢ ¢ + Xn )
= 0:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 81
More generally:
n
X n
X n
X n
X
(X1i + X2i + ¢ ¢ ¢ + Xmi ) = X1i + X2i + ¢ ¢ ¢ + Xmi :
i=1 i=1 i=1 i=1
This only works for linear functions! If the exponent on the brackets is not 1
then this step is not justi…ed. For example:
n
à n n
!2
X 2
X X
(Xi + Yi ) 6= Xi + Yi :
i=1 i=1 i=1
which now has an exponent of 1; we can pull the summation sign through the
expanded expression as:
n
X n
X ¡ 2 2 ¢
(aXi + bYi )2 = a Xi + 2abXi Yi + b2 Yi2
i=1 i=1
n
X n
X n
X
2
= a Xi2 + 2abXi Yi + b2 Yi2 :
i=1 i=1 i=1
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 83
Pn
Since a2 ; 2ab and b2 do not depend on i; we can by Rule 2 pull i=1 past these
constants to obtain:
n
X n
X n
X n
X
(aXi + bYi )2 = a2 Xi2 + 2ab Xi Yi + b2 Yi2 :
i=1 i=1 i=1 i=1
Pn
3.2.9 Example 2: i=1 (aXi + b)2
This is a special case of Example 1 where Yi = 1 for all i: However, it is useful
to work it through since it provides an example of Rule 3. Thus by changing
the exponent to 1 we have:
n
X n
X ¡ 2 2 ¢
(aXi + b)2 = a Xi + 2abXi + b2
i=1 i=1
n
X n
X n
X
= a2 Xi2 + 2ab Xi + b2 :
i=1 i=1 i=1
Pn
Since for b2 in i=1 b2 does not have an i subscript, by Rule 3 we multiply b2
by the number of terms being summed so that:
n
X
b2 = nb2
i=1
and hence:
n
X n
X n
X
(aXi + b)2 = a2 Xi2 + 2ab Xi + nb2 :
i=1 i=1 i=1
Pn ¡ ¢
¹ 2
3.2.10 Example 3: i=1 Xi ¡ X
¹ However, it is again
This is a special case of Example 2 with a = 1 and b = ¡X:
useful to do it from scratch.
The sample mean X ¹ is:
X n
¹= 1
X Xj :
n j=1
¡ ¢
Since there is has an exponent of 2 on Xi ¡ X ¹ 2 we cannot pull Pn
i=1
through the brackets. However, by expanding and then using Rule 1 we have:
n
X n
X
¡ ¢ ¡ 2 ¢
¹ 2
Xi ¡ X = ¹ i+X
Xi ¡ 2XX ¹2
i=1 i=1
n
X n
X n
X
= Xi2 + ¹ i+
¡2XX ¹ 2:
X
i=1 i=1 i=1
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 84
Note that in the secondPsum the term ¡2X ¹ does not have an i subscript and so
n ¹ 2 does not have
by Rule 2 we can pull i=1 past it to Xi : In the third sum X
an i subscript so that by Rule 3 we simply multiply it by n: We thus have:
n
X n
X n
X
¡ ¢
¹ 2=
Xi ¡ X ¹
Xi2 ¡ 2X ¹ 2:
Xi + nX
i=1 i=1 i=1
since by Rule 4 we can replace the summation index of j with i without a¤ecting
the result. Therefore:
n
X
¹
Xi = nX
i=1
and hence:
n
X n
X
¡ ¢
¹ 2
Xi ¡ X = ¹ 2 + nX
Xi2 ¡ 2nX ¹2
i=1 i=1
Xn
= ¹ 2:
Xi2 ¡ nX
i=1
3.3 Integration
3.3.1 The Fundamental Theorem of Integral Calculus
The de…nite integral
Z b
f (x) dx
a
is often interpreted as the area under the curve f (x) between a and b: Here x
is the variable over which we are integrating while a is the lower limit of the
integral and b the upper limit.
From the fundamental theorem of integral calculus we can evaluate integrals
by …nding the anti-derivative of f (x) given:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 85
F 0 (x) = f (x) :
R 10
3.3.2 Example 1: 1
x2 dx
x3 d x3
If f (x) = x2 then F (x) = 3 ; that is, F 0 (x) = dx 3 = x2 : Therefore:
Z ¯
10
2 x3 ¯¯ 10 103 13
x dx = = ¡ = 333:
1 3 ¯ 1 3 3
R5
3.3.3 Example 2: 0
e¡x dx
If f (x) = e¡x then F (x) = ¡e¡x and:
Z ¯
5 ¯ 5
e¡x
dx = ¡e ¡x ¯ ¡5
¯ 0 =1¡e :
0
R4
3.3.5 Example 1: 0
xe¡x dx
Suppose we wish to evaluate the integral:
Z 4
xe¡x dx:
0
Here it is not obvious what the antiderivative of xe¡x is. However, the anti-
derivative of e¡x is just ¡e¡x so set
There turns out to be a close connection between the gamma function and
factorials like 5! = 5 £ 4 £ 3 £ 2 £ 1 = 120: This is based on the following result:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 87
and by de…nition
Z 1
xn¡2 e¡x dx ´ ¡ (n ¡ 1)
0
so we have:
¡ (n) = (n ¡ 1) ¡ (n ¡ 1) :
Starting with ¡ (1) = 1 = 0! and using this property of ¡ (n) we have:
¡ (1) = 1 = 0!
¡ (2) = (2 ¡ 1) £ ¡ (1) = 1 = 1!
¡ (3) = (3 ¡ 1) £ ¡ (2) = 2 = 2!
¡ (4) = (4 ¡ 1) £ ¡ (3) = 6 = 3!
¡ (5) = (5 ¡ 1) £ ¡ (4) = 24 = 4!
and in general as long as n is an integer:
¡ (n) = (n ¡ 1)!
We can also use the gamma function to de…ne non-integer factorials. For
example it can be shown that:
µ ¶ µ ¶
1 1 p
¡ = ¡ != ¼
2 2
µ ¶ µ ¶ µ ¶ p
3 1 1 1 ¼
¡ = ¡ = !=
2 2 2 2 2
µ ¶ µ ¶ µ ¶ p
5 3 3 3 3 ¼
¡ = ¡ = !=
2 2 2 2 4
etc::
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 88
(b ¡ a)
dxn =
n
then:
Z b n
X
f (x) dx = lim f (a + dxn i) dxn
a n!1
i=0
n µ ¶
(b ¡ a) X i (b ¡ a)
= lim f a+ :
n!1 n i=0
n
An Example
We showed that:
Z 10
x2 dx = 333:
1
(b ¡ a) 10 ¡ 1
dxn = = =1
n 9
and so we obtain the approximation:
Z 10 9
X
x2 dx ¼ dxn (1 + dxn i)2
1 i=0
= 12 + 22 + 32 + 52 + 62 + 72 + 82 + 92 + 102
= 369:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 89
R 10
The error, the di¤erence between 333, the exact value of 1
x2 dx; and the
approximate value of 369; can be reduced by increasing n.
If let n = 18 in the approximation we have:
(b ¡ a) 10 ¡ 1 1
dxn = = =
n 18 2
so that:
Z 18 µ ¶2
10
1X 1
x2 dx ¼ 1+ i
1 2 i=0 2
1¡ 2 ¢
= 1 + 1:52 + 22 + 2:52 + ¢ ¢ ¢ + 9:52 + 102
2
= 358:625:
Rb
Rule 1: a dx is a linear operator. That is if the exponent on the bracket is
Rb 1 Rb
1, or given a (f (x) + g (x)) dx or equivalently a (f (x) + g (x)) dx, then you
Rb
may take a dx inside the brackets and apply it to each term inside as:
Z ÃZ Z !
b b b
(f (x) + g (x)) dx = f (x) dx + g (x) dx :
a a a
If the exponent on the brackets is not 1 then this step is not justi…ed. For
example:
Z b ÃZ Z b !2
b
2
(f (x) + g (x)) 6= f (x) dx + g (x) dx :
a a a
Rb
Rule 2:You may pull a past any expression that does not depend on x (or
whatever the integration variable is) but do not go past the dx term. Thus:
Z b Z b
cf (x) dx = c f (x) dx
a a
Rule 4: As long as it does not con‡ict with other notation, you can change
the integration variable without a¤ecting the expression. Thus:
Z b Z b
f (x) dx = f (y) dy:
a a
Rb
By Rule 2 we can take a
dx past the terms not depending on x; that is c2 ; 2cd;
and d2 to get:
Z b Z b Z b Z b
(cf (x) + dg (x))2 dx = c2 f (x)2 dx + 2cd f (x) g (x) dx + d2 g (x)2 dx:
a a a a
Rb
3.3.10 Example 2: a
(f (x) + d)2 dx
Again squaring the brackets to get an exponent of 1 we obtain:
Z b Z b³ ´
(f (x) + d)2 dx = 2
f (x) + 2df (x) + d2 dx:
a a
Rb
Now that the brackets have an exponent of 1 we can pull a
dx through the
brackets to get:
Z b Z b Z b Z b
(f (x) + d)2 dx = f (x)2 dx + 2d f (x) dx + d2 dx:
a a a a
Rb
By Rule 3 the term a dx becomes b ¡ a and so we have:
Z b Z b Z b
(f (x) + d)2 dx = f (x)2 dx + 2d f (x) dx + d2 (b ¡ a) :
a a a
For example if X is the outcome of rolling a fair die, the outcomes are
1; 2; 3; 4; 5 and 6 with probabilities 16 ; 16 ; 16 ; 16 ; 16 and 16 then:
2 3
Outcomes Probabilities
6 1 1 7
6 6 7
6 2 1 7
6 6 7
X=6 6 3 1 7:
6 7
6 4 1 7
6 6 7
4 5 1 5
6
1
6 6
Given any function f (x) and random variable X you can always create a
new random variable f (X) by applying f (x) to each of the outcomes. For
example if X is the die roll above and f (x) = x2 then we simply square all the
outcomes to obtain:
2 3
Outcomes Probabilities
6 12 1 7
6 6 7
6 22 1 7
6 6 7
2
X =6 6 32 1 7:
6 7
6 42 1 7
6 6 7
4 52 1 5
6
2 1
6 6
Note that it is the outcomes and not the probabilities that get squared!
For example suppose that 30 percent of the population supports the gamma
party. If I take one person at random and ask him if he supports the Gamma
Party, and let X = 1 if he says yes and X = 0 if he says no then X has a
Bernoulli distribution with probability p = 0:3:
Y = X1 + X2 + X3 + ¢ ¢ ¢ + Xn :
Continuing the Gamma Party example above, if I ask n = 2000 people taken
randomly from a population, then Y is the number of people in my sample who
say they support the Gamma party or Y » B (0:3; 2000).
If Y » B (p; n) then there are n + 1 possible outcomes k = 0; 1; 2; : : : n and
it can be shown that
n!
Pr [Y = k] = pk (1 ¡ p)n¡k ; k = 0; 1; 2; : : : n
k! (n ¡ k)!
or:
2 3
Outcomes Probabilities
6 0 n! 0 n¡0 7
6 0!(n¡0)! p (1 ¡ p) 7
6 n! 1 n¡1 7
6 1 1!(n¡1)! p (1 ¡ p)
7
6 7
Y =6 2 n! 2 n¡2 7
6 2!(n¡2)! p (1 ¡ p) 7
6 .. .. 7
6 7
4 . . 5
n n!
2!(n¡n)! pn
(1 ¡ p)n¡n
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 94
1
For example given a ¡one-third
¢ probability of success or p = 3 and four trials
or n = 4 so that Y » B 13 ; 4 we have:
µ ¶0 µ ¶4¡0
4! 1 1 16
Pr [Y = 0] = 1¡ =
0! (4 ¡ 0)! 3 3 81
µ ¶1 µ ¶4¡1
4! 1 1 32
Pr [Y = 1] = 1¡ =
1! (4 ¡ 1)! 3 3 81
µ ¶2 µ ¶4¡2
4! 1 1 24
Pr [Y = 2] = 1¡ =
2! (4 ¡ 2)! 3 3 81
µ ¶3 µ ¶4¡3
4! 1 1 8
Pr [Y = 3] = 1¡ =
3! (4 ¡ 3)! 3 3 81
µ ¶4 µ ¶4¡4
4! 1 1 1
Pr [Y = 4] = 1¡ =
4! (4 ¡ 4)! 3 3 81
or:
2 3
Outcomes Probabilities
6 0 16 7
6 81 7
6 1 32 7
Y =6
6
81
24
7
7
6 2 81 7
4 3 8 5
81
1
4 81
¹k
Pr [Y = k] = e¡¹ ; k = 0; 1; 2; : : : 1:
k!
Alternatively we can represent a Poisson random variables as:
2 3
Outcomes Probabilities
0
6 0 e¡¹ ¹0! 7
6 7
6 ¡¹ ¹
1 7
6 1 e 1! 7
Y =6 6 2 e ¡¹ ¹2 7:
7
6 2!3 7
6 3 e ¡¹ ¹ 7
4 3! 5
.. ..
. .
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 95
You can verify that the probabilities sum to one from the Taylor series:
P ¹k
e¹ = 1k=0 k! so that:
1
X 1
X ¹k
Pr [Y = k] = e¡¹
k!
k=0 k=0
1
X ¹k
= e¡¹
k!
k=0
¡¹ ¹
= e e
= 1:
We have the following relationship between the Poisson and the Binomial
distribution, sometimes referred to as the Law of Small Numbers:
Theorem 50 If Y » B (p; n) has a Binomial distribution and n ! 1; p ! 0
but np ! ¹ > 0 then Y has an approximate Poisson distribution or Y » P (¹)
as n ! 1:
For example consider an intersection where n = 1000 cars pass through
each year. The probability of any one car having an accident is very small, say
1
p = 250 and let us assume independent of other cars. If then Y is the total
number of accidents in the intersection, then
µ ¶
1
Y »B ; 1000 :
250
Therefore:
µ ¶0 µ ¶1000
1000! 1 1
Pr [Y = 0] = 1¡ = 0:01817
0! £ 1000! 250 250
µ ¶1 µ ¶999
1000! 1 1
Pr [Y = 1] = 1¡ = 0:07296
1! £ 999! 250 250
µ ¶2 µ ¶998
1000! 1 1
Pr [Y = 2] = 1¡ = 0:14638
2! £ 998! 250 250
µ ¶3 µ ¶997
1000! 1 1
Pr [Y = 3] = 1¡ = 0:19556
3! £ 997! 250 250
µ ¶4 µ ¶996
1000! 1 1
Pr [Y = 4] = 1¡ = 0:19556
4! £ 996! 250 250
µ ¶5 µ ¶995
1000! 1 1
Pr [Y = 5] = 1¡ = 0:15661
5! £ 995! 250 250
..
.
1
If instead we work with the Poisson distribution with ¹ = 2500 £ 10000 = 4
or
Y » P (4) :
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 96
40
Pr [Y = 0] ¼ e¡4 = 0:01831
0!
1
¡4 4
Pr [Y = 1] ¼ e = 0:07326
1!
2
4
Pr [Y = 2] ¼ e¡4 = 0:14652
2!
3
4
Pr [Y = 3] ¼ e¡4 = 0:19537
3!
4
4
Pr [Y = 4] ¼ e¡4 = 0:19537
4!
5
4
Pr [Y = 5] = e¡4 = 0:15629
5!
..
.
and so the probability of 3 (or 4 for that matter) accidents occurring in one year
is 0:19537 using the exact binomial distribution and 0:19556 using the Poisson
approximation.
Thus the area under the density between a and b gives the probability that
X will fall in that interval.
1 For example it turns out that X takes on any particular value x must be zero!
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 97
0.4
0.3
0.2
0.1
-4 -2 0 2 4
z
1 (x¡65)2
¡
p (x) = p e 2£(15)2
2¼152
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 99
0.025
0.02
0.015
0.01
0.005
0 20 40 60 80 100 120
x
For example if r = 3:
3
y 2 ¡1 e¡y=2 1 p ¡1y
p (y) = £3¤ = p ye 2
3=2
2 ¡ 2 2¼
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 100
0.2
0.15
0.1
0.05
0 2 4 6 8 10
y
For example if r = 7:
¡ ¢ ¡ ¢µ ¶¡ (7+1)
¡ 12 ¡ 72 x2 2
p (x) = p ¡ 7+1 ¢ 1 +
7¡ 2 7
5 ¼ 1
= p
16 7 ¡1 + x2 ¢4
7
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 101
0.35
0.3
0.25
0.2
0.15
0.1
0.05
-4 -2 0 2 4
x
Y1 =r
Y =
Y2 =s
0.016
0.014
0.012
0.01
0.008
0.006
0.004
0.002
0 1 2 3 4
x
F distribution
Your job is to forecast what GN P will be. To do this you must pick some
number, which will be your forecast, as your best guess of what GN P will be.
One way of doing this is to use the expected value of X; written as E [X] or
¹ or ¹X : In the above example ¹ = ¹X = E [X] = 2%:
This concept turns out to be fundamental for the study of random variables.
We will …rst discuss it for discrete random variables and then for continuous
random variables.
E [X] = x1 p1 + x2 p2 + ¢ ¢ ¢ + xn pn
Xn
= xi pi :
i=1
The recipe for calculating E [X] given the events x1 ; x2 ; : : : xn and probabil-
ities p1 ; p2 ; : : : pn is as follows:
One of the things you must be careful about is not confusing E [f (x)] with
f (E [X]) : In P
generalRthe two are di¤erent except for linear functions. This is
because, like and , it turns out that E [ ] is a linear operator.
2 £ ¤
We will illustrate this di¤erence by comparing E [X] with E X 2 for each
of the random variables considered below. In general we will see that:
£ ¤ 2
E X 2 ¸ E [X]
£ ¤ 1 1 1 1 1 1
E X 2 = 12 £ + 22 £ + 32 £ + 42 £ + 52 £ + 62 £
6 6 6 6 6 6
91
= = 15:167:
6
We thus have:
µ ¶2
91 £ ¤ 7
15:167 = = E X 2 > E [X]2 = = 12:25:
6 2
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 105
b+a
E [X] = :
2
1
Proof. Since p (x) = b¡a for a < x < b and 0 otherwise we have:
Z 1
E [X] = xp (x) dx
¡1
Z b
1
= x dx
a b¡a
Z b
1
= xdx
b¡a a
¯
1 x2 ¯¯ b
=
b¡a 2 ¯ a
1 b2 ¡ a2
=
2 b¡a
1 (b ¡ a) (b + a)
=
2 b¡a
b+a
= :
2
b+a
Thus E [X] = 2 is the midpoint between a and b: For example if X »
U (0; 10), then
0 + 10
E [X] = = 5:
2
Theorem 63 If X » U (a; b) has a uniform distribution then:
£ ¤ b2 + ab + a2
E X2 = :
3
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 107
£ ¤
Proof. To calculate E X 2 we have:
Z 1
£ ¤
E X2 = x2 p (x) dx
¡1
Z b
1
= x2 dx
a b ¡ a
Z b
1
= x2 dx
b¡a a
¯
1 x3 ¯¯ b
=
b¡a 3 ¯ a
1 b3 ¡ a3
=
3 b¡a
¡ ¢
1 (b ¡ a) b2 + ab + a2
=
3 b¡a
b + ab + a2
2
= :
3
For k = 2 we have:
Proof. We have:
Z 1
£ ¤ 1 z2
E Z2 = z 2 p e¡ 2 dz
¡1 2¼
Z 1 ³ ´
1 z2
= p z ze¡ 2 dz:
2¼ ¡1
³ z2
´
Using integration by parts where u (z) = z; u0 (z) = 1; v 0 (z) = z ze¡ 2 and
z2
v (z) = ¡e¡ 2 we have:
Z 1 ³ ´ ¯
1 1 2 ¯
z2
¡ z2 ¯ 1
p z ze¡ 2 dz = ¡ p ze ¯ ¡1
2¼ ¡1 2¼
Z 1
1 z2
+ p e¡ 2 dz
¡1 2¼
= 1
since:
z2
lim ¡ze¡ 2 =0
z!§1
and
Z 1 Z 1
1 z2
p e¡ 2 dz = p (z) dz = 1
¡1 2¼ ¡1
z2 £ ¤
since e¡ 2 dominates z 3 for large z and by our previous proof that E Z 2 = 1:
More generally
£ ¤ it can be shown using a proof by induction that for even
powers E Z 2k that:
= aE [X] + b
= f (E [X]) :
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 110
while if X is discrete:
n
X
E [f (X)] = f (xi ) pi
i=1
Xn
= (axi + b) pi
i=1
Xn Xn
= a xi pi + b pi
i=1 i=1
| {z } | {z }
=E[X] =1
= aE [X] + b
= f (E [X]) :
More generally we have the following rules for manipulating expressions in-
volving E [ ] :
Up until nowR 1 we have derived results by expressing
Pn E [f (X)] either as an
integral using ¡1 f (x) dx or as a summation i=1 f (xi ) pi : For many deriva-
tions it turns out that it is not necessary to do this, that one can derive results
using the fact that E [ ] is a linear operator. To do this you need to know the
rules given below.
E [(X + Y )] = E [X] + E [Y ] :
This only works for linear functions! If the exponent on the brackets is not 1
then this step is not justi…ed. For example:
h i
2 2
E (X + Y ) 6= (E [X] + E [Y ]) :
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 111
E [f (X + Y )] 6= f (E [X] + E [Y ]) ;
Rule 2:You may always pull E [ ] past any expression that is non-random.
For example if a is a non-random constant (e.g. a = 3 ) then:
E [aX] = aE [X]
E [XY ] 6= Y E [X]
and in general:
E [XY ] 6= E [X] E [Y ] :
E [a] = a:
Thus E [7] = 7:
Here are some examples:
£ ¤
3.5.9 Example 1: E (3X + 4Y )2
To pull E [ ] through the brackets we must expand to get an exponent of 1:
Thus:
h i £¡ ¢¤
E (3X + 4Y )2 = E 9X 2 + 24XY + 16Y 2 :
Since 9; 24 are nonrandom we can pull E [ ] past them and use the fact that
E [16] = 16 to obtain:
h i £ ¤
E (3X + 4Y )2 = 9E X 2 + 24E [X] + 16:
3.6 Variances
3.6.1 De…nition
While the population mean ¹ = E [X] is used to measure the central tendency
of the random variable X; the variance V ar [X] ´ ¾2 ´ ¾ 2X is used to measure
the dispersion or volatility of X: For example if X is the return on some stock
then E [X] is used to measure the expected return while V ar [X] provides a
measure of the riskiness of that particular stock.
V ar [X + c] = V ar [X] :
Proof. Using the rules for E [ ], and expanding the brackets to have an
exponent of 1 in the de…nition of the variance, we …nd that:
h i
V ar [X] = E (X ¡ ¹)2
£¡ ¢¤
= E X 2 ¡ 2¹X + ¹2
£ ¤ £ ¤
= E X 2 + E [¡2¹X] + E ¹2
£ ¤
= E X 2 ¡ 2¹E [X] + ¹2 :
By de…nition:
¹ = E [X]
so that:
£ ¤
V ar [X] = E X 2 ¡ 2E [X] E [X] + E [X]2
£ ¤
= E X 2 ¡ E [X]2 :
£ ¤
Theorem 76 E X 2 = E [X]2 + V ar [X] :
£ ¤
Theorem 77 E X 2 ¸ E [X]2 with equality only when X is a degenerate ran-
dom variable.3
Proof. This follows from the fact that V ar [X] ¸ 0 and hence:
£ ¤ £ ¤ £ ¤
E X 2 = E X 2 + V ar [X] ¸ E X 2
1 1 1
E [X] = 1 £ + 2 £ + ¢ ¢ ¢ + 6 £ = 3:5:
6 6 6
3 This follows from Result 5 since V ar [X] ¸ 0 and hence:
£ ¤ £ ¤
E X2 ¸ E X2
with equality only when X is a degenerate random variable.
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 115
(b ¡ a)2
V ar [X] = :
12
Proof. We have already seen that:
a+b
E [X] =
2
and
£ ¤ b2 + ab + a2
E X2 = :
3
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 116
Consequently we have:
£ ¤
V ar [X] = E X 2 ¡ E [X]2
µ ¶2
b2 + ab + a2 a+b
= ¡
3 2
(b ¡ a)2
= :
12
3.7 Covariances
3.7.1 De…nitions
De…nition 80 The covariance of two random variables X and Y is de…ned as:
If Cov [X; Y ] > 0 then there exists some positive linear relationship between
X and Y so that when X is above (below) average then Y tends to be above
(below) average. For example if X is ice cream consumption and Y is the
temperature, one would expect that Cov [X; Y ] > 0; that is above average ice
cream consumption would be associated with above average temperatures.
If Cov [X; Y ] < 0 then there exists some negative linear relationship between
X and Y so that when X is above (below) average then Y tends to be below
(above) average. For example if X is ice cream consumption and Y is rainfall,
one would expect that Cov [X; Y ] < 0; that is above (below) average ice cream
consumption would be associated with below (above) average rainfall.
then:
6 1
½= 1 1 = :
9 16 2
2 2
3.7.2 Independence
Suppose we have two random variables X and Y and we wish to say that the two
random variables are independent of each other. For discrete random variables
the usual de…nition of independence is that if the joint probability distribution
satis…es
Pr [X = xi ; Y = yj ] = Pr [X = xi ] Pr [Y = yj ]
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 118
Theorem 85 If Cov [X; Y ] = 0 it does not follow that X and Y are indepen-
dent.
Proof. We show this result by providing a counter-example; that is two
random variables with 0 covariance but which are not independent. Suppose X
can take on the outcomes ¡1; 0; 1 and Y can take on the outcomes 0; 1; 2: The
probabilities of the various combinations of outcomes are given by:
Y
0 1 2
1
-1 0 4 0
1 1
X 0 4 0 4
1
1 0 4 0
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 119
Therefore:
£ ¤
Cov [X; Y ] = E X 2 ¡ 2E [X] E [Y ] + E [X] E [Y ]
= E [XY ] ¡ E [X] E [Y ] :
Y = aX1 + bX2 + c:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 120
E [Y ] = aE [X1 ] + bE [X2 ] + c:
For example given two assets (say bonds and stocks) with returns : X1 and X2 ;
and if X1 has an expected return of 4% or E [X1 ] = 4 and if X2 has an expected
return of 10% or E [X2 ] = 10; and we have a portfolio with 30% in X1 and 70%
in X2 or Y = 0:3X1 + 0:7X2 ; then the expected return on the portfolio is:
E [Y ] = E [0:3X1 + 0:7X2 ]
= 0:3E [X1 ] + 0:7E [X2 ]
= 0:3 £ 4 + 0:7 £ 10
= 8:2
is positive semi-de…nite.
4
Theorem 94 If V ar [X1 ] 6= 0 and V ar [X2 ] 6= 0 then: ¡1 · ½ · 1:
Proof. Using the leading principal minors and the fact that the matrix in
the previous theorem is positive semi-de…nite we have:
· ¸
V ar [X1 ] Cov [X1 ; X2 ] 2
det = V ar [X1 ] V ar [X2 ] ¡ Cov [X1 ; X2 ]
Cov [X1 ; X2 ] V ar [X2 ]
à !
2
Cov [X1 ; X2 ]
= V ar [X1 ] V ar [X2 ] 1 ¡
V ar [X1 ] V ar [X2 ]
¡ ¢
= V ar [X1 ] V ar [X2 ] 1 ¡ ½2
¸ 0:
Proof. From
4 Using the leading principal minors and the fact that the matrix in Result 2 is positive
semi-de…nite we have:
· ¸
V ar [X1 ] Cov [X1 ; X2 ]
det = V ar [X1 ] V ar [X2 ] ¡ Cov [X1 ; X2 ]2
Cov [X1 ; X2 ] V ar [X2 ]
à !
Cov [X1 ; X2 ]2
= V ar [X1 ] V ar [X2 ] 1 ¡
V ar [X1 ] V ar [X2 ]
¡ ¢
= V ar [X1 ] V ar [X2 ] 1 ¡ ½2
¸ 0:
¡ ¢
From this it follows that: 1 ¡ ½2 ¸ 0 or ¡1 · ½ · 1: If ½ 6= §1 then the both leading
principal minors are strictly positive and the matrix is positive de…nite.
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 122
An Example
Suppose that:
V ar [X1 ] = 9; Cov [X1 ; X2 ] = 6
V ar [X2 ] = 16:
The correlation coe¢cient is then given by:
6 1
½= p p =
9 16 2
and the variance covariance matrix is:
· ¸
9 6
6 16
which you can verify is positive de…nite.
If Y = 0:3X1 + 0:7X2 then
2 2
V ar [Y ] = (0:3) V ar [X1 ] + 2 (0:3) (0:7) Cov [X1 ; X2 ] + (0:7) V ar [X2 ]
= 0:32 £ 9 + 2 £ 0:3 £ 0:7 £ 6 + (0:7)2 £ 16
= 11:17
p
and so the standard deviation is ¾Y = 11:17 = 3:34:
R = ! o ro + ! 1 R1 + ! 2 R2 :
R = (1 ¡ ! 1 ¡ !2 ) ro + ! 1 R1 + ! 2 R2
or:
R = ro + ! 1 (R1 ¡ ro ) + !2 (R2 ¡ ro )
where R1 ¡ ro and R2 ¡ ro are the returns in excess of the risk free rate ro :
Let r = E [R] be the return on the portfolio which is given by:
or
r~ = !1 r~1 + !2 r~2
where r~ = r ¡ ro is the expected return of the portfolio net of the risk free rate
ro while r~1 = r1 ¡ ro and r~2 = r2 ¡ ro are the expected returns on asset 1 and
asset 2 net of the risk free rate:
The risk of the portfolio is given by the variance which is
Suppose you are a portfolio manager. Your client wants to obtain an ex-
pected return on this portfolio of r: Your job is to …nd the portfolio weights:
!1 and ! 2 (with ! o = 1 ¡! 1 ¡ !2 ) which achieves this but at the minimum
possible risk.
This leads to the constrained minimization problem of choosing ! 1 and ! 2
to minimize5 :
!21 ¾21 + 2! 1 ! 2 ¾ 12 + ! 22 ¾ 22
2
subject to the constraint:
r~ = ! 1 r~1 + ! 2 r~2 :
is independent of r~: This means that the relative proportion of the two risky
assets in the minimum risk portfolio is independent of required rate of return r~:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 125
3.8.3 An Example
Suppose that Ro = 1 with probability 1 and:
E [R1 ] = 5; V ar [R1 ] = 25
E [R2 ] = 9; V ar [R2 ] = 49
Cov [R1 ; R2 ] = 14:
The expected return on the portfolio then satis…es:
E [R] = ! 1 E [R1 ¡ ro ] + ! 2 E [R2 ¡ ro ]
= 1 + ! 1 (5 ¡ 1) + !2 (9 ¡ 1)
= 1 + 4!1 + 8!2
while the risk of the portfolio is:
V ar [R] = 25! 21 + 28! 1 ! 2 + 49!22 :
Suppose you wish to obtain an expected return of r = 7 (or r~ = 7 ¡ 1 = 6)
at the least possible risk. This leads to the constrained minimization problem
of choosing ! 1 and ! 2 to minimize:
25! 21 + 28! 1 ! 2 + 49!22
2
subject to the constraint:
7 = 1 + 4!1 + 8!2
or:
6 ¡ 4! 1 ¡ 8! 2 = 0:
This leads to the Lagrangian:
25! 21 + 28!1 ! 2 + 49! 22
L (¸; !1 ; ! 2 ) = + ¸ (6 ¡ 4! 1 ¡ 8! 2 )
2
and the …rst-order conditions:
@L (¸¤ ; ! ¤1 ; !¤2 )
= 6 ¡ 4! ¤1 ¡ 8!¤2 = 0
@¸
@L (¸¤ ; ! ¤1 ; !¤2 )
= 25!¤1 + 14!¤2 ¡ 4¸¤ = 0
@! 1
@L (¸¤ ; ! ¤1 ; !¤2 )
= 14!¤1 + 49!¤2 ¡ 8¸¤ = 0
@! 2
with second-order conditions being satis…ed since:
2 3
0 ¡4 ¡8
H = det 4 ¡4 25 14 5 = ¡1488 < 0:
¡8 14 49
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 126
Y = a1 X1 + a2 X2 + a3 X3 + ¢ ¢ ¢ + an Xn
and
Y = a1 X1 + a2 X2 + a3 X3 + ¢ ¢ ¢ + an Xn
then
3.8.5 An Example
If X1 ; X2 and X3 are uncorrelated and
n!
Pr [Y = k] = pk (1 ¡ p)n¡k :
k! (n ¡ k)!
Therefore we have:
n
X n!
E [Y ] = k£ pk (1 ¡ p)n¡k
k! (n ¡ k)!
k=0
and
n
X n!
V ar [Y ] = (k ¡ E [Y ])2 £ pk (1 ¡ p)n¡k :
k! (n ¡ k)!
k=0
Neither of these are easy to evaluate but in fact simplify considerably after
a great deal of work. Using a proof by induction you can show that
E [Y ] = np and V ar [Y ] = np (1 ¡ p) :
It is much easier to prove these results using the fact that Y can be written
as the sum of n independent Bernoulli’s: X1 ; X2 ; : : : Xn or:
Y = X1 + X2 + X3 + ¢ ¢ ¢ + Xn :
E [Xi ] = 1 £ p + 0 £ (1 ¡ p) = p
£ ¤
E Xi2 = 12 £ p + 02 £ (1 ¡ p) = p
£ ¤
V ar [Xi ] = E Xi2 ¡ E [Xi ]2 = p ¡ p2 = p (1 ¡ p) :
Therefore E [Y ] = np since:
= np (1 ¡ p) :
Thus for example if I ask n = 2000 and p = 0:3 so that: Y » B (0:3; 2000)
then:
E [Y ] = 2000 £ 0:3 = 600
V ar [Y ] = 2000 £ 0:3 £ (1 ¡ 0:3) = 420:
where:
¡ ¢
¹
Xi ¡ X
ai = Pn ¡ ¢ :
¹ 2
j=1 Xj ¡ X
Proof. First note that since the ai 0 s depend on the Xi 0 s which are assumed
to be nonrandom by A5, it follows that the ai 0 s are nonrandom. We can
therefore pull E [ ] past the ai 0 s . Now using A2 we have:
" #
h i X n
E ¯^ = E ¯+ ai ei
i=1
n
X
= ¯+ ai E [ei ]
| {z }
i=1
=0 by A2
= ¯:
we have:
h i Xn
^
V ar ¯ = a2i V ar [ei ]
i=1
| {z }
=¾ 2 by A3
Xn
= ¾2 a2i
i=1
2
¾
= Pn ¡ ¢ :
¹ 2
j=1 Xj ¡ X
Y = a1 X1 + a2 X2 + a3 X3 + ¢ ¢ ¢ + an Xn :
Y = aT X
or
n
X
E [Y ] = ai E [Xi ]
i=1
or
E [Y ] = aT E [X]
or:
n
X
Yi = aij Xj for i = 1; 2; : : : m
j=1
or in matrix notation:
Y = AX
where:
2 3 2 3 2 3
Y1 a11 a12 a13 ¢¢¢ a1n X1
6 Y2 7 6 a21 a22 a23 ¢¢¢ a2n 7 6 X2 7
6 7 6 7 6 7
6 Y3 7 6 a31 a32 a33 ¢¢¢ a3n 7 6 X3 7
Y =6 7; A = 6 7; X = 6 7:
6 .. 7 6 .. .. .. .. .. 7 6 .. 7
4 . 5 4 . . . . . 5 4 . 5
Ym am1 am2 am3 ¢¢¢ amn Xn
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 134
E [Y ] = AE [X]
where:
2 3
E [Y1 ]
6 E [Y2 ] 7
6 7
6 E [Y3 ] 7
E [Y ] = 6 7:
6 .. 7
4 . 5
E [Yn ]
Variances
If we only have one linear combination so that:
n
X
Y = ai Xi = aT X
i=1
and the Xi0 s are correlated then we can no longer just square the coe¢cients,
take the variance and sum. Instead it can be shown that:
P
Theorem 107 If Y = ni=1 ai Xi then
n X
X n
V ar [Y ] = ai aj Cov [Xi ; Xj ]
i=1 j=1
Pn
Theorem 108 If Y = i=1 ai Xi then:
n
X n X
X n
V ar [Y ] = a2i V ar [Xi ] + 2 ai aj Cov [Xi ; Xj ] :
i=1 i=1 j=i+1
Pn
Theorem 109 If Y = i=1 ai Xi then:
n
X
V ar [Y ] = a2i V ar [Xi ]
i=1
+2a1 a2 Cov [X1 ; X2 ] + 2a1 a3 Cov [X1 ; X3 ] + ¢ ¢ ¢ + 2a1 an Cov [X1 ; Xn ]
+2a2 a3 Cov [X2 ; X3 ] + 2a2 a4 Cov [X2 ; X4 ] + ¢ ¢ ¢ + 2a2 an Cov [X2 ; Xn ]
+2a3 a4 Cov [X3 ; X4 ] + 2a3 a5 Cov [X3 ; X5 ] + ¢ ¢ ¢ + 2a3 an Cov [X3 ; Xn ]
..
.
+2an¡1 an Cov [Xn¡1 ; Xn ] :
It turns out that the best way to proceed is to generalize the notation of
V ar [X] to allow X to be an n £ 1 random vector.
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 135
Proof. This follows from the previous theorem and the fact that vari-
ances£ are ¤always positive so that variances are always none negative so that:
V ar aT X ¸ 0 and hence:
£ ¤
aT V ar [X] a = V ar aT X ¸ 0
V ar [AX] = AV ar [X] AT :
We also have:
CHAPTER 3. INTEGRATION AND RANDOM VARIABLES 137
^ is:
Theorem 116 The variance-covariance matrix of ¯
h i ¡ ¢
^ = ¾2 X T X ¡1 :
V ar ¯
Proof. We have:
h i
^
V ar ¯ = V ar [¯ + Ae]
= V ar [Ae]
= ¾ AAT :
2
¡ ¢¡1 T ¡ ¢¡1
Since A = X T X X and AT = X X T X we have:
h i
V ar ¯^ = ¾ 2 AAT
¡ ¢¡1 T ³ ¡ T ¢¡1 ´
= ¾2 X T X X X X X
| {z }
=AT
¡ ¢¡1 T ¡ T ¢¡1
¾ XT X
2
X X X X
| {z }
=I
¡ ¢¡1
= ¾ XT X
2
:
Chapter 4
Dynamics
4.1 Introduction
Di¤erence equations, and their continuous time analogues, di¤erential equations,
are often used to describe and predict how economic variables change over time;
for example, in describing movements in the business cycle.
A basic understanding of trigonometry turns out to be important for dif-
ference and di¤erential equations. Strange and wonderful as it may seem,
trigonometry in turn is very closely related to complex
p numbers, that is num-
bers which involve the square root of ¡1 or i ´ ¡1: We therefore begin with
a review of trigonometry, go on from there to show the deep connection with
complex numbers, and then proceed to di¤erence and di¤erential equations.
4.2 Trigonometry
4.2.1 Degrees and Radians
In every day life we typically measure angles using degrees. A full turn for
example is 360± , a right-angle is 90± . In mathematics we typically use radians
to measure degrees. With radians a full turn is 2¼ instead of 360± ; a right-angle
is ¼2 instead of 90± while a 45± angle would be ¼4 : In general we have:
2¼
radians = £ degrees.
360
|{z}
=0:0175
138
CHAPTER 4. DYNAMICS 139
The two basic trigonometric functions are cos (x) and sin (x) which are plotted
below:
0.5
-10 -5 0 5 10
x
-0.5
-1
y = sin (x)
0.5
-10 -5 0 5 10
x
-0.5
-1
y = cos (x)
The functions sin (x) and cos (x) have the following properties:
d sin(x)
7. dx = cos (x) ;
d cos(x)
8. dx = ¡ sin (x) ;
9. sin (µ 1 + µ 2 ) = cos (µ1 ) sin (µ2 ) + cos (µ 2 ) sin (µ1 ) ;
10. cos (µ1 + µ2 ) = cos (µ 1 ) cos (µ 2 ) ¡ sin (µ1 ) sin (µ 2 ) ;
x2 x4 x6
11. cos (x) = 1 ¡ 2! + 4! ¡ 6! +¢¢¢ ;
x3 x5 x7
12. sin (x) = x ¡ 3! + 5! ¡ 7! +¢¢¢ :
The last two follow from the Taylor series around xo = 0; the fact that
cos (0) = 1 and sin (0) = 0:
Theorem 118
d tan (x) 1
= >0
dx cos (x)2
We can therefore de…ne the inverse function: arctan (x) which satis…es:
x2 + 1 = 0:
This does not have a solution amongst ordinary or more precisely real numbers
since it implies that:
x2 = ¡1
CHAPTER 4. DYNAMICS 141
x2 ¸ 0:
We can however invent a new class of numbers, which turn out to be surpris-
ingly useful, called complex numbers where the solution to x2 = ¡1 is simply
de…ned to exist as a new kind of number, neither positive nor negative, but
where:
p
x = ¡1 ´ i:
Many polynomials do not have any real roots, but any polynomial will have
roots if one allows for complex numbers. For example the quadratic
x2 ¡ 6x + 13 = 0
has no real roots since from the usual formula the roots would be:
q
p
6 § (¡6)2 ¡ 4 £ 13 6 § ¡16
=
2 2
p
and since the expression inside is negative. Amongst complex numbers
p
though we have that since ¡16 = 4i that the roots are:
6 § 4i
2
or the two roots are:
x1 = 3 + 2i and x2 = 3 ¡ 2i:
a + bi
where a and b are real numbers: For example given the complex number 3 + 2i
we have a = 3 and b = 2:
Re [a + bi] = a:
Im [a + bi] = b:
Re [3 + 2i] = 3
Im [3 + 2i] = 2:
Theorem 123 The conjugate of the product of two complex numbers is the
product of the conjugate so that:
An Example
We verify this theorem using the following example. Note that:
and so:
However, it is also true that we get the same answer if we calculate the
product of the conjugates as:
For example
p
j 3 + 4i j= 32 + 42 = 5:
Example 1
Consider
p the complex
p number 1 + 1i:
¡ ¢It follow from De Moivre’s theorem that
r = 12 + 12 = 2 and µ = arctan 11 = ¼4 and so:
p ³ ³¼ ´ ³ ¼ ´´
1 + 1i = 2 cos + i sin :
4 4
¡ ¢ ¡ ¢
Verify this using the fact that cos ¼4 = p12 and sin ¼4 = p12 :
Furthermore we have:
³p ´5 µ µ 5¼ ¶ µ ¶¶
5¼
5
(1 + 1i) = 2 cos + i sin
4 4
= ¡4 ¡ 4i:
You should verify this by multiplying out
(1 + 1i) £ (1 + 1i) £ (1 + 1i) £ (1 + 1i) £ (1 + 1i)
and by using the polar form.
CHAPTER 4. DYNAMICS 146
Example 2
Other examples using the results from above are that:
n
(3 + 4i) = 5n (cos (0:927 £ n) + i sin (0:927 £ n))
(¡3 + 4i)n = 5n (cos (2:214 £ n) + i sin (2:214 £ n))
(3 ¡ 4i)n = 5n (cos (5:355 £ n) + i sin (5:355 £ n)) :
(2 + i) (2 + i) = 3 + 4i:
from the Taylor series for cos (µ) and sin (µ) : We therefore have (the really
mind-boggling!!)
To get a feel for some of the depth behind Euler’s formula consider setting
µ = ¼: We then have:
or
e¼i + 1 = 0
which unites the …ve most fundamental numbers: e; ¼; i; 1 and 0 into one simple
formula. Taking log’s of both sides of e¼i = ¡1 we obtain ln (¡1) = ¼i:
We can also calculate ei¼=2 = i: Taking logs of both sides we …nd that
ln (i) = i ¼2 : If we now ask what sort of number is ii (mathematicians once
thought this would be a new kind of number) we …nd that it turns out to be a
¼ ¼
real number! Thus ii = eln(i)i = e 2 i£i = e¡ 2 ¼ 0:207880:
We have the following:
¯ ¯
Theorem 129 The absolute value of eµi is 1 or ¯eµi ¯ = 1 and the conjugate of
eµi is e¡µi or eµi = e¡µi :
Proof.
q
j e j= cos (µ)2 + sin (µ)2 = 1
µi
eµi = cos (µ) + i sin (µ) = cos (µ) ¡ i sin (µ) = e¡µi :
(3 + 4i)n = 5n e0:927i£n
(¡3 + 4i)n = 5n e2:214i£n
(3 ¡ 4i)n = 5n e5:355i£n :
we have:
a + bi = reµi :
3 + 4i = 5e0:927i
so that:
(3 + 4i)3 = 53 e3£0:927i
= ¡117 + 44i:
eµi + e¡µi cos (µ) + i sin (µ) + cos (¡µ) + i sin (¡µ)
=
2 2
= cos (µ)
since cos (¡µ) = cos (µ) and sin (¡µ) = ¡ sin (µ) : On your own apply the same
logic and show that:
eµi ¡ e¡µi
= sin (µ) :
2i
We therefore have that:
eµi + e¡µi
cos (µ) =
2
eµi ¡ e¡µi
sin (µ) = :
2i
These relations can be used to easily prove many trigonometric results. For
example from
and
e(µ1 +µ2 )i = eµ1 i eµ2 i = (cos (µ 1 ) + i sin (µ1 )) (cos (µ2 ) + i sin (µ 2 ))
= (cos (µ 1 ) cos (µ 2 ) ¡ sin (µ1 ) sin (µ 2 ))
+i (cos (µ 1 ) sin (µ2 ) + cos (µ2 ) sin (µ 1 ))
we can, by equating real terms with real terms and complex terms with complex
terms arrive at:
cos (µ1 + µ2 ) = cos (µ1 ) cos (µ 2 ) ¡ sin (µ1 ) sin (µ 2 )
sin (µ1 + µ2 ) = cos (µ1 ) sin (µ 2 ) + cos (µ2 ) sin (µ 1 ) :
so that:
µ ¶n
1 1
lim + i = 0:
n!1 2 2
Note how either the real and complex components get smaller and small as n
gets larger.
Now consider 1 + 1i . Since: r =j 1 + 1i j is:
p
r = 12 + 12
= 1:414 > 1
we have that:
lim (1 + i)n 6= 0:
n!1
CHAPTER 4. DYNAMICS 151
4.4.2 Example
For example suppose that Yo = 200; ® = 300; Á = 0:5 so that:
Yt = 300 + 0:5Yt¡1 :
It then follows that:
Y1 = 300 + 0:5Yo = 300 + 0:5 £ 200 = 400
Y2 = 300 + 0:5Y1 = 300 + 0:5 £ 400 = 500
Y3 = 300 + 0:5Y2 = 300 + 0:5 £ 500 = 550
Y4 = 300 + 0:5Y3 = 300 + 0:5 £ 550 = 575
Y5 = 300 + 0:5Y4 = 300 + 0:5 £ 575 = 587:5
etc::
Note in the example that Yt is increasing and appears to be approaching
some value. This is the equilibrium value Y ¤ of the process which is de…ned as:
CHAPTER 4. DYNAMICS 152
Y ¤ = ® + ÁY ¤ :
Y ¤ = 300 + 0:5Y ¤
Y ¤ = 600
and so Y ¤ = 600:
4.4.3 Stability
An important question is if we start at any Yo ; does Yt always approach Y ¤ : If
it does then we say that the di¤erence equation is stable.
lim Yt = Y ¤ :
t!1
For example suppose you have a ball and a teacup as illustrated below. If you
take the teacup and put a small ball anywhere inside it the ball eventually comes
to rest at the bottom of the teacup. This is an example of stable dynamics
with the bottom of the teacup a stable equilibrium point. If however we turn
the teacup over then the top of the teacup is an equilibrium point since if we
put the ball exactly at this point it will remain there forever if nothing disturbs
it. If however the ball starts anywhere except at the top of the cup or if it is
slightly disturbed while it is at the top of the cup, then it will move away from
the equilibrium. This then is an example of unstable dynamics with the top
of the teacup an unstable equilibrium point.
Just as with the teacup example, it turns out that some di¤erence equations
are stable and some are unstable. The above example turns out to be stable.
If instead
Yt = 300 + 2Yt¡1
CHAPTER 4. DYNAMICS 153
Figure 4.1:
CHAPTER 4. DYNAMICS 154
with say Yo = 200 then this is unstable. To see this note that:
Y1 = 300 + 2Yo = 300 + 2 £ 200 = 700
Y2 = 300 + 2Y1 = 300 + 2 £ 700 = 1700
Y3 = 300 + 2Y2 = 300 + 2 £ 1700 = 3700
Y4 = 300 + 2Y3 = 300 + 2 £ 3700 = 7700
Y5 = 300 + 2Y4 = 300 + 2 £ 7700 = 15700
etc:
which does not approach Y ¤ given by
300
Y¤ = = ¡300:
1¡2
The question then is under what circumstances is a di¤erence equation stable
and under what circumstances is it unstable. We can answer this question pre-
cisely for a …rst-order linear di¤erence equation by de…ning Yt¤ as the deviation
from the equilibrium value Y ¤ or
Yt¤ ´ Yt ¡ Y ¤
so that: Yt = Yt¤ +Y ¤ : We therefore have:
¡ ¤ ¢
Yt¤ + Y ¤ = ® + Á Yt¡1 +Y¤
| {z } | {z }
Yt Yt¡1
®Á ¤
= ®+ + ÁYt¡1 ::
1¡Á
| {z }
=Y ¤
Thus the Y ¤ on the left side cancels with the Y ¤ on the right side and we have:
Yt¤ = ÁYt¡1
¤
= Á2 Yt¡2
¤
..
.
= Át Y0¤
or
Yt¤ = Át Y0¤ :
Recall that Yt¤ = Yt ¡ Y ¤ : It therefore follows that:
CHAPTER 4. DYNAMICS 155
Theorem 134 The solution to a …rst order linear di¤erence equation takes the
form:
Yt = Y ¤ + Át (Yo ¡ Y ¤ ) :
lim Át = 0
t!1
Theorem 135 The di¤erence equation Yt = ® + ÁYt¡1 is stable if and only if:
¡1 < Á < 1:
Yt = Ct + It + Gt :
It = I;
Gt = G
Yt = Ct + It + Gt
= C + cYt¡1 + I + G
or
Yt = (C + I + G) + |{z}
c Yt¡1
| {z }
® Á
Yt = 300 + 0:5Yt¡1 :
600
500
400
300
200
100
0 2 4 6 8 10
t :
¡ 1 ¢t
Yt = 600 ¡ 200 2
Qdt = a ¡ bPt
Qst = c + dPt¡1
CHAPTER 4. DYNAMICS 157
where Qdt is the quantity demanded, Qst is the quantity supplied and Pt is the
price. In equilibrium: Qdt = Qst so that price Pt follows a …rst-order linear
di¤erence equation given by:
a ¡ bPt = c + dPt¡1
or:
a¡c d
Pt = ¡ Pt¡1 :
b b
To solve this note that the equilibrium price P ¤ is:
a¡c
a¡c
P¤ = b
=
1 + db b+d
so that:
µ ¶t
¡d
Pt = P ¤ + (Po ¡ P ¤ ) :
b
Note that because ¡d b is a negative number, the actual price will, over consec-
utive years, over and undershoot the equilibrium price.
Stability requires that d < b or that the slope of the supply curve be less
than the slope of the demand curve.
Yt = ® + Á1 Yt¡1 + Á2 Yt¡2
Y ¤ = ® + Á1 Y ¤ + Á2 Y ¤
so that:
Theorem 137 The equilibrium value for a second-order linear di¤erence equa-
tion is given by:
®
Y¤ = :
1 ¡ Á1 ¡ Á2
CHAPTER 4. DYNAMICS 158
Yt¤ = Á1 Yt¡1
¤ ¤
+ Á2 Yt¡2
so that Yt¤ obeys the same di¤erence equation but without the constant ®:
To solve the di¤erence equation in this form we hazard a guess that:
Yt¤ = Art
for some A and r: Substituting Art for Yt¤ ; Art¡1 for Yt¡1
¤ ¤
; and Art¡2 for Yt¡2
it follows that:
Cancelling the A and dividing both sides by rt¡2 we …nd that r is a root of the
characteristic polynomial de…ned by:
r2 ¡ Á1 r ¡ Á2 :
Yt = Y ¤ + A1 r1t + A2 r2t :
Thus a stability requires that j r1 j< 1 and j r2 j< 1 in which case r1t ! 0
and r2t ! 0 as t ! 1 and:
Thus we have:
CHAPTER 4. DYNAMICS 159
Yt = ® + Á1 Yt¡1 + Á2 Yt¡2
To calculate A1 and A2 we use the fact that Yo and Y1 are given and substi-
tute t = 0 and t = 1 in
Yt = Y ¤ + A1 r1t + A2 r2t
to obtain:
Yo = Y ¤ + A1 + A2
Y1 = Y ¤ + A1 r1 + A2 r2 :
It can be shown that A1 and A2 will also be complex and conjugates of each
other. Thus if A1 = c + di and A2 = c ¡ di are written in polar form we have:
A1 = Ae®i ; A2 = Ae¡®i
CHAPTER 4. DYNAMICS 160
Yt = Y ¤ + A1 r1t + A2 r2t
¡ ¢t ¡ ¢t
= Y ¤ + Ae®i reµi + Ae¡®i re¡µi
µ i(µt+®) ¶
e + e¡i(µt+®)
= Y ¤ + 2Art
2
¤ t
= Y + 2Ar cos (µt + ®) :
Thus with complex roots Yt will be a damped cosine wave if r < 1 since in this
case rt ! 0 as t ! 1 and so Yt will converge to Y ¤ :
If r > 1 Yt will be an exploding cosine wave since in this case rt ! 1 as
t ! 1 and so Yt will diverge from Y ¤ :
Thus in general complex roots result in a kind of wave behavior for Yt :
r2 ¡ 1:3r + 0:4 = 0
so that:
q
¡ (¡1:3) § (¡1:3)2 ¡ 4 £ 0:4
r1 ; r2 =
2
or:
4 1
r1 = ; r2 = :
5 2
Since j r1 j< 1 and j r2 j< 1 this di¤erence equation is stable; that is no matter
what the starting values Yt will converge to the equilibrium value Y ¤ = 1000:
The general solution is then:
µ ¶t µ ¶t
4 1
Yt = 1000 + A1 + A2 :
5 2
1000
950
900
850
800
0 5 10 15 20
t :
r2 ¡ 0:7r ¡ 0:4 = 0
so that:
q
¡ (¡0:7) § (¡0:7)2 ¡ 4 £ (¡0:4)
r1 ; r2 =
2
or:
r1 = 1:07; r2 = ¡0:373:
800
600
400
200
0 5 10 15 20 25 30
t
-200
:
Plot of Yt
the di¤erence equation is stable. That is no matter what the starting values Yt
will converge to the equilibrium value Y ¤ = 200:
The general solution is then:
µ ¶t µ ¶t
1 1 1 1
Yt = 200 + A1 + i + A2 ¡ i :
2 2 2 2
Here
1 1 1 ¼
+ i = p e4i
2 2 2
1 1 1 ¡¼i
¡ i = p e 4
2 2 2
p
¡50 + 30i = 3400e2:601173i
p
¡50 ¡ 30i = 3400e¡2:601173i
since:
µ ¶
30
arg (¡50 + 30i) = arctan +¼
¡50
= 2:601173:
CHAPTER 4. DYNAMICS 165
Therefore:
µ ¶t ³¼ ´
p 1
Yt = 200 + 2 £ 3400 £ p £ cos t + 2:601173 :
2 4
This is plotted below:
220
200
180
160
140
120
100
0 5 10 15 20
t :
Plot of Yt
r2 ¡ 2r + 2 = 0
so that:
r1 = 1 + i; r2 = 1 ¡ i:
Since
p p
j r1 j=j r2 j= 12 + 12 = 2 > 1
the di¤erence equation is unstable. That is no matter what the starting values
Yt will diverge from the equilibrium value Y ¤ = 100:
The general solution is then:
Since:
p ¼i
1+i = 2e 4
p ¡¼i
1¡i = 2e 4
¼
i = e2
500
t
5 10 15 20
0
-500
-1000
-1500
-2000
-2500
:
Plot of Yt
CHAPTER 4. DYNAMICS 167
Yt = Ct + It + Gt :
Gt = G:
As before consumption depends on income lagged one period via the con-
sumption function
Yt = Ct + It + Gt
= C + cYt¡1 + I + ° (Yt¡1 ¡ Yt¡2 ) + G
or
Yt = (C + I + G) + (c + °)Yt¡1 ¡ ° Yt¡2
| {z } | {z } |{z}
® Á1 Á2
It = I + ° (Yt¡1 ¡ Yt¡2 )
= I + ° (Y ¤ ¡ Y ¤ )
= I:
@Y ¤ 1
so that @G = 1¡c ; as before.
CHAPTER 4. DYNAMICS 168
Ct = 100 + 0:5Yt¡1
It = 100 + 0:8 (Yt¡1 ¡ Yt¡2 )
Gt = 100
and Yo = Y1 = 150:
In this case we have the di¤erence equation:
r2 ¡ 1:3r + 0:8 = 0
r1 = 0:65 + 0:61441i
r2 = 0:65 ¡ 0:61441i:
Since j0:65 + 0:61441ij = 0:89443 < 1 this is stable. Alternatively, since the
roots are complex and jÁ2 j = 0:8 < 1 the di¤erence equation is stable.
Di¤erence equations are used when we think of time as being discrete. Economic
data is inevitably in discrete time whether it be weekly, monthly or annual.
However, we tend to experience time as being continuous, and it is often easier
to work with continuous time. In this case dynamics involves not di¤erence
equations but di¤erential equations.
4.6.1 De…nitions
De…nition 142 A …rst-order linear di¤erential equation consists of an equation
of motion of the form:
y0 (t) + a1 y (t) = b
The problem is to solve for y (t) : Often the dependence of y (t) on t is omitted
so we write y instead of y (t) and y 0 instead of y 0 (t). Thus a …rst-order linear
di¤erential equation is sometimes written instead as:
y0 + a1 y = b:
y0 (t) + a1 y (t) = 0
or:
ln (y (t)) = ¡a1 t + ao
y (t) = Ae¡a1 t
y (0) = A
so that:
Theorem 143 The solution to y 0 (t) + a1 y (t) = 0 with y (0) given is:
independent of y (0) :
For example given y 0 (t) + 4y (t) = 0 with y (0) = 10 we have the solution:
y (t) = 10e¡4t
which is stable since y (t) ! 0 as t ! 1 as can be seen by the plot below:
10
0 1 2 3 4 5
t :
y (t) = 10e¡4t
Verify this on your own by calculating y (t) for say t = 1; 4; 10 etc:.
On the other hand given: y 0 (t) ¡ 3y (t) = 0 with y (0) = 5 the solution is:
y (t) = 5e3t
which is unstable as can be seen by the plot below:
22
20
18
16
14
12
10
8
6
0 0.1 0.2 0.3 0.4 0.5
t
y (t) = 5e3t
CHAPTER 4. DYNAMICS 171
y 0 (t) + a1 y (t) = b:
If y (t) ever reaches the equilibrium value y¤ then it stays there forever.
Thus if y (t) = y ¤ then y0 (t) = 0 so that:
b
y¤ = :
a1
Let y~ (t) = y (t) ¡ y ¤ be the deviation of y (t) from y ¤ : We then have:
so that replacing y (t) with y (t) = y~ (t) + y ¤ and y0 (t) with y~0 (t) it follows that:
y~0 (t) + a1 (~
y (t) + y ¤ ) = b
or:
Theorem 144 The solution to: y 0 (t) + a1 y (t) = b with y (0) given is:
We therefore have:
a1 > 0
in which case
lim y (t) = y¤
t!1
independent of y (0) :
CHAPTER 4. DYNAMICS 172
4.6.4 Example 1:
Consider: y0 (t) + 4y (t) = 8 with y (0) = 10: Then
8
y¤ = =2
4
with a solution:
y (t) = 2 + 8e¡4t
10
0 1 2 3 4 5
t
y (t) = 2 + 8e¡4t
4.6.5 Example 2
Consider: y0 (t) ¡ 3y (t) = 9 with y (0) = 6: Then
9
y¤ = = ¡3
¡3
with a solution:
y (t) = ¡3 + 9e3t
CHAPTER 4. DYNAMICS 173
35
30
25
20
15
10
Then if y (t) = y ¤ ; the equilibrium value, then y00 (t) = y0 (t) = 0 so that:
4.7.1 Solution
To solve this di¤erential equation we will …rst attempt to eliminate b: To this
end de…ne
y~ (t) = y (t) ¡ y ¤
so that
Replacing y (t) by y~ (t) + y ¤ ; y0 (t) with y~0 (t) and y 00 (t) with y~00 (t) we have:
We saw for the …rst-order di¤erential equation that the solution took the
form:
y~ (t) = Aert :
Suppose we assume this to be true and ask what value r will take. To answer
this set y~ (t) = Aert so that y~0 (t) = rAert and y~00 (t) = r2 Aert : It follows that:
r|2 Aert
{z } + a1 rAe
rt
| {z } + a2 Ae
rt
|{z} = 0
y 00 (t)
=~ y0 (t)
=~ =~
y(t)
or:
r2 + a1 r + a2 = 0
is:
r2 + a1 r + a2 :
r2 + a1 r + a2 = 0
Theorem 149 The solution to: y 00 (t) + a1 y 0 (t) + a2 y (t) = b with y 0 (0) and
y (0) given takes the form:
y (0) = y¤ + A1 + A2
y 0 (0) = r1 A1 + r2 A2 :
a21 ¡ 4a2 ¸ 0
then the term under the square root sign that de…nes r1 and r2 , that is:
p
¡a1 § a21 ¡ 4a2
2
will be non-negative so that both r1 and r2 will be real. It then follows that
y (t) is stable if and only if both roots are negative, that is:
r1 < 0
r2 < 0:
then the term under the square root sign that de…nes r1 and r2 , that is:
p
¡a1 § a21 ¡ 4a2
2
will be negative so that both r1 and r2 will be complex numbers, or more
precisely complex conjugates with:
r1 = c + di
r2 = c ¡ di
CHAPTER 4. DYNAMICS 176
where:
¡a1
c =
p2
4a2 ¡ a21
d = :
2
Since:
it follows that
is stable if and only if the real part of the two roots r1 and r2 of the characteristic
polynomial are negative.
a1 > 0:
then:
4
y¤ = =2
2
and the quadratic that de…nes r1 and r2 is:
r2 + 4r + 2 = 0
with solutions:
p
r1 = ¡2 + 2 = ¡0:5857864 < 0
p
r2 = ¡2 ¡ 2 = ¡3:414214 < 0:
CHAPTER 4. DYNAMICS 177
it follows that:
· ¸· ¸ · ¸
1p 1p A1 ¡2
=
¡2 + 2 ¡2 ¡ 2 A2 1
so:
· ¸ · ¸¡1 · ¸
A1 1p 1p ¡2
=
A2 ¡2 + 2 ¡2 ¡ 2 1
· 3p ¸
¡ 4p 2 ¡ 1
= 3 :
4 2¡1
1.5
0.5
0 2 4 6 8 10
t
Plot of y (t)
Note how Y (t) approaches Y ¤ = 2; re‡ecting the fact that this di¤erential
equation is stable.
so that:
¡6
y¤ = =3
¡2
and the quadratic that de…nes r1 and r2 is:
r2 ¡ 6r ¡ 2 = 0
with solutions:
p
r1 = 3 + 11 = 6:32 > 0
p
r2 = 3 ¡ 11 = ¡0:32 < 0:
Since r1 > 0 it follows that (even though r2 < 0) that the di¤erential equation
is unstable. The exact solution is:
µ ¶
3 5p p 1 ³ p ´p p
y (t) = 3 + ¡ + 11 e(3+ 11)t ¡ 10 + 3 11 11e(3¡ 11)t
2 11 22
then:
6
y¤ = =2
3
CHAPTER 4. DYNAMICS 179
r2 + 2r + 3 = 0
so that:
p
r1 = ¡1 + i 2
p
r2 = ¡1 ¡ i 2:
Since the real part of r1 and r2 ; here ¡1; is negative, it follows that the di¤er-
ential equation is stable.
The solution can be shown to be:
µ ¶
p 1 ³ p ´
y (t) = 2 ¡ 2 cos 2t ¡ p sin 2t e¡t
2
which is plotted below:
1.5
0.5
0 1 2 3 4 5
t :
Plot of y (t)
Note that it is the factor e¡t ; which insures stability e¡t ! 0 as t ! 1:
r2 ¡ 2r + 3 = 0
CHAPTER 4. DYNAMICS 180
so that:
p
r1 = 1+i 2
p
r2 = 1 ¡ i 2:
Since the real part of r1 and r2 equals 1 and hence is positive, the di¤erential
equation is unstable.
It can be shown that the solution is:
µ ¶
3 p p
y (t) = 2 + p sin 2t ¡ 2 cos 2t et
2
which is plotted below:
1600
1400
1200
1000
800
600
400
200
0 1 2 3 4 5 6 7
t
-200
:
Plot of y (t)