Constrained Optimization when Calculus Doesn't Work

Christopher Makler

Stanford University Department of Economics

Econ 50: Lecture 7

Part I: Corner Solutions

pollev.com/chrismakler

Will you need a left-handed desk for exams?

The story so far, in two graphs

Question for This Week

What happens when that doesn't work?

Let's think about times in univariate calculus when the maximum of a function doesn't occur where \(f'(x)=0\). 

This is the nice case when the maximum is found when \(f'(x) = 0\). What do you notice about it?

Now suppose you wanted to maximize a similar function,
but on a constrained domain: 
specifically, \(1 \le x \le 5\).

What's the maximum
of this function?
How could you program an algorithm to find it...?

What do you get for this function if you set the derivative equal to 0?

What's the maximum
of this function?
How could you program an algorithm to find it...?

What do you get for this function if you set the derivative equal to 0?

What's the maximum
of this function?
How could you program an algorithm to find it...?

In each of these cases, we can find a candidate maximum by following a simple rule:
move in the direction the function is increasing,
until either the function starts decreasing or you can't move any more.

We use the derivative to point us in the right direction;
but we then have to apply logic to find the maximum of the function.

Last Time: The MRS, the price ratio, and the “Gravitational Pull" towards Optimality 

What does it mean if you get more "bang for your buck" from good 1 than good 2?

\frac{MU_1}{MU_2} > \frac{p_1}{p_2}

The consumer receives more utility per additional unit of good 1 than the price reflects, relative to good 2.

\frac{MU_1}{p_1} > \frac{MU_2}{p_2}

The consumer receives more
"bang for the buck"
(utils per dollar)
from good 1 than good 2.

Regardless of how you look at it, the consumer would be
better off moving to the right along the budget line --
i.e., consuming more of good 1 and less of good 2.

MRS > \frac{p_1}{p_2}

The consumer is more willing to give up good 2
to get good 1
than the market requires.

MRS > \frac{p_1}{p_2}
MRS < \frac{p_1}{p_2}

Indifference curve is
steeper than the budget line

Indifference curve is
flatter than the budget line

Moving to the right
along the budget line
would increase utility

Moving to the left
along the budget line
would increase utility

More willing to give up good 2
than the market requires

Less willing to give up good 2
than the market requires

The “Gravitational Pull" Towards Optimality

POINT A

POINT B

Corner Solutions 

Interior Solution:

Corner Solution:

Optimal bundle contains
strictly positive quantities of both goods

Optimal bundle contains zero of one good
(spend all resources on the other)

If only consume good 1: \(MRS \ge {p_1 \over p_2}\) at optimum

If only consume good 2: \(MRS \le {p_1 \over p_2}\) at optimum

What's the relationship between the MRS and the price ratio in each of these two cases?

Where does the "gravitational pull" take us...?

p_1 = 1
p_2 = 2
u(x_1,x_2) = 100 \ln x_1 + x_2
m = 100
{p_1 \over p_2} = {1 \over 2}
MRS(x_1,x_2) = {100 \over x_1}

What bundle do we get if we set the MRS equal to the price ratio?

pollev.com/chrismakler

p_1 = 1
p_2 = 2
u(x_1,x_2) = 100 \ln x_1 + x_2
m = 100
{p_1 \over p_2} = {1 \over 2}
MRS(x_1,x_2) = {100 \over x_1}

Tangency condition: set MRS = price ratio

Constraint:

{100 \over x_1} = {1 \over 2}
x_1 + 2x_2 = 100
x_1 = 200

What bundle do we get if we set the MRS equal to the price ratio?

200
+ 2x_2 = 100
2x_2 = -100
x_2 = -50
p_1 = 1
p_2 = 2
u(x_1,x_2) = 100 \ln x_1 + x_2
m = 100
x_1^* = 200

What bundle do we get if we set the MRS equal to the price ratio?

x_2^* = -50

What does this mean you should do with your $100?!

What would Lagrange find...?

You: Lagrange, I'd like you to find me a maximum please.

Lagrange: Here you go.

You: but that has a negative quantity of good 2! That's impossible!

Lagrange: 

Lagrange will only find you
the point along the mathematical description of the constraint where the slope of the constraint is equal to the slope of the level set of the objective function passing through that point.

It doesn't care about your petty insistence on positivity.

Quasilinear Utility Maximization

  • Solve for the optimum using Lagrange (set MRS = price ratio)
  • If the result is in the first quadrant, you're done.
  • If it's not, go to the closest corner.
  • Compare the MRS and the price ratio at each corner. What does the "gravitational pull" argument say?

With a quasilinear utility function (and some others), the Lagrange method will sometimes work, and sometimes you'll have a corner solution.

METHOD 1

METHOD 2

u(x_1,x_2) = 100 \ln x_1 + x_2
MRS(x_1,x_2) = {100 \over x_1}

What is the MRS at the left corner
(where you spend all your money on good 2)?

What is the MRS at the right corner
(where you spend all your money on good 1)?

MRS(0,50) = {100 \over 0} = \infty
MRS(0,50) = {100 \over 100} = 1
{p_1 \over p_2} = {1 \over 2}
>
{1 \over 2}
>
{1 \over 2}

\(MRS > {p_1 \over p_2}\) along
the entire budget line!

p_1 = 1
p_2 = 2
u(x_1,x_2) = x_1 + 4x_2
m = 100
{p_1 \over p_2} = {1 \over 2}
{1 \over 4}

What bundle do we get if we set the MRS equal to the price ratio?

MRS(x_1,x_2) =

Think about what this really means:
you like every unit of good 2 four times as much as every unit of good 1, but good 2 is only twice as expensive. What would you do?

\(MRS < {p_1 \over p_2}\) along
the entire budget line!

Perfect Substitutes

  • The MRS and the price ratio are each constant.
  • If the MRS is greater than the price ratio, only buy good 1.
  • If the MRS is less than the price ratio, only buy good 2.
  • If they're equal, buy anything you like;
    all your options will give you the same utility.

What does it mean if you get more "bang for your buck" from good 1 than good 2?

\frac{MU_1}{MU_2} > \frac{p_1}{p_2}

The consumer receives more utility per additional unit of good 1 than the price reflects, relative to good 2.

\frac{MU_1}{p_1} > \frac{MU_2}{p_2}

The consumer receives more
"bang for the buck"
(utils per dollar)
from good 1 than good 2.

Regardless of how you look at it, the consumer would be
better off moving to the right along the budget line --
i.e., consuming more of good 1 and less of good 2.

MRS > \frac{p_1}{p_2}

The consumer is more willing to give up good 2
to get good 1
than the market requires.

Monotonicity and Convexity

Concave utility: Lagrange finds the minimum utility along the budget line!

You know you'll be at a corner solution;
need to compare the utility at each corner.

Non-monotonic utility: your optimal bundle may involve not spending all your money!

Check to see whether your "satiation point" is affordable, and if so, no more math is needed!

pollev.com/chrismakler

p_1 = 3
p_2 = 8
u(x_1,x_2) = x_1^2 + 4x_2^2
m = 600

Ex 3.3: Jamal's preferences over hot dogs (good 1) and sushi (good 2) are given by

His budget constraint is given by

How should he spend his money?

Conditions for Calculus to Work

(as long as the budget line is a simple straight line)

avoids a satiation point within the constraint

At the left corner of the constraint, \(MRS > p_1/p_2\)

avoids a corner solution when \(x_1 = 0\)

Monotonicity (more is better)

At the right corner of the constraint, \(MRS < p_1/p_2\)

avoids a corner solution when \(x_2 = 0\)

ensures FOCs find a maximum, not a minimum

Convexity (variety is better)

How do you tell if a preferences are "well behaved"?

Strictly monotonic

Strictly convex

Smooth

\(MU_1 > 0\) and \(MU_2 > 0\) for any \(x_1,x_2\)

\(\frac{\partial MRS}{\partial x_1} \le 0\) and \(\frac{\partial MRS}{ \partial x_2} \ge 0\), with at least one strict

MRS has no "jumps" (not defined piecewise)

Continuous

Utility function has no "jumps" (not defined piecewise)

(i.e., indifference curves get flatter as you move down and to the right)