You are on page 1of 8

Deriving Demand Functions - Examples1

What follows are some examples of different preference relations and their respective
demand functions. In all the following examples, assume we have two goods x1 and x2 , with
respective prices p1 and p2 , and income m.

Perfect Substitutes

For perfect substitutes, we have to look at respective prices. After all, if goods are perfect substitutes, then the consumer is indifferent between them, and will have no problem
adjusting consumption to get the good with the lowest price.

1.1

The basic case (1:1)

For 1:1 perfect substitutes, the situation is about as plain as can be. Say p1 > p2 . The
consumer will spend all their income on good 2. How do we know without doing any of that
fancy math stuff? If the consumer is just as happy with a unit of good 1 as they are with
a unit of good 2, and good 2 is less expensive, then they might as well use all their income
on good 2 (they get more stuff that way). Similarly, if p1 < p2 , the consumer will choose
only good 1. What if p1 = p2 ? Then any combination of good 1 and good 2 that uses all
their budget is fine with them. So for each good, we have three possible demand functions
depending on the prices. For example, demand for good 1 can be expressed as

0 if p1 > p2

m
x1 (p1 .p2 , m) =
if p1 < p2
p1

Any (x1 ,x2 ) that satisfies p1 x1 + p2 x2 = m if p1 = p2


and similarly for good 2 (with the inequalities reversed, of course).

1.2

A more complicated example (2:3)

Problem : Let the individual have a utility function u(x1 , x2 ) = 2x1 + 3x2 and an income
of 120. They face prices p1 = 2 and p2 = 6. What is their demand for x1 ? For x2 ?
1

Disclaimer : This handout has not been reviewed by the professor. In the case of any discrepancy
between this handout and lecture material, the lecture material should be considered the correct source.
Despite all efforts, typos may find their way in - please read with a wary eye.

Prepared by Nick Sanders, UC Davis Graduate Department of Economics 2007

Solution : The easiest way to do this is to look at how much x1 they can buy with all their
income and how much x2 they can buy with all their income, then see which gives the higher
utility. If they spend all their money on x1 , their utility is u(x1 , 0) = 2 pm1 = 2 120
= 120.
2
If they spend all their income on x2 , their utility is u(0, x2 ) = 3 pm2 = 3 120
= 60. Since
6
they get a higher utility from consuming only x1 , their demand functions will be
x1 (p1 , p2 , m) =

m
p1

and

x2 (p1 , p2 , m) = 0

We could also have solved this by figuring out the slope of the budget line relative to the slope
of the indifference curves (i.e. the MRS). The slope of the budget line is p1 /p2 = 1/3,
and the MRS is 2/3. Since the absolute value of the price ratio is lower than the absolute
value of the MRS at all point, we know the individual is never going to trade x1 for x2 , so
theyll spend all their income on x1 - the same result we found above.
At what price would the individual would be willing to consume a non-zero amount of
or p2 3.
x2 ? Using our first method, that would happen whenever u(x1 , 0) = 120 3 120
p2
Using our second method, we know they will be willing to trade some x1 for some x2 when
the absolute value of the price ratio is at least as great as the absolute value of the MRS, or
when 2/p2 2/3, again giving p2 3.

Perfect Compliments

With perfect compliments, we solve for the demand functions using two different equations.
The first equation is the budget line, and the second is the optimal relationship between the
amounts of x1 and x2 consumed.

2.1

The basic case (1:1)

When goods are perfect 1:1 compliments, the optimal relationship between x1 and x2 is such
that x1 = x2 . Why? Say x1 > x2 . Our utility is going to be the minimum of the two values
(x2 ) and any x1 above x2 isnt giving us any additional utility, even though it is eating up
some of our budget. We could increase our utility by getting rid of some of that extra x1
and buying more x2 . Wed be in a similar situation if x1 < x2 . The only time we couldnt
modify our consumption to improve our utility would be when x1 = x2 , so that must be the
optimal relation. In general, if you have a utility function of the form min{, }, a condition
of optimality is that = .

When were optimizing well spend all our income, so we also know that p1 x1 + p2 x2 = m.
With these two equations, we can solve for one good in terms of the other, then use the
budget equation to solve for the demand functions, like so:
x1 = x2
p 1 x1 + p 2 x2 = m

