You are on page 1of 7

Econ 50: Section 1 Modified Version

September 25, 2015

These notes cover Single and Two-Variable Unconstrained Optimization, Optimization


with Equality Constraints, Level Curves and Implicit Differentiation. You will need to have
prior knowledge of calculus to read these notes profitably.

1 Administration

1. Fanqi Shi (email: ericshi@stanford.edu); office hours: Thursday 3:30-5:30 p.m.

2. Dropbox folder

3. My focus will be on intuitions and understanding!!

2 Single-Variable Unconstrained Optimization

Intuition for the use of calculus: marginal (incremental) changes=derivatives


(Graph Here)

A substantial part of these notes is based on notes from a previous TA. These notes are at best a
summary of the section. They are not intended to and will not serve as a substitute to attending the section.

1
Consider a differentiable function f (x).
In order to maximize or minimize it, we look at the First-Order Condition to find
a point of extremum and check the Second Order Condition to test whether its a local
maximum or minimum (or neither).

First-Order Condition
df (x)
f 0 (x) =0
dx
Second-Order Condition (not as important as graphs)

d2 f (x)
f 00 (x) > 0, minimum
dx2
< 0, maximum
= 0, point of inflexion

(Graph Here)

Common Derivatives and Basic Differentiation Rules


(x )0 = x1 ( real) (ax )0 = ax ln(a)
x 0
(e ) = e x (ln(|x|))0 = x1 (x 6= 0)
(cf )0 = cf 0 (c constant) (f

0
 g) = f 0 g0
f f gf g 0
0
(f g)0 = f 0 g + f g 0 (product rule) g = g2
(g 6= 0) (quotient rule)
g 0 (x)
f (g(x)) = f 0 (g(x))g 0 (x) (chain rule) (ln g(x))0 = g(x)

Lets look at an application to an economics problem.

2
Suppose a firms output (denoted q) isdetermined by the amount of labor (denoted l) it
hires, according to the function q(l) = 2 l. Further, assume that the firm can hire all the
labor it wants at a price (denoted pl ) of $10 per unit and sell its output at a price (denoted
pq ) of $50 per unit. How much labor should the firm optimally hire?
The objective of any firm is to maximize its profit (denoted ). So, lets look at the
profit maximization problem of this firm.
= Revenue Cost
= pq q pl l

= 100 l 10l (1)
So, this firm wants to maximize , given in (1), as a function of l.
(Graph here)

The first-order condition yields the optimal level of labor l = 251 . You can also check
the second-order condition to ensure this indeed gives a local maximum.

3 Two-Variable Unconstrained Optimization

The basic intuition from the single-variable case generalizes very well to the two-variable
case. The differentials are replaced by partial differentials and the second-order condition
becomes (slightly) more complex.
Consider a function f (x, y) differentiable in both x and y.

First-Order Condition
f (x, y)
f1 (x, y) =0 (2)
x
f (x, y)
f2 (x, y) =0 (3)
y
1
It is a standard practice to denote the optimal quantities with a *.

3
Equations (2) and (3) are two equations in two variables which can be solved to get
x and y .

Second-Order Condition
Forget about it or look at the original section notes.

Lets again look at an application to economics.


We simply extend the example used previously. Now add capital (denoted k) as an input
as well. Change the production function to q(l, k) = l k for some constants > 0, > 0
and let pk = 10 as well. What should the optimal l and k be?
The solution is left as an exercise. (Do not get involved in the algebra of this problem
just set-up the problem and see for yourself how math can be used in econ.)

4 Level Curves

Definition 1. Given a constant c, the level curve for a function f (x, y) is the set of all
points (x, y) such that f (x, y) = c. Formally,

L(f ; c) = {(x, y) R2 |f (x, y) = c}2

Example 2. Let f (x, y) = x + y and c = 1. Then L(f ; 1) is just the line x + y = 1.

Why do we care about level curves in economics? They turn out to be a very useful
tool. You will encounter them as you proceed in the course (most commonly as Indifference
Curves) but to give you an example, think of the production problem weve considered so
far. What would the level curve for q(l, k) (the production function), for lets say c = 50,
give us? It gives us the set of all combinations of capital and labor that would give an
output of 50.

5 Implicit Differentiation

Sometimes we are interested in finding the slope along a level curve, i.e. we want to know
dy
what dx is along f (x, y) = c. This is given in the following proposition.
dy f1
Proposition 3. =
dx f (x,y)=c f2

2
The notation L(f ; c) is not standard.

4
Proof. This is a simple consequence of the Total Differential3 of f (x, y) = c.

dc = f1 dx + f2 dy
0 = f1 dx + f2 dy
dy f1
=
dx f2

Alternative Way: Think of y as a function of x!

As an example, consider the level curve of q(l, k) just described above. The slope of this
dl
level curve, i.e. dk tells us how much we need to change the labor input as the amount of
capital input changes along this particular level curve.

6 Optimization with Equality Constraints

Consider the following problem.



max xy x2 s.t. y = 10
x,y

How would you solve this problem? A very simple way to do this is to substitute y = 10
into the objective function and maximize as a function of x only.
But what about

x+y
max xy s.t. = 10
x,y x + y2

There is no easy way to reduce this into a problem of a single variable or to express one
variable as a function of the other variable in order to get rid of the constraint. What we
need here is a very clever tool called the Lagrangian Function. In general, if the problem
is

max f (x, y) s.t. g(x, y) = c


x,y

where f and g and are functions of x and y and c is a constant, then the Lagrangian is

L(x, y, ) = f (x, y) + (c g(x, y))


3
Total Differential of z = f (x, y) is dz = f1 dx + f2 dy.

5
where is called the Lagrange Multiplier. So, how does this help us? In math, a very
commonly used technique is to reduce a problem we dont know to a form we can handle.
We all know how to solve the problem

max L(x, y, )
x,y,

It turns out, the (x , y ) that solve this new problem are the solution to the original problem
as well !! (In the new problem, you will also get an optimal value for ).
To solve the new problem, we simply look at the three first-order conditions:

L1 = f1 g1 = 0
L2 = f2 g2 = 0
L3 = c g(x, y) = 0

to get (x , y , ). If you find more than one set of solutions to the above equations, then
the one that gives you the highest value of f is the one you want.
What about second-order conditions? Well, they do exist but again we shall not bother
with them here. Now try solving the following problem using the method just described
(even though there is an easier way to solve it)

max xy s.t. x + y = 10
x,y

What if you have to find the minimum? i.e. How would you solve the problem

min f (x, y) s.t. g(x, y) = c


x,y

The answer is rather simple. Use the same method! (why?)


Here is an example from economics.

min pl l + pk k s.t. l k = 50
l,k

This is the Cost-Minimization problem the objective is to minimize cost subject to the
constraint that the production has to be 50.

Intuition/Proof Sketch of the Lagrange Multiplier (optional): Go back to the first example
in Section 6. Our idea was to substitute one variable for another. Now suppose y is
a function of x (though we may not express it explicitly) and we write y = y(x). The
maximization problem can be written as:

max f (x, y(x)) s.t. g(x, y(x)) = c (1)


x

6
From the unconstrained optimization problem, we have f1 + f2 y 0 (x) = 0. Differentiate the
constraint on both sides w.r.t x and we get g1 + g2 y 0 (x) = 0. Combine the two equations
and we get f1 g2 = f2 g1 , which is the exactly what the first two conditions of the Lagrangian
say. The last condition is just the equality constraint.

You might also like