Beruflich Dokumente
Kultur Dokumente
Fanqi Shi
These notes briefly go over single and two variable unconstrained optimization, rules
for logs, convexity and concavity, the chain rule, level curves, implicit differentiation and
optimization with equality constraints.
1 Warm Up?
2. Introduction.
2 Motivation
(0,2)
(1,1)
0 (2,0) x1
1
In order to maximize or minimize it, we look at the “First-Order Condition” to find a
point of extremum.
• First-Order Condition
df (x)
f 0 (x) ≡ =0
dx
f (x)
(1,2)
(3,1.5)
(2,1)
0 (4,0) x
π = Revenue − Cost
= pq q − pl l
√
= 10 l − l (1)
2
Revenue/Cost
Revenue
Cost
0 Labor
The basic intuition from the single-variable case generalizes very well to the two-variable
case, with the differentials replaced by partial differentials.
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
Equations (2) and (3) are two equations in two variables which can be solved to get x∗ and
y∗.
ln(xa y b ) = a ln x + b ln y
Very Important: logs are monotonic transformations and transform a multiplicative re-
lationship into an additive one.
Remember the differentiation rule for logs?
1
It is a standard practice to denote the optimal quantities with a “*”.
3
6 Convexity and Concavity
(0,3) (0.5,2.5)
(1.5,1.5)
(2.5,0.5)
0 (3,0) x1
f (x)
convex set
1
f (x) = x
0 x
f (x)
√
f (x) = x
convex set
0 x
4
7 The Chain Rule
The mathematical formulation of the chain rule is this: if h(x) = f (g(x)), then
For example, suppose we have the function h(x) = (3x + 2)2 . We can rewrite this as
f (g(x)) if
f (g) = g 2
g(x) = 3x + 2
Therefore
df
= 2g
dg
dg
=3
dx
so we have
dh df dg
= × = 2(3x + 2) × 3 = 18x + 12
dx dg dx
To choose an example that’s a harbinger of things to come, let’s assume that there’s
a ”utility function” u(x1 , x2 ) that assigns a total ”utility” to consuming x1 units of good
1 and x2 units of good 2. Furthermore, let’s assume that given the prices p1 and p2 and
income m, we’ve figured out ”demand equations” x∗1 (p1 , p2 , m) and x∗2 (p1 , p2 , m). We now
want to figure out how much your utility would change due to a change in income. Well,
we can write
V (p1 , p2 , m) = u(x∗1 (p1 , p2 , m), x∗2 (p1 , p2 , m))
for what we’ll call the indirect utility of p1 , p2 , and m: that is, the utility you would get
if you made the optimal purchase decision based on p1 , p2 , and m. The derivative of this
with respect to income is
5
8 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,
9 Implicit Differentiation
dy
Go back to the motivation at the beginning, i.e. we want to know what dx is along f (x, y) =
c. To find this out, we take the partial derivative on both sides with respect to x:
d d
[f (x, y(x))] = [c]
dx dx
∂f (x, y) ∂f (x, y) dy
+ =0
∂x ∂y dx
In short, the rate at which the left-hand side changes due to a change in x is the direct
∂f (x,y)
change that is, ∂x plus the change due to the change in y, due to the change in x
that is, ∂f∂y
(x,y) dy
dx .
dy
Solving for dx yields:
∂f (x,y)
dy f1
= − ∂f∂x
(x,y)
=−
dx f2
∂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.
6
In general, suppose we want to maximize a function f (x, y) subject to the constraint
g(x, y) = 0. If lots of good conditions hold (and we’ll get into some of those in class),
the necessary ”first-order conditions” for an optimum are obtained by writing down the
function:
L(x, y, λ) = f (x, y) + λg(x, y)
and setting the partial derivatives of this function with respect to x, y, and λ to zero,
respectively.
∂L
= f1 + λg1 = 0 (1)
∂x
∂L
= f2 + λg2 = 0 (2)
∂y
∂L
=g=0 (3)
∂λ