(optimal relation condition)

(1)

(budget set)

(2)

Pluging (1) into (2), we get


p 1 x2 + p 2 x2 = m

x1 (p1 , p2 , m) =

m
p1 + p2

and

x2 (p1 , p2 , m) =

m
p1 + p2

where we get the demand for x1 by again using (1).

2.2

Some more complicated examples

Problem : The individual has a utility function u(x1 , x2 ) = min{4x1 , 5x2 } and faces prices
p1 = 10 and p2 = 5. We know they consume 20 units of x2 and spend all their income. What
is the demand for x1 ? What is the individuals income?
Solution : We know that at the optimal point, the individual will choose x1 and x2 in a
ratio such that 4x1 = 5x2 . Thus
5
x1 = x2
4
5
= 20 = 25
4
We know that at the optimal point p1 x1 + p2 x2 = m, and we know everything on the left
hand side, so
10 25 + 5 20 = m = 350
Problem : The individual has a utility function u(x1 , x2 ) = min{x1 + 3x2 , x2 + 4x1 }, faces
prices p1 = 3 and p2 = 8, and has an income of 300. Find their demand for x1 and x2 .
Solution : Using the tricks discussed above, we get our two equations
x1 + 3x2 = x2 + 4x1

2
x1 = x2
3
p 1 x1 + p 2 x2 = m

(3)
(4)

Plugging (3) into (4) and solving


2
m =p1 + p2 x2
3

x1 (p1 , p2 , m) =

2m
2p1 + 3p2

and

x2 (p1 , p2 , m) =

3m
2p1 + 3p2

where we got x1 by plugging the optimal x2 into (3). Replacing p1 , p2 , and m with their
known values, we get our quantities demanded.
x1 (p1 , p2 , m) =

2.3

600
= 20
23+38

and

x2 (p1 , p2 , m) =

900
= 30
23+38

A general result

In general, if a utility function is of the form


min{x1 , x2 }
then the demand functions will be
x1 (p1 , p2 , m) =

m
p1 + p2

and

x2 (p1 , p2 , m) =

m
p1 + p2

Cobb-Douglas

You should be plenty comfortable with Cobb-Douglas preferences by now - weve dealt with
them quite a bit. Since its familiar territory, this first example will be speedy, and then
well solve the same problem using the Lagrange method.
Problem : Let someone have a utility function defined by u(x1 , x2 ) = 38 x51 x2 . They have
an income of 150 and face prices p1 = 10 and p2 = 5. What is their demand for both goods?
What is the ratio of total expenditure on good 1 to expenditure on good 2?
Solution : First solve for the optimality condition by setting the negative of the price ratio
equal to the marginal rate of substitution. We then use that to get x1 in terms of x2 (or the
other way around, whichever suits you).

p1
5x4 x2
= 15
p2
x1
x2 p 2
1=5
x 1 p1
p2
x1 = 5x2
p1
4

(5)

Now plug this into the budget constraint and solve.


m = 5p1 x2

p2
+ p 2 x2
p1

Now we have our demand functions


5m
5 150
=
= 12.5
6p1
6 10
150
m
=
=5
x2 (p1 , p2 , m) =
6p2
65
x1 (p1 , p2 , m) =

The ratio of expenditure on good 1 to expenditure on good 2 is


p1 x 1
10 12.5
=
=5
p 2 x2
55
which means that however much money we spend on good 1, we spend 5 times that amount
on good 2. Remember back when we said that with a utility function representing CobbDouglas preferences of the form u(x1 , x2 ) = cx1 x1
where 0 < < 1, the and (1 )
2
told you what fraction of your income you spent on each good? We just verified that result.
If we transformed our utility function by raising it to the power of 16 (remember why?) our
exponents would be 65 on good 1 and 16 on good 2, which would mean that we spend 5 times
as much on good 1 as good 2 . . . ta-da!

3.1

Solving the problem using the Lagrange method

Following the method shown in class (from the lecture on 11/1), were going to solve
maximize

3
u(x1 , x2 ) = x51 x2
8

subject to

p 1 x1 + p 2 x2 = m

Forming the Lagrangian gives


