Constrained Optimization when Calculus Doesn't Work

Christopher Makler

Stanford University Department of Economics

Econ 50: Lecture 8

Part II: Solutions at Kinks

Recall: Kinked Budget Constraints from Lecture 5

  • Endowment optimization with different prices for buying and selling
  • Nonlinear pricing for electricity
  • Gift cards

Today: maximizing utility subject to this kind of constraint.

Trading from an Endowment

Good 1

Good 2

e_2
e_1
E

Note: lots of different notation for the endowment bundle!

 

Varian uses \(\omega\), some other people use \(x_1^E\)

x_2
x_1
X

Suppose you'd like to move from that endowment to some other bundle X

You start out with some endowment E

This involves trading some of your good 1 to get some more good 2

\Delta x_1
\Delta x_2
\Delta x_1 = e_1 - x_1
\Delta x_2 = x_2 - e_2

Buying and Selling

Good 1

Good 2

e_2
e_1
E
x_2
x_1
X

If you can't find someone to trade good 1 for good 2 directly, you could sell some of your good 1 and use the money to buy good 2.

Suppose you sell \(\Delta x_1\) of good 1 at price \(p_1\). How much money would you get?

Suppose you wanted to buy \(\Delta x_2\) of good 2 at price \(p_2\). How much would that cost?

p_1 \Delta x_1
p_2 \Delta x_2
\Delta x_1
\Delta x_2
\Delta x_1 = e_1 - x_1
\Delta x_2 = x_2 - e_2
=
p_1 (e_1 - x_1)
=
p_2 (x_2 - e_2)

Buying and Selling

Good 1

Good 2

e_2
e_1
E
x_2
x_1
X
\Delta x_1
\Delta x_2
\Delta x_1 = e_1 - x_1
\Delta x_2 = x_2 - e_2
p_1 (e_1 - x_1)
=
p_2 (x_2 - e_2)

If the amount you get from selling good 1 exactly equals the amount you spend on good 2, then

p_2x_2 - p_2e_2 = p_1e_1 - p_1x_1
p_1x_1 + p_2x_2 = p_1e_1 +p_2e_2

monetary value of \(E\)
at market prices

monetary value of \(X\)
at market prices

(Basically: you can afford any bundle with the same monetary value as your endowment.)

Endowment Budget Line

Good 1

Good 2

e_2
e_1
E
p_1x_1 + p_2x_2 = p_1e_1 +p_2e_2

If you sell all your good 1 for \(p_1\),
how much good 2 can you consume?

If you sell all your good 2 for \(p_2\),
how much good 1 can you consume?

If \(x_1 = 0\):

If \(x_2 = 0\):

x_2 = e_2 + {p_1e_1 \over p_2}
x_1 = e_1 + {p_2e_2 \over p_1}

Endowment Budget Line

Good 1

Good 2

e_2
e_1
E
p_1x_1 + p_2x_2 = p_1e_1 +p_2e_2
e_2 + {p_1e_1 \over p_2}
e_1 + {p_2e_2 \over p_1}

Liquidation value of your endowment

\hat m

Divide both sides by \(p_2\):

{p_1 \over p_2}x_1 + x_2 = {p_1 \over p_2} e_1 + e_2
{\hat m \over p_2} =

Divide both sides by \(p_1\):

x_1 + {p_2 \over p_1}x_2 = e_1 + {p_2 \over p_1}e_2
{\hat m \over p_1} =

In other words: the endowment budget line is just like a normal budget line,
but the amount of money you have is the liquidation value of your endowment.

Endowment Budget Line

p_1x_1+p_2x_2=p_1e_1+p_2e_2

Divide both sides by \(p_2\):

Divide both sides by \(p_1\):

The budget line only depends on the price ratio \({p_1 \over p_2}\),
not the individual prices.

{p_1 \over p_2}x_1 + x_2 = {p_1 \over p_2} e_1 + e_2
x_1 + {p_2 \over p_1}x_2 = e_1 + {p_2 \over p_1}e_2

Different Prices for Buying and Selling

Tickets

Money

If you sell all your tickets,
how much money will you have?

If you spend all your money on additional tickets, how many tickets will you have?

Suppose you have 40 tickets and $1200.

40 \text{ tickets} \times \$25/\text{ticket} = \$1000
\$1000 + \$1200 = \$2200

1200

40

E

2200

Slope = \(p^{\text{sell}}\) = $25/ticket

Slope = \(p^{\text{buy}}\) = $60/ticket

\$1200 \div \$60/\text{ticket} = 20\text{ tickets}
40\text{ tickets} + 20\text{ tickets} = 60\text{ tickets}

You can sell tickets for $25 each,
or buy additional tickets for $60 each.

60

pollev.com/chrismakler

What is the equation of the lower portion of the budget constraint?

E=(40,1200)

pollev.com/chrismakler

What about the upper portion?

E=(40,1200)

General formulation for endowment budget constraint:

p_1x_1 + p_2e_2 = p_1e_1 + p_2e_2

The endowment is \(E = (40,1200)\) and \(p_2 = 1\)
(because good 2 is dollars spent on other goods), so this becomes

p_1x_1 + x_2 = 40p_1 + 1200

Buying at \(p_1 = 60\)

Selling at \(p_1 = 25\)

60x_1 + x_2 = 3600
25x_1 + x_2 = 2200
40 \times 60 + 1200
40 \times 25 + 1200

Optimization

Remember the "gravitational pull" argument:

MRS > \frac{p_1}{p_2}

Indifference curve is
steeper than the budget line

Moving to the right
along the budget line
would increase utility

More willing to give up good 2
than the market requires

MRS < \frac{p_1}{p_2}

Indifference curve is
flatter than the budget line

Moving to the left
along the budget line
would increase utility

Less willing to give up good 2
than the market requires

MRS(x_1,x_2) = {\alpha x_2 \over (1-\alpha) x_1}
E=(40,1200)
MRS(40,1200) = {30\alpha \over 1-\alpha}

For what value(s) of \(\alpha\) would you want to buy more tickets?

MRS(x_1,x_2) = {\alpha x_2 \over (1-\alpha) x_1}
E=(40,1200)
MRS(40,1200) = {30\alpha \over 1-\alpha}

For what value(s) of \(\alpha\) would you want to buy more tickets?

You will buy more good 1 if the MRS at the kink is
greater than the price ratio moving to the right.

|slope| = $60/ticket

{30\alpha \over 1-\alpha} > 60
30\alpha > 60-60\alpha
90\alpha > 60
\alpha > {2 \over 3}

For what value(s) of \(\alpha\) would you want to buy more tickets?

\alpha > {2 \over 3}

Suppose \(\alpha = {3 \over 4}\).
How many tickets should I buy?

60x_1 + x_2 = 3600
MRS(x_1,x_2) = {\alpha x_2 \over (1-\alpha) x_1}

TANGENCY CONDITION

= {3x_2 \over x_1}
{3x_2 \over x_1} = 60
\Rightarrow \boxed{x_2 = 20x_1}

BUDGET CONSTRAINT

60x_1 + x_2 = 3600
60x_1 + \ \ \ \ \ \ \ \ \ \ = 3600
20x_1
x_1^* = {3600 \over 80} = \boxed{45}

Suppose \(\alpha = {3 \over 4}\).
How many tickets should I buy?

x_1^* = \boxed{45}

How to Solve a Kinked Constraint Problem

  • Evaluate the MRS at the kink
  • Compare it to the price ratio on either side of the kink
  • If \(MRS > {p_1 \over p_2}\) to the right of the kink, the solution is to the right of the kink; use the equation for that line and maximize.
  • If \(MRS < {p_1 \over p_2}\) to the left of the kink, the solution is to the left of the kink; use the equation for that line and maximize.
  • If the MRS is between the price ratios, then the solution is at the kink.
  • Note: if the price ratio to the left of the kink is greater than the price ratio to the left, it's more complicated...you could have two potential solutions! Maximize subject to each of the constraints and compare utility at the respective maxima.

Let's take a break.

 

After the break, we'll look at three more examples, of increasing complexity...

Next Unit: Demand

  • Solve for the optimal bundle as a function of prices and income
    • Demand functions
    • Demand curves
  • See how the optimal bundle changes as prices an income change
    • Movement along demand curve due to a change in own price
    • Shift of demand curve due to change in prices of other goods
    • Shift of demand curve due to change in income
  • Applications to finance: preferences over time and risk

Copy of Econ 50 | Fall 25 | Lecture 08

By Chris Makler

Copy of Econ 50 | Fall 25 | Lecture 08

Constrained Optimization when Calculus Doesn't Work

  • 38