Demand Examples
Demand Examples
2. Use the first order conditions to express the optimal expenditures pi xi in terms of the
Lagrange multiplier λ.
4. Substitute λ back into the expressions for xi to obtain the demand function.
Next we evaluate the utility at the demand function x∗ (p, m) to obtain the indirect utility
function ( )
v(p, m) = u x∗ (p, m) .
Then we use direct computation to verify Roy’s Law:
∂v(p, m)
∂pi
− = x∗i (p, m).
∂v
∂m
Next I typically invert the indirect utility to get an expression for the Hicksian expenditure
function e(p, υ), which is the optimal value function for the constrained minimization problem
1
KC Border Preference and Demand Examples 2
so we can compute the expenditure function by solving for m in terms of v, and changing the
symbol for m to e and the symbol for v to υ. (Note the distinction between the Roman letter
vee, v, and the Greek letter ypsilon, υ.)
Then we use the envelope theorem to calculate the Hicksian compensated demands x̃(p, υ)
via
∂e(p, υ)
= x̃i (p, υ).
∂pi
On writing Lagrangeans
Some of my students have asked whether to write Lagrangeans with a plus sign or a minus sign
in front of the Lagrange multipliers, that is, whether to write
In one sense, it doesn’t matter, since the only difference is the sign of the Lagrange multiplier,
but in economic problems because of the way we use the envelope theorem, the Lagrange
multiplier usually has an interpretation as a rate of exchange, or price, and I usually want those
numbers to be positive. To do this I use the following rule of thumb:
• Write the constraint function g so that the constrain is g ⩾ 0 even if you know that it
must bind, and could be replaced by g = 0.
• For a maximization problem use a plus sign, and for a minimization problem use a minus
sign.
In all the examples I can think of off the top of my head this will result in the quantity of
interest being λ ⩾ 0 instead having the quantity of interest be −λ where λ ⩽ 0.
A frequently overlooked hypothesis of the Lagrange multiplier theorem is that the gradients
of the constraints be linearly independent at the optimum. For the case of one constraint, this
reduces to the gradient being nonzero. The budget constraint constraint function, m − p · x,
has gradient −p, which is nonzero in all the cases considered here. Henceforth I shall make no
further mention of this.
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 3
0
0 1 2 3 4 5 6
2 3
Representative contours of 5 ln x1 + ln x2 . 5
Lagrangean:
∑
n ( ∑
n )
αi ln xi + λ m − p i xi
i=1 i=1
∑n
First order conditions, using the binding constraint m = i=1 pi xi :
αi
− λ∗ pi = 0 i = 1, . . . , n.
x∗i
So
αi = λ∗ pi x∗i i = 1, . . . , n. (1)
Summing over i yields
1 = λ∗ m.
∑n
as i=1 αi = 1, so (1) becomes
pi x∗i = αi m,
that is, αi is the fraction of income spent on good i, so the demand function is
αi
x∗i (p, m) = m.
pi
∑
n ( ) ∑n ∑n
αi
v(p, m) = αi ln m = ln m − αi ln pi + αi ln αi . (2)
i=1
pi i=1 i=1
∑
(You might be tempted to write this as ln m + ni=1 αi ln (αi/pi ), which is more compact, but
it makes it harder to read the derivatives.) The envelope theorem assures us that that the
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 4
partial derivatives of v are just the partial derivatives of the Lagrangean, so it must be that
λ∗ = ∂v/∂m, the marginal utility of money, which differentiation shows us is 1/m, which we
derived in the line after (1).
Verify Roy’s Law using the partials computed from (2):
∂v αi
−
∂p pi αi
− i =− = m = x∗i (p, m).
∂v 1 pi
∂m m
Recall that the expenditure function e(gives the)level of income m needed to achieve a given
level of utility υ. It therefore satisfies v p, e(p, υ) = υ, so we can compute the expenditure
function by solving (2) for m in terms of v, and changing the symbol for m to e and the symbol
for v to υ. So rewrite (2) to get
∑
n ∑
n
υ = ln e − αi ln pi + αi ln αi ,
i=1 i=1
rearranging gives
∑
n ∑
n
ln e = υ + αi ln pi − αi ln αi ,
i=1 i=1
so exponentiating gives
∏n
p αi
e(p, υ) = exp(υ) ∏ni=1 iαi .
i=1 αi
The Hicksian compensated demands are the partial derivatives of the expenditure function,
so
∏
αj αj n
p αi
x̃j (p, υ) = e(p, υ) = exp(υ) ∏ni=1 iαi .
pj pj i=1 αi
Remark 2 This functional form is gotten by transforming the previous utility by the increasing
transformation uII = exp(uI ), so the demand should be the same, but the indirect utility and
expenditure functions will be transformed. Note that in this formulation u is zero if any xi is
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 5
zero, so at any optimum we must have x ≫ 0, and as before we may ignore the nonnegativity
constraints, and treat the first order conditions as equalities. It is also clear that u is monotonic,
so the budget constraint will bind.
When dealing with the Cobb–Douglas functional form u(x1 , . . . , xn ) = xα1 1 · · · xαnn , I have
found it convenient to write the partial derivative ∂u(x)/∂xi as αi u(x)/xi , which amounts to
writing xα−1 as xα /x.
Lagrangean:
∏
n ( ∑
n )
xαi i + λ m − p i xi
i=1 i=1
∑n
First order conditions, using the binding constraint m = i=1 pi xi :
∏n αj
j=1 xj
αi − λpi = 0, i = 1, . . . , n.
xi
∏n αj
So letting υ = j=1 xj ,
αi υ = λ∗ pi x∗i , i = 1, . . . , n. (3)
Summing over i yields
υ = λ∗ m.
∑n
as i=1 αi = 1, so (3) becomes
αi λ∗ m = λ∗ pi x∗i ,
or
pi x∗i = αi m,
that is, αi is the fraction of income spent on good i, so the demand function is
αi m
x∗i (p, m) = .
pi
n (
∏ )
α i αi
v(p, m) = m . (4)
i=1
pi
Thus ∏ ( ) αi
n αi −α n ( )
∂v m i=1 pi j −αj ∏ α i αi
= αj αj = m .
∂pj p2j pj pi
p j i=1
∂v
−αj ∏ n ( αi ) αi
∂pj pj m i=1 pi αj m
− = − ∏ ( ) αi = = x∗j (p, m).
∂v n α i pj
i=1 pi
∂m
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 6
We can compute the expenditure function by solving (4) for m in terms of v. Changing the
symbol for m to e and the symbol for v to υ, rewrite (4) as
n (
∏ )
α i αi
υ=e .
i=1
pi
Rearranging gives
n (
∏ )
p i αi
e(p, υ) = υ .
i=1
αi
∏n αj
∂e(p, υ) αj αi j=1 pj
x̃i (p, υ) = = e(p, υ) = υ ∏n αj .
∂pi pj pi j=1 αj
-1
-2
0 5 10 15 20 25 30
Representative contours of y + ln x.
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 7
Remark 3 Note that each indifference curve is a vertical translate of every other curve, and
that each intersects the x-axis. This means we may well have y∗ = 0, so the KKT first-order
conditions are relevant.
For reasons that will become clear, let us make y the numéraire (py = 1).
Then the Lagrangean is
( )
∑
n ∑
n
y+β αi ln xi + λ m − y − pi xi
i=1 i=1
∑n
First order conditions, using the binding constraint m = y + i=1 pi xi :
1 − λ∗ ⩽ 0
y ∗ (p, m) = m − β.
{
∗ m−β (m ⩾ β)
y (p, m) =
0 (m ⩽ β)
β
αi (m ⩾ β)
x∗i (p, m) = pi
m
αi m(⩽ β)
pi
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 8
{ ∑ ∑
m − β + β (ln β − ni=1 αi ln pi + ni=1 αi ln αi ) (m ⩾ β)
v(p, m) = ∑ ∑
β (ln m − ni=1 αi ln pi + ni=1 αi ln αi ) (m ⩽ β).
Or, setting
(∑
n ∑
n ) (5)
h(p) = β αi ln αi ln − αi ln pi
i=1 i=1
we have {
m − β + β ln β + h(p) (m ⩾ β)
v(p, m) =
h(p) + β ln m (m ⩽ β).
Roy’s Law:
β
αi for m ⩾ β
∂v
pi
∂pi
− = −
αi β = x∗i (p, m).
∂v
m
−
pi
for m ⩽ β
∂m
= αi
β pi
m
( ∑
n ∑
n )
e(p, υ) = υ + β − β ln β − αi ln pi + αi ln αi
i=1 i=1
= υ + β − β ln β − h(p)
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 9
for υ ⩾ υ ⩾ β ln β + h(p)
∂e(p, υ) βαj /pj
x̃j (p, υ) = = αj ( )
∂pj
exp υ−h(p) otherwise.
β
pj
4 Linear preferences
∑
n
u(x1 , . . . , xn ) = αi xi
i=1
∑n
where αi ⩾ 0, i = 1, . . . , n, and i=1 αi = 1.
Remark 4 Clearly the utility is monotonic, so the budget constraint must bind. But this
is a case where we cannot be sure a priori that x∗ ≫ 0, so we must pay attention to the
Karush–Kuhn–Tucker first-order conditions.
The Lagrangean is
∑
n ( ∑
n )
αi xi + λ m − p i xi
i=1 i=1
The KKT first-order conditions are
αi − λ∗ pi ⩽ 0
i = 1, . . . , n.
xi (αi − λ∗ pi ) = 0
This implies that λ∗ ⩾ αi/pi for each i. Can we have λ∗ > αi/pi for each i? No, for in that case
we must have x∗i = 0 for all i, which means the budget constraint does not bind. Therefore
αi
λ∗ = max .
i pi
[Note that if we had assumed the Lagrange first-order conditions held we would have the unlikely
result that λ∗ = αi/pi for all i, which is the sort of giveaway that the KKT conditions need to
be examined.]
So first consider the case that i∗ is the unique maximizer of αpii . Then
m
, j = i∗
x∗j (p, m) = p i∗
0, otherwise.
When i∗ is not unique, there is no unique solution, but convex combinations of the above are
all valid demands. That is,
{ }
∗ m j αj αi
x (p, m) = convex hull of e : ⩾ , i = 1, . . . , n ,
pj pj pi
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 10
where ej is the j th unit coordinate vector. This says that to consume only those commodities
with the highest marginal utility per dollar, and in this case the marinal utility of commodity
i is always αi .
The indirect utility is thus
α i∗ αi m
v(p, m) = αi∗ x∗i∗ = m = m · max = pi .
p i∗ i pi min
i αi
Roy’s Law:
∂v mαi∗
−
∂p ∗ (p ∗ )2 m
− i = − αii∗ = = x∗i∗ (p, m).
∂v p i∗
∂m p i∗
∂v
∂pj 0
x∗j (p, m) = − = − α i∗ = 0 j ̸= i∗
∂v
∂m p i∗
pi
e(p, υ) = υ min
i αi
{
∂e(p, υ) υ/αj j = i∗
x̃j (p, υ) = =
∂pj 0 otherwise
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 11
1.5
0.5
0
0 0.5 1 1.5 2
Remark 5 This function is not differentiable everywhere. In fact, it’s not differentiable at any
interesting point. Nonetheless it is monotonic, so the budget constraint will bind. It is also
easy to see that at the optimum we must have
x∗1 (p, m) x∗ (p, m)
= ··· = n .
α1 αn
x∗ x∗
For if for some j we had αjj > u(x∗ ) = mini αii , then reducing xj would relax the budget
constraint allowing a higher utility to be achieved. Denote this common minimum ratio by υ.
Then x∗i (p, m) = αi υ and the expenditure on good i is pi x∗i (p, m) = υαi pi . Summing over i
∑
gives m = υ ni=1 αi pi , so
αi m
x∗i (p, m) = ∑n .
i=1 αi pi
m
v(p, m) = ∑n . (6)
i=1 αi pi
Roy’s Law:
∂v −αi m
∑n
∂p ( i=1 αi pi )2 αi m
− i =− = ∑n = x∗i (p, m).
∂v 1 α p
∑n i=1 i i
∂m i=1 αi pi
v. 2018.11.17::17.28
KC Border Preference and Demand Examples 12
∑
n
e(p, υ) = υ αi pi .
i=1
x̃i (p, υ) = αi υ.
v. 2018.11.17::17.28