3
L(x1 , x2 , ) = x51 x2 (p1 x1 + p2 x2 m)
8
We now take first derivatives and solve for first order conditions in x1 , x2 , and .
L
3
3 4
= 5x41 x2 p1 = 0
5x x2 = p1
x1
8
8 1
L
3
3 5
= x51 p2 = 0
x = p2
x2
8
8 1
L
= p 1 x1 + p 2 x2 m = 0 p 1 x1 + p 2 x2 = m

(6)
(7)
(8)

Dividing (6) by (7) gives


p1
x2
=5
p2
x1

(9)

Hmmm . . . looks familiar . . . aha! Its the good old tangency condition weve seen so
much - compare (9) to (5). Now, we can use (9) to solve x1 in terms of x2 and plug that into
(8), and from there on, its the same process we did before.

3.2

A general result

In general, if a utility function is of the form


u(x1 , x2 ) = cx1 x2
the demand functions will be
x1 (p1 , p2 , m) =

m
+ p1

and

x2 (p1 , p2 , m) =

m
+ p2

Quasilinear

Quasilinear preferences are a bit harder to deal with, because we have to consider two possibilities - interior solutions and border solutions. We also have the additional complication
that the demand of one of the goods is independent of wealth at almost all points. Remember
quasilinear functions have the general form
u(x1 , x2 ) = v(x1 ) + x2
where x2 enters the utility function directly and has a marginal utility of 1 and x1 enters the
utility function via some other function v.
Both examples here will use the tangency condition - check your class notes (from 11/8)
and the appendix of chapter 6 of your textbook for a derivation using the Lagrange method.

Problem : Let there be a utility function of the form u(x1 , x2 ) = 3 x1 + x2 . Find the
demand functions.

Solution : Since we have convexity, we can use the tangency condition.

3
x10.5
p1
3
= 2
=
p2
1
2 x1
2

3 p2
x1 (p1 , p2 , m) =
2 p1

(10)

Note that weve already gotten a demand function for x1 , and income doesnt enter into the
function at all. Now to solve for the demand of x2 , we plug (10) into the budget constraint
and solve for x2 .
2

3 p2
m = p1
+ p 2 x2
2 p1
9 p22
+ p 2 x2
m=
4 p1
m 9 p2
x2 (p1 , p2 , m) =

(11)
p2 4 p1
So there we have our demand functions - equations (11) and (10).
Problem : Say we have the utility function u(x1 , x2 ) = 20x1 4x21 + x2 , an income of 200,
and prices p1 = 4 and p2 = 1. What is our demand for good 1? What about good 2? For
what values of m would we consume only good 1?
Solution : Following a similar process to that done above
p1
20 8x1
=
p2
1
5
p1
x1 (p1 , p2 , m) =
2 8p2

(12)
(13)

Like the last problem, we now have a demand function where wealth is nowhere to be found.
Does that mean that demand for x1 is never affected by wealth? Not entirely, and well see
why in a second. Plug (13) into the budget constraint and solve for x2 .


p1
5
m = p1

+ p 2 x2
2 8p2
 2
m 5 p1 1 p1
x2 (p1 , p2 , m) =

+
(14)
p2 2 p2 8 p2

Plugging in our known values, we get


5 4

2 8
=2

x1 (p1 , p2 , m) =

20 1
+
x2 (p1 , p2 , m) = 200
2
8

16
1

= 188
Now what about this when do we consume good 1 business? Remember with quasilinear
preferences, we can have an interior solution or a border solution. To find out when we would
consume only good 1, we need to find out for what values of m we have a border solution.
That happens when (under the current prices) the demand for x2 comes out to be zero or
negative.
 2
m 5
1 p1
p1 +
0
x2 (p1 , p2 , m) =
p2 2
8 p2
 2
m
5
1 p1
p1 +
p2
2
8 p2
m8
So for all incomes less than 8, well consume only good 1 and none of good 2, giving us a
border solution. Once we have an income greater than 8, well keep our demand for good
1 at 2, and spend all of our additional income on good 2. See now why we cant say our
consumption of x1 is never affected by wealth in this problem? If our wealth is low enough
that we dont consume any x2 , then changes in wealth do change our consumption of x1 .
But once m is large enough (in this case, once m > 8) changes in wealth do not change
demand for x1 .

You might also like