The Mathematics of Optimization
Christopher Makler
Stanford University Department of Economics
Econ 50: Lecture 9
pollev.com/chrismakler
How many indifference curves are there of the utility function
\(u(x_1,x_2) = 2x_1 + x_2\)
if we're looking at a graph showing (0,0) to (10,10)?
Choice space:
all possible options
Feasible set:
all options available to you
Optimal choice:
Your best choice(s) of the ones available to you
Constrained Optimization
Choice Space
(all colleges plus alternatives)
Feasible Set
(colleges you got into)
Your optimal choice!
Preferences
Preferences describe how the agent ranks all options in the choice space.
For example, we'll assume that you could rank all possible colleges
(and other options for what to do after high school) based upon your preferences.
Preference Ranking
Found a startup
Harvard
Stanford
Play Xbox in parents' basement
Cal
Choice space
Feasible set
Optimal
choice!
Found a startup
Stanford
Cal
Harvard
Play XBox in parents' basement
Optimal choice is the highest-ranking option in the feasible set.
Today's Agenda
- Unconstrained optimization with one variable
- Constrained optimization with one variable
- Unconstrained optimization with two variables
- Constrained optimization with two variables
- Interpreting the Lagrange multiplier
Unconstrained Optimization
Think about maximizing each of these functions subject to the constraint \(0 \le x \le 10\).
Plot the graph on that interval; then find and plot the derivative \(f'(x)\) on that same interval.
Which function(s) reach their maximum in the domain [0, 10] at a point where \(f'(x) = 0\)?
pollev.com/chrismakler
Sufficient conditions for an interior optimum characterized by \(f'(x)=0\) with constraint \(x \in [0,10]\)
- \(f'(0) > 0\)
- \(f'(10) < 0\)
- \(f'(x)\) continuous and strictly decreasing on \([0,10]\)
Incorporating the Constraint into the Optimization Problem: The Lagrange Multiplier Method
OBJECTIVE FUNCTION
CONSTRAINT
EXAMPLE
OBJECTIVE FUNCTION
CONSTRAINT
Step 1: rewrite the constraint as a nonnegativity constraint
Step 2: create a new combined objective function that "punishes" you for increasing \(x\)
Step 3: take the derivative of this with respect to \(x\) and \(\lambda\) and set them equal to zero
OBJECTIVE FUNCTION
CONSTRAINT
Optimization in Two Variables
Constrained Optimization
Canonical Constrained Optimization Problem
Suppose \(g(x_1,x_2)\) is monotonic (increasing in both \(x_1\) and \(x_2\)).
Then \(k - g(x_1,x_2)\) is negative if you're outside of the constraint,
positive if you're inside the constraint,
and zero if you're along the constraint.
OBJECTIVE
FUNCTION
CONSTRAINT
FIRST ORDER CONDITIONS
3 equations, 3 unknowns
Solve for \(x_1\), \(x_2\), and \(\lambda\)
How does the Lagrange method work?
It finds the point along the constraint where the
level set of the objective function passing through that point
is tangent to the constraint
FIRST ORDER CONDITIONS
TANGENCY
CONDITION
CONSTRAINT
Example: Fence Problem
You have 40 feet of fence and want to enclose the maximum possible area.
Example: Fence Problem
You have 40 feet of fence and want to enclose the maximum possible area.
OBJECTIVE
FUNCTION
CONSTRAINT
FIRST ORDER CONDITIONS
TANGENCY
CONDITION
CONSTRAINT
TANGENCY
CONDITION
CONSTRAINT
Meaning of the Lagrange multiplier
Suppose you have \(F\) feet of fence instead of 40.
TANGENCY
CONDITION
CONSTRAINT
SOLUTIONS
Meaning of the Lagrange multiplier
Suppose you have \(F\) feet of fence instead of 40.
SOLUTIONS
Maximum enclosable area as a function of F:
Meaning of the Lagrange multiplier
Suppose you have \(F\) feet of fence instead of 40.
A Note on the Homework
- The last two problems show you situations in which the Lagrange method may fail
- Use the exercise you got in section but didn't have time to get to to derive some intuition for what's going on...
Next Week
- Use this technique to find Chuck's optimal choice along his PPF
- Review and prepare for the midterm
- SEND IN YOUR OAE LETTERS NOW!!!!
Econ 50 | Lecture 09
By Chris Makler
Econ 50 | Lecture 09
The Mathematics of Optimization
- 185