Topic 2: Constrained optimisation (Sli.do #T2LL)
ECON30010 Microeconomics
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 1 / 65
Table of Contents
1. Introduction, Setup and Satiation
2. Convexity and other assumptions
2B. More convexity and other assumptions
3. Constrained Optimisation: Technique and Example 1
4. Constrained Optimisation: Examples 2 and 3
5. Types of goods
6. Example 4 and Summary
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 2 / 65
1. Introduction, Setup and Satiation
Topic 1 refresher
Theorem
If preferences satisfy completeness, transitivity, monotonicity and
G-continuity, then there exists a utility function u(x) that represents .
Why is this theorem important? Because mathematicians are very good at
working with functions, and we can use a lot of their tools.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 3 / 65
1. Introduction, Setup and Satiation
The plan and the why
I Having a continuous utility function is very useful, but not enough.
I Budget set
I Utility maximisation problem
I Convexity
I The Lagrange method
I Marshallian demand
The name of this topic sounds like math. And our main focus will be on
math: it is going to be applied to an economics problem, but my main
goal is to make sure you are comfortable with constrained optimisation.
Why?
I have been asked to cover this topic for other subjects, most importantly
for Semester 2 macroeconomics.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 4 / 65
1. Introduction, Setup and Satiation
Constraint
I A typical agent wants “stuff”. If the fifth TV set in a room does not
make an agent any happier, something else (more time? extra hike in
mountains?) would make the agent more satisfied.
I If an agent is to face a meaningful problem – where the solution is
not giving an agent an infinite amount of something – we need to
introduce some constraint.
I Earlier, we have dealt with a simple constraint: an agent had $5 that
she needed to allocate.
I This is not the most typical constraint the agent faces, although we
will see plenty of similar simple constraints in this subject.
I We now turn to a more typical one: budget constraint.
I Budget constraint is often thought of as income and prices, but you
will see in a tutorial that we can interpret the same constraint as
something completely different.
I Even though I “focus” on budget constraint, everything we study
applies to other “types” of constraints, including $5 one.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 5 / 65
1. Introduction, Setup and Satiation
Budget Constraint
Budget constraint: good 1 and good 2 cost money and an agent (even
Warren Buffet) has a limited amount of it.
A consumer is restricted to choose a consumption bundle q = (q1, q2)
such that p1q1 + p2q2 ≤ Y . Right now, we are not interested where prices
p1, p2 and income Y come from.
q1
q2
Y /p1
Y
p2
Budget set p1q1 + p2q2 ≤ Y
Budget line p1q1 + p2q2 = Y
If q1 = 0, p2q2 = Y ⇒ q2 = Y /p2
If q2 = 0, p1q1 = Y ⇒ q1 = Y /p1
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 6 / 65
1. Introduction, Setup and Satiation
Consumer maximisation problem
Formally, we can write this problem as:
max
q1,q2
u(q1, q2)
subject to p1q1 + p2q2 ≤ Y
Note that I can write my $5 problem
from Topic 1 as:
max
x,y
u(x , y)
subject to x + y = 5
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 7 / 65
1. Introduction, Setup and Satiation
Indifference curves again
Once we have utility function, we can define the indifference curve as
solutions to u(x , y) = u0, for different levels of u0.
q1
q2
Example for u(q1, q2) = q1q2
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 8 / 65
1. Introduction, Setup and Satiation
Solving consumer maximisation problem graphically:
ECON20002 recap
q1
q2
Y /p1
Y
p2
We are looking for the North-East-most indifference curve1, such that it
touches the budget constraint (to guarantee the feasibility of the solution).
1Utility increases in that direction – see the picture on the previous slide
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 9 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, 1
Consider an agent, Ann, with preferences:
uA(q1, q2) = −(q1 − 1)2 − (q2 − 1)2
Do not worry that Ann’s utility is always negative. Recall that any positive
monotonic transformation of a utility function leads to a utility function
that represents the same preferences. Hence, I can always add some
constant to make Ann’s utility positive (over the relevant range of q1, q2).
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 10 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, 2
Ann’s unfitly function looks as follows:
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 11 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, 3
To construct Ann’s indifference curves, recall that
−(q1 − 1)2 − (q2 − 1)2 = u0
is an equation of a circle with centre (1, 1) and radius
√−u0 (recall that
u0 < 0).
Suppose now that Ann has $4 and prices are
p1 = p2 = 1. Thus, her budget constraint is
q1 + q2 ≤ 4.
We are looking for the indifference curve that
touches the budget line. As indifference curves
are circles with centre (1, 1), the circle that
touches the budget line, touches it in the
middle, at point (2, 2). q1
Y /p1
q2
Y
p2
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 12 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, Question
Question: We have found that one of Ann’s indifference curve touches the
budget line at (2, 2). Thus, I conclude that
A (2, 2) is Ann’s optimal consumption bundle;
B Bundle (1, 1) gives Ann higher utility, but it is not optimal
consumption bundle because it is not on the budget line;
C Bundle (1, 1) gives Ann the highest possible utility, so it is the
optimal consumption bundle despite being off the budget line;
D None of the above;
E It is all extremely confusing.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 13 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, 4
Ann’s preferences:
uA(q1, q2) = −(q1 − 1)2 − (q2 − 1)2
Note that uA(q1, q2) ≤ 0,
and uA is equal to zero only
when q1 = q2 = 1.
If Ann can afford bundle
(1, 1), she will always choose
it, because any other bundle
gives her lower utility.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 14 / 65
1. Introduction, Setup and Satiation
What can go wrong? Satiation, 5
We are looking for the indifference curve that
touches the budget line. As indifference curves
are circles with centre (1, 1), the circle that
touches the budget line, touches it in the
middle, at point (2, 2).
q1
Y /p1
q2
Y
p2
But it is not the maximum: Ann can afford (1, 1)! Why do we find (2, 2)?
This is because we have really fed the following question into our “math
machine”:
What is the maximum utility Ann can obtain if she must spend all
the money?
Then the correct answer is (2, 2). But it is not the question we are
interested in.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 15 / 65
1. Introduction, Setup and Satiation
Implication of monotonicity: theorem
With monotonicity, which we have already imposed, such a situation
cannot happen.
Theorem
If preferences are monotonic, we can replace inequality ≤ with equality =
in the consumer maximisation problem, so that p1q1 + p2q2 = Y .
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 16 / 65
1. Introduction, Setup and Satiation
Implication of monotonicity: proof
Proof.
Proof by contradiction: suppose that we cannot replace ≤ by =; in other
words, the optimal consumption bundle (q′1, q
′
2) is such that
p1q
′
1 + p2q
′
2 =Y
′< Y .
Then the agent has (Y − Y ′) > 0 income left over. She spends this extra
income equally on two goods (buying Y−Y
′
2p1
of good 1 and Y−Y
′
2p2
of good
2), to give her a new bundle (q1, q2).
I Note that (q1, q2) >> (q′1, q′2). Since we assumed monotonicity of
preferences, (q1, q2) (q′1, q′2): the agent is better off with bundle
(q1, q2).
I Note that, by construction, (q1, q2) is affordable: p1q1 + p2q2 = Y .
I Therefore (q1, q2) is in the budget set, and preferred to (q′1, q′2).
Hence, (q′1, q
′
2) is not optimal, a contradiction to our initial
supposition.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 17 / 65
1. Introduction, Setup and Satiation
What if no monotonicity?
Monotonicity is a “technical” assumption: it is much easier to solve a
problem if this assumption is imposed, but we are not doomed if this
assumption does not hold in our problem. There are more sophisticated
methods to find a solution.
With equality, we will use the Lagrange method. With inequalities (when
monotonicity does not hold), we need the Kuhn-Tucker method.
You can check when they lived and guess which method is easier.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 18 / 65
2. Convexity and other assumptions
What else can go wrong? Non-convexity
Suppose that indifference curves look like this:
q1
q2
Y /p1
Y
p2
Two optimal consumption bundles
We then have two optimal consumption bundles. This is not a big problem
if finding optimal bundle is our ultimate goal. However, if we want to
know how consumption changes in response to change in prices, having
two bundles is not convenient: we do not know which one the agent would
be consuming.
Hence, we want to rule out this situation too.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 19 / 65
2. Convexity and other assumptions
Convexity in chocolate and candy (recap of ECON20002)
The usual assumption is that our marginal utility is decreasing: you are
ecstatic about the first bar of chocolate, but not so much about the
second bar. Hence, you many not be willing to trade your first chocolate
bar for a candy, but you may be willing to trade the second.
This naturally leads to the convexity assumption: if you are indifferent
between
x : 3 bars of chocolate & 1 candy and
y : 3 candies & 1 bar of chocolate,
then you must prefer (z) 2 bars of chocolate and 2 candies to x and y .
Does this assumption always hold? Not necessarily: both aspirin and
paracetamol are good against a headache (so, you are, conceivably,
indifferent), but having 1/2 of aspirin and 1/2 of paracetamol is a recipe
for a disaster.
Unlikely to be violated with more broadly defined goods. At the same time,
as always, when you think about your specific problem, you do need to think
whether this assumption is satisfied.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 20 / 65
2. Convexity and other assumptions
Convexity
I have told you what convexity means when we talk about 3 chocolates
and 1 candy. We need to be a bit more general than that.
The formal definition of convexity:2
Definition
Suppose that a consumer is indifferent between bundle x and y. Consider
a bundle z = αx + (1− α)y for any α such that 0 < α < 1.3
I The preferences are convex if z x and z y .4
I The preferences are strictly convex if z x and z y .
2Do not confuse convex preferences and convex functions. These are two different
notions. (Only if you are very curious: Convex set is the set that contains a straight line that connects any two points of the
set.
The preferences are convex if the set of better allocations – the
inside of the indifference curve – is a convex set. A function
is convex if the set above the function is a convex set.)
3This is called a convex combination of x and y.
4I do not need to write the second relation, z y , because I have assumed
transitivity. Check that you understand why. The same applies to strict convexity.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 21 / 65
2. Convexity and other assumptions
Convexity and strict convexity: examples, perfect
substitutes
Consider preferences such that y x if and only if
y1 + y2 ≥ x1 + x2. For example,
I (2, 2) (3, 0);
I (3, 1) ∼ (1, 3);
These preferences are called “perfect substitutes”. They describe the
situation where you see no difference between two objects (I have given
them as an example earlier, referring to the two goods as apples and
oranges).
Question: Are these preferences
A Strictly convex
B Convex
C Neither
D Not enough information to determine
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 22 / 65
2. Convexity and other assumptions
Convexity and strict convexity: examples, perfect
complements
Consider preferences such that y x if and only if
min(y1, y2) ≥ min(x1, x2). For example,
I (2, 2) (100, 1);
I (3, 1) ∼ (1, 3);
I (3, 3) ∼ (5, 3).
These preferences are called “perfect complements”. For example, if x is
the number of left shoes and y is the number of right shoes, the agent
may have exactly these preferences.
Question: Are these preferences
A Strictly convex
B Convex
C Neither
D Not enough information to determine
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 23 / 65
2B. More convexity and other assumptions
Strict convexity on a graph
Definition
Suppose that a consumer is indifferent between bundles x and y. Consider a
bundle z = αx + (1− α)y for any α such that 0 < α < 1.
I The preferences are strictly convex if z x, z y .
q1
q2
x
y
z
Straight line connects x and y.
Any point on this line is “z” from
the definition.
If utility increases in the northeast direction (as it usually does), then the
whole straight line should be above the indifference curve (recall that
points above indifference curve are more desirable bundles).
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 24 / 65
2B. More convexity and other assumptions
Solution is unique with strict convexity
q1
q2
Y /p1
Y
p2
x
y
z
Straight line connects x and y.
Any point on this line is “z” from
the definition.
With strict convexity, we will have a unique solution to our maximisation
problem.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 24 / 65
2B. More convexity and other assumptions
Non-convexity
Definition
Suppose that a consumer is indifferent between bundle x and y. Consider a
bundle z = αx + (1− α)y for any α such that 0 < α < 1.
I The preferences are convex if z x, z y .
q1
q2
Y /p1
Y
p2
Two optimal consumption bundles
x
yz
These preferences are not convex.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 25 / 65
2B. More convexity and other assumptions
Solution is unique with strictly convex preferences
Theorem
Suppose that are strictly convex. Then the solution to the problem
defined on Slide 7 is unique.
Proof.
By contradiction: suppose there are two solutions to the problem on Slide
7 which are not equal to each other: x 6= y.
I Consider z = 0.5x + 0.5y.
I Since both x and y are in the budget set, then z is also in the budget
set.
I Since preferences are strictly convex, z x.
I Thus, the agent can afford a better bundle z. We arrive to the
contradiction with x 6= y and conclude that x = y.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 26 / 65
2B. More convexity and other assumptions
Convexity on a graph
Definition
Suppose that a consumer is indifferent between bundle x and y. Consider a
bundle z = αx + (1− α)y for any α such that 0 < α < 1.
I The preferences are strictly convex if z x, z y .
I The preferences are convex if z x, z y .
q1
q2
x
y
z
These preferences are convex, but not strictly convex.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 27 / 65
2B. More convexity and other assumptions
Solution may not be unique with convexity
q1
q2
Y /p1
Y
p2
s
S
Convexity holds, but solution is not unique: there is an interval of
solutions from s to S.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 28 / 65
2B. More convexity and other assumptions
Perfect complements, revisited
min(x1, x2) preferences are not strictly convex.
Question: Do you expect that the solution is unique with these
preferences?
1. No, because they are not strictly convex;
2. Yes, it is easy to see on a graph;
3. No; although it looks like the solution is unique on a graph, I am sure
some examples exist where it is not so;
4. I am not sure.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 29 / 65
2B. More convexity and other assumptions
More assumptions
I will also assume that utility function is differentiable, or twice
differentiable. These assumptions are also traceable to assumptions on
preferences. However, it becomes too technical and I will skip that.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 30 / 65
2B. More convexity and other assumptions
A note on axioms/assumptions, continuity
I have warned you that my continuity axiom is different from the standard
axiom.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 31 / 65
2B. More convexity and other assumptions
A note on axioms/assumptions, convexity
Definition (Convexity: Lectures, Serrano&Feldmann, Varian)
Suppose that a consumer is indifferent between bundle x and y. Consider
a bundle z = αx + (1− α)y for any α such that 0 < α < 1.
I The preferences are convex if z x , z y .
I The preferences are strictly convex if z x , z y .
Definition (Convexity, ≈ Mochrie)
Suppose that y x and z x. Then αy + (1− α)z x for any α such
that 0 < α < 1.
Definition (Convexity, Mas Collel–Whinston–Green)
Suppose that y x. Then αy + (1− α)x x for any α such that
0 < α < 1.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 32 / 65
2B. More convexity and other assumptions
A note on axioms/assumptions, monotonicity
Definition (Monotonicity, Lectures)
If two bundles x and y are such that bundle y contains strictly more of
each good than x, then y x.
Definition (Monotonicity, alternative)
If two bundles x and y are such that bundle y contains strictly more of
each good than x, then y x. If two bundles x and y are such that bundle
y contains at least as much of each good than y x.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 33 / 65
2B. More convexity and other assumptions
Which monotonicity?
Question: Which monotonicity assumption do you prefer?
A As in lectures, y >> x⇒ y x
B An alternative, where at least as much of each good implies y x
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 34 / 65
2B. More convexity and other assumptions
Why all these differences?
You may have found such a variety of axioms with similar names
somewhat disheartening. However:
I The preferred definition depends on what we are going to use it for
I If I want to show that utility function exists, then I need a very weak
definition of continuity.
I I then do not need to introduce a stronger definition which would have
delivered me a continuous utility function.
I If I use convexity only to rule out multiple solutions, then I do not need
convexity that guarantees the existence of utility function (without
continuity).
I The definition we use should be sufficient for our goal/proof and we
need to convince others that this axiom is reasonable
I If an axiom is easier to state, it is easier to convince that it is
reasonable
I If an axiom is “weaker” (implies some other axiom), then it should be
easier to convince that it holds “more often”.
To summarize: why someone would give a strong and complicated
definition if weak and simple does the job?
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 35 / 65
2B. More convexity and other assumptions
Exam
I have already mentioned that I will not ask you a definition on the exam.
Any definition you need will be stated. You also have your 10 A4 pages. It
is a nonsense to ask you memorize definitions word-by-word.
It is important to be able to interpret what the definition says and see how
to use it in a proof/argument.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 36 / 65
3. Constrained Optimisation: Technique and Example 1
Solving the consumer maximisation problem
max
q1,q2
u(q1, q2)
subject to p1q1 + p2q2 = Y
This is called a constrained maximisation problem because you need to (i)
find max u(q1, q2) and (ii) satisfy your constraint (here p1q1 + p2q2 = Y ).
Problem (i) alone is called an unconstrained optimisation problem. You
can guess that a constrained maximisation problem is usually more difficult
than an unconstrained one.
How do you solve a constrained maximisation problem?
I Sometimes you can “see” what the solution is (for example, when
goods are perfect complements or perfect substitutes);
I You can substitute in the budget constraint (q1 = 1p1 (Y − p2q2))
(this is what you may have done in ECON20002)
I Or you can use the Lagrange method
I You can also directly use a solution which comes from the Lagrange
method; this is what you’ve done in ECON20002 most of the time.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 37 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: Lagrange’s Method
By Year 3, we know perfectly well how to solve an unconstrained
optimisation problem (take the derivative, equate it to zero (that is obtain the
first-order condition, FOC), argue/check/think whether FOC gives you a correct
solution). We can do this mindlessly, except for the thinking step.
The Lagrange method turns something that you don’t know how to solve
into something that you know how to solve. It introduces an auxiliary
problem.
Define Lagrangian as
L(q1, q2, λ) = u(q1, q2) + λ[Y − p1q1 − p2q2],
where λ, called a Lagrange multiplier, is an additional decision variable
(along with q1 and q2).
max
q1,q2
u(q1, q2)
subject to p1q1 + p2q2 = Y
⇒
max
q1,q2,λ
L(q1, q2, λ)
For curious & math-inclined: I am cheating here for the sake of good
story: when you take FOC of L, you do find the maximum with
respect to q1, q2, but you find a saddle point with respect to λ. Treat
it as a mnemonic rule.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 38 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: Lagrange’s Method, Example 1
max
q1,q2,λ
L(q1, q2, λ) = u(q1, q2) + λ[Y − p1q1 − p2q2]
Solve for u(q1, q2) = q1q2:
∂L(q1,q2,λ)
∂q1
= 0
∂L(q1,q2,λ)
∂q2
= 0
∂L(q1,q2,λ)
∂λ = 0.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 39 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: Lagrange’s Method, Example 1
max
q1,q2,λ
L(q1, q2, λ) = u(q1, q2) + λ[Y − p1q1 − p2q2]
Solve for u(q1, q2) = q1q2:
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 40 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: Lagrange’s Method, Example 1
max
q1,q2,λ
L(q1, q2, λ) = u(q1, q2) + λ[Y − p1q1 − p2q2]
Solve for u(q1, q2) = q1q2:
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 41 / 65
3. Constrained Optimisation: Technique and Example 1
Lagrangian: A more careful look
∂L(q1,q2,λ)
∂q1
= ∂u(q1,q2)
∂q1
− λp1 = 0
∂L(q1,q2,λ)
∂q2
= ∂u(q1,q2)
∂q2
− λp2 = 0
∂L(q1,q2,λ)
∂λ
= Y − p1q1 − p2q2 = 0.
⇓
MU1(q1, q2) = λp1
MU2(q1, q2) = λp2
p1q1 + p2q2 = Y
⇒
{
MRS = MU1(q1,q2)
MU2(q1,q2)
= p1
p2
p1q1 + p2q2 = Y .
λ =
MU1
p1
=
MU2
p2
λ is equal to marginal utility of good i divided by the price of that
good.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 42 / 65
3. Constrained Optimisation: Technique and Example 1
Shadow value of a constraint: an example
Revisit our utility function u(q1, q2) = q1q2.
Recall that MU1 = q2,MU2 = q1, q1 =
Y
2p1
, and q2 =
Y
2p2
; from the
previous slide λ = q2/p1 = q1/p2
Let Y = 1, p1 = 1/2, p2 = 2. Then q1 = 1, q2 = 1/4, u(q1, q2) = 0.25 and
the shadow value of a constraint is λ = 1/2.
Let Y = 1.01 now; p1 = 1/2, p2 = 2 as before. Then q1 = 1.01,
q2 = 1.01/4, u(q1, q2) = 1.01
2/4 = 0.255025.
Note that
∆u = 0.255025− 0.25 = 0.005025 ≈ 0.005 = 1/2 · (1.01− 1) = λ ·∆Y
Change in u is almost equal to λ times the change in income (“how much”
the constraint restricts you). It would have been exactly 0.005 if the
increase in income Y has been even smaller (you can try that at home).
λ measures the “marginal utility of income” (how much the utility changes
in response to the change of income).
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 43 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: λ
Note that even though I write the maximisation problem as
max
q1,q2,λ
L(q1, q2, λ),
treat λ as a decision variable and even able to interpret the value of λ,
I we almost never bother to find λ because
I λ is still an auxiliary variable which we are not interested in
I unless we are able to alter the constraint and interested how much it
affects the maximum value.
I If we cannot alter the constraint, we would only be interested in
(q1, q2).
I For the problems you solve in ECON30010, you will only need to find
(q1, q2) unless explicitly stated otherwise.
I And those who have read a comment on slide 38 know that even though I write max, it is not max with respect to λ,
but a saddle point. I use max to make it easier to see and remember what we do.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 44 / 65
3. Constrained Optimisation: Technique and Example 1
Constrained Optimisation: Lagrange’s Method, Example 2
Consider another utility function: u(q1, q2) = q1q2 + 3q1. Let p1 = p2 = 1
and Y = 2
The Lagrangian is
L(q1, q2, λ) = q1q2 + 3q1 + λ[2− q1 − q2],
∂L(q1,q2,λ)
∂q1
= q2 + 3− λ = 0
∂L(q1,q2,λ)
∂q2
= q1 − λ = 0
∂L(q1,q2,λ)
∂λ = 2− q1 − q2 = 0.
⇓{
q1 = q2 + 3
q2 + 3 + q2 = 2
⇒ 2q2 = −1
Not the best news. . .
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 45 / 65
4. Constrained Optimisation: Examples 2 and 3
Constrained Optimisation: Lagrange’s Method, Example 2
q1
q2
Y /p1
Y
p2
Optimal consumption bundle
(corner solution)
Optimal consumption bundle
if can consume negative quantities
Lagrange method is not aware that you cannot consume negative
quantities.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 46 / 65
4. Constrained Optimisation: Examples 2 and 3
A diversion: a complete constrained problem
max
q1,q2
u(q1, q2)
subject to
p1q1 + p2q2 = Y
q1 ≥ 0
q2 ≥ 0
Yet, the solution to this problem, using Kuhn-Tucker conditions, would be
too messy. Hence, we ignore some of the constraints, with a hope that
they would not matter, but need to revisit our problem once we obtained
the solution to a simplified problem.
Surprisingly, a lot of problems in economics are solved this way: Original
problem is too hard; let us try to solve a simplified problem, hoping that its
solution will satisfy other constraints; if not, try a different simplification.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 47 / 65
4. Constrained Optimisation: Examples 2 and 3
Marshallian demand function
Revisit our solution in Example 1:
{
q1 =
Y
2p1
q2 =
Y
2p2
Note that we obtained the solution for any prices p1, p2 and any income
Y . That is, we could write the solution as functions q1(p1, p2,Y ) and
q2(p1, p2,Y ). These functions are called Marhsallian, or uncompensated,
5
demand.
5You can look up your notes from ECON20002 if you want to know right now why
the demand is called uncompensated, or you can wait a little.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 48 / 65
4. Constrained Optimisation: Examples 2 and 3
Summary and what’s next:
Main points:
I Assumptions on individual preferences allow us to represent these
preferences by a continuous utility function;
I Maximisation of a utility function subject to a budget constraint
(using Lagrange method) leads to Marshallian demand functions.
I Lagrange method: turn constrained (pseudo-)optimisation problem into
unconstrained maximisation problem.
I Solve unconstrained (pseudo-)maximisation problem using standard
methods.
What’s next:
I A more difficult constrained maximisation problem.
I An odd maximisation problem.
I Normal, inferior and Giffen goods.
I Testing consumer demand theory: a search for Giffen goods.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 49 / 65
4. Constrained Optimisation: Examples 2 and 3
Example 3, Setup
Consider the following utility function, with q1 > b1 > 0 and 0 < q2 < b2:
6
u(q1, q2) =
q1 − b1
(b2 − q2)2
In Lagrange method, I will need to differentiate u(). Differentiating this
function would be a complete mess. However, if I take logarithm (ln(x)) –
which is a positive monotonic transformation – then the function becomes
much simpler.
u(q1, q2) = ln(q1 − b1)− 2 ln(b2 − q2)
Recall that ln′(x) = 1x .
This function represents the same preferences, so the optimal bundle must
be the same.7
6We are only interested in cases where those inequalities are satisfied.
7
Alternatively, you can convince yourself that if x is such that f (x) ≥ f (y) for any y, that is, x is a maximum, then
ln(f (x) ≥ ln(f (y) for any y.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 50 / 65
4. Constrained Optimisation: Examples 2 and 3
Example 3, Pictures
u(q1, q2) = ln(q1 − b1)− 2 ln(b2 − q2)
For numerical calculations I use b1 = 1, b2 = 3, p1 = 1, p2 = 1, Y = 4
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 51 / 65
4. Constrained Optimisation: Examples 2 and 3
Example 3, Lagrangian
max
q1,q2
u(q1, q2) = ln(q1 − b1)− 2 ln(b2 − q2)
subject to p1q1 + p2q2 = Y
Corresponding Lagrangian is
L = ln(q1 − b1)− 2 ln(b2 − q2) + λ [Y − p1q1 − p2q2]
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 52 / 65
4. Constrained Optimisation: Examples 2 and 3
Example 3: FOC
∂L
∂q1
=
1
q1 − b1 − λp1 = 0
∂L
∂q2
=
2
b2 − q2 − λp2 = 0
∂L
∂λ
= Y − p1q1 − p2q2 = 0
1
q1 − b1 = λp1
2
b2 − q2 = λp2
p1q1 + p2q2 = Y
b2 − q2
q1 − b1 = 2
p1
p2
p1q1 + p2q2 = Y
q2 = b2 − 2p1
p2
(q1 − b1)
Y = p1q1 + p2q2 = p1q1 + p2(b2 − 2p1
p2
(q1 − b1))
= p1q1 + p2b2 − 2p1(q1 − b1) = p2b2 − p1q1 + 2p1b1
q1 = 2b1 − Y − p2b2
p1
; q2 = b2 − 2p1
p2
(
b1 − Y − p2b2
p1
)
= b2 − 2 1
p2
(b1p1 − Y + p2b2) = 2Y − b1p1
p2
− b2
Reminder: ln(x) is a dream for differentiation: ln(x)′ = 1/x
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 53 / 65
4. Constrained Optimisation: Examples 2 and 3
Example 3: Solution & Correct parameters
Marshallian (uncompensated) demand is:
q1(p1, p2,Y ) = 2b1 − Y − p2b2
p1
q2(p1, p2,Y ) = 2
Y − b1p1
p2
− b2
However, this is not the end of the solution:8 suppose that
Y = 3, b1 = b2 = p1 = p2 = 1. Then q1 = 2− 3−11 = 0. Recall that our
initial condition (see slide 50) is q1 > b1 and 0 < q2 < b2. To ensure that,
we need to impose the following conditions:
For q1 > b1 we need 2b1 − Y − p2b2
p1
> b1 hence Y − p2b2 < p1b1 and
for 0 < q2 < b2 we need Y − p2b2 < p1b1 < Y − p2b2/2
8We always need to check that our solution makes sense, but in simple examples it is
“obvious”.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 54 / 65
5. Types of goods
Types of goods: normal goods
Consider good 2:
∂q2(p1, p2,Y )
∂Y
=
∂
∂Y
(
2
Y − b1p1
p2
− b2
)
=
2
p2
> 0 because p2 > 0.
The consumption of good 2 increases as the income of this individual
increases.
These goods are called normal.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 55 / 65
5. Types of goods
Types of goods: luxury goods
In fact, we can do even more math and look at what share of income this
individual spends on good 2, and how it changes with income:9
∂
∂Y
p2q2(p1, p2,Y )
Y
= p2
Y ∂∂Y q2(p1, p2,Y )− q2(p1, p2,Y )
Y 2
=
2Y − (2(Y − b1p1)− b2p2)
Y 2
=
2b1p1 + b2p2
Y 2
> 0
This is a luxury good. For this good, the individual spends a larger share
of her income on the good as income rises. For example:
I Suppose an individual spends 10% of income Y on good 2 (= 0.1Y );
I Income increases to Y + . As the share of income spent on good 2
increases, the income spent on good 2 is now more than 0.1(Y + ).10
I In fact, in our case it is possible that 2b1p1+b2p2
Y 2
> 1, so an individual
spends the whole and more on good 2.
9
This derivation uses quotient rule, which says that ∂
∂
f (x)
g(x)
=
f ′(x)g(x)−f (x)g′(x)
(g(x))2
10This sentence implies that luxury goods must also be normal.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 56 / 65
5. Types of goods
Types of goods: inferior goods
Consider good 1:
∂q1(p1, p2,Y )
∂Y
=
∂
∂Y
(
2b1 − Y − p2b2
p1
)
= − 1
p1
< 0 because p1 > 0
The consumption of good 1 decreases as the income of this individual
increases.
These goods are called inferior.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 57 / 65
5. Types of goods
Giffen goods
Consider good 1 again:
∂q1(p1, p2,Y )
∂p1
=
∂
∂p1
(
2b1 − Y − p2b2
p1
)
=
Y − p2b2
(p1)2
Suppose Y , p2 and b2 are such that Y − p2b2 > 0. Then ∂q1(p1,p2,Y )∂p1 > 0.
It means that as price of good 1 increases, the consumption of good 1
increases. These goods are called Giffen goods. This is an unusual
property and we will explore it in a little more detail.
First, let us see what the condition Y − p2b2 > 0 implies in terms of the
amount of good 1 consumed. The demand for good 1 is 2b1 − Y−p2b2p1 , so
if Y − p2b2 > 0, then q1 < 2b1.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 58 / 65
5. Types of goods
Giffen and inferior/normal goods
Question: Can Giffen good be normal?
A Yes, Giffen good can be normal: to determine that the good is Giffen,
we take derivative with respect to p1; to determine that the good is
normal, we take the derivative with respect to Y . So, they cannot be
compared.
B No, Giffen good cannot be normal. If consumption of good decreases
when its price decreases (so you have more money), then it must
decrease when the price stays constant and you just have more money.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 59 / 65
5. Types of goods
Giffen property vs. Giffen goods
∂q1(p1, p2,Y )
∂p1
> 0 if Y − p2b2 > 0
∂q1(p1, p2,Y )
∂p1
< 0 otherwise
We see that derivative may change for different values of Y , p2 and b2.
A more proper terminology should be a good that “exhibits Giffen
property” in the range b1 < q1 < 2b1.
11
All other goods can change their “properties” depending on particular
prices and income; for example, a good can be normal over some range of
prices and incomes and inferior over a different range.
11The condition b1 < q1 comes from slide (54).
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 60 / 65
6. Example 4 and Summary
Example 4: Setup
We will talk more about Giffen behaviour; before we turn to that, we will
revisit our utility function that gave Giffen behaviour and will change just
one coefficient.
Old:
u(q1, q2) = ln(q1 − b1)− 2 ln(b2 − q2)
New:
u(q1, q2) = ln(q1 − b1)− ln(b2 − q2)
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 61 / 65
6. Example 4 and Summary
Example 4: FOC
∂L
∂q1
=
1
q1 − b1 − λp1 = 0
∂L
∂q2
=
1
b2 − q2 − λp2 = 0
∂L
∂λ
= Y − p1q1 − p2q2 = 0
1
q1 − b1 = λp1
1
b2 − q2 = λp2
p1q1 + p2q2 = Y
b2 − q2
q1 − b1 =
p1
p2
p1q1 + p2q2 = Y
.
q2 = b2 − p1
p2
(q1 − b1)
Y = p1q1 + p2q2 = p1q1 + p2(b2 − p1
p2
(q1 − b1))
= p1q1 + p2b2 − p1(q1 − b1) = p2b2 + p1b1 (1)
Where is q1? Or q2?
What if p2b2 + p1b1 is not equal Y , as
equation (1) says? (Note: b1, b2, p1, p2 are all
parameters, not choice variables.)
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 62 / 65
6. Example 4 and Summary
Example 4: What happened?
Question: What happened?
A This problem does not have a solution;
B Lagrange method only works when p1b1 + p1b2 = Y and we need to
use some other method to find solutions for other parameters;
C We have screwed up somewhere;
D Math is no fun;
E None of the above.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 63 / 65
6. Example 4 and Summary
Example 4: How the utility function looks like?
Indifference curves are indifference lines, like with perfect substitutes! It is
not surprising that we cannot find a solution (it is similar to maximising
linear function f (x) = x using first order conditions: you’ve tried
something like this in Tutorial 1). With linear function, we almost always
get a corner solution.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 64 / 65
6. Example 4 and Summary
Summary
Skills:
I Lagrange method of optimisation.
I Cases when Lagrange method does not produce meaningful results or
does not work.
I Impose conditions to ensure that your solution makes sense.
I Necessity to watch for corner solutions.
Economics:
I Marshallian demand, formal definitions of different types of goods.
ECON30010 Topic 2: Constrained optimisation (Sli.do #T2LL) 65 / 65