Math of Optimization
Math of Optimization
OPTIMIZATION
From Nicholson and Snyder, Microeconomic Theory Basic
Principles and Extensions, 10th Edition, Chapter 2
f (q)
*
= f(q)
q*
Maximum profits of
* occur at q*
Quantity
3
0
q
*
2
= f(q)
q1
q2
q*
Quantity
4
0
q
*
= f(q)
3
q*
q3
Quantity
5
Derivatives
The derivative of = f(q) is the limit of /q
for very small changes in q
f (q1 h) f (q1 )
d df
lim
dq dq h0
h
q q1
0
q q1
d
dq
0
q q3
d
dq
0
q q*
7
df
0
dq q q*
q*
Quantity
9
and
d
0 for q q *
dq
10
Second Derivatives
The derivative of a derivative is called a
second derivative
The second derivative can be denoted by
d
2
dq
2
or
d f
2
dq
or f "( q)
11
f "(q) q q* 0
q q*
12
db
If b is a constant, then
0
dx
d [bf ( x)]
If b is a constant, then
bf '( x)
dx
b
dx
If b is constant, then
bx b 1
dx
d ln x 1
dx
x
13
5.
d ln x 1 da
a x ln a
dx
x dx
for any constant a
14
d [ f ( x) g ( x)]
f '( x) g '( x)
dx
d [ f ( x) g ( x)]
f ( x) g '( x) f '( x) g ( x)
dx
15
g ( x)
f '( x) g ( x) f ( x) g '( x)
8.
dx
[ g ( x)]2
provided that g ( x) 0
16
9.
dy dy dx df dg
= =
dz dx dz dx dz
de ax
de ax d (ax )
10.
e ax a ae ax
dx d (ax) dx
d [ln(ax)] d [ln(ax)] d (ax) 1
1
11.
a
dx
d (ax)
dx
ax
x
12.
d [ln( x 2 )] d [ln( x 2 )] d ( x 2 ) 1
2
2 2x
2
dx
d (x )
dx
x
x
18
-10,
19
y f ( x1 , x2 ,..., xn )
20
Partial Derivatives
The partial derivative of y with respect to x1 is
denoted by
y
f
or
or f x1 or f1
x1
x1
It is understood that in calculating the partial
derivative, all of the other xs are held constant
21
Partial Derivatives
A more formal definition of the partial
derivative is
f
x1
x2 ,..., xn
f ( x1 h, x2 ,..., xn ) f ( x1 , x2 ,..., xn )
lim
h 0
h
22
and
f
f 2 bx1 2cx2
x2
2.
If y f ( x1 , x2 ) e
ax1 bx2
, then
f
f
ax1 bx2
f1 ae
and
f 2 be ax1 bx2
x1
x2
23
24
Partial Derivatives
Partial derivatives are the mathematical
expression of the ceteris paribus
assumption
show how changes in one variable affect some
outcome when other influences are held
constant
25
Partial Derivatives
We must be concerned with how variables
are measured
if q represents the quantity of gasoline
demanded (measured in billions of liters) and p
represents the price in dollars per liter, then
q/p will measure the change in demand (in
billions of liters per year) for a dollar per liter
change in price
26
Elasticity
Elasticities measure the proportional effect
of a change in one variable on another
unit free
ey , x
y
y x y x
y
x x y x y
x
27
In this case,
ey , x
y x
x
x
b b
x y
y
a bx
ey , x
y x
x
b 1
abx b b
x y
ax
29
In this case,
ey , x
y x
ln y
b
x y
ln x
(f / xi ) f
f ij
x j
x j xi
2
31
Youngs Theorem
Under general conditions, the order in which
partial differentiation is conducted to evaluate
second-order partial derivatives does not
matter
f ij f ji
32
f1 f 2 ... f n 0
A point where this condition holds is called a critical point
35
Finding a Maximum
Suppose that y is a function of x1 and x2
y = - (x1 - 1)2 - (x2 - 2)2 + 10
y = - x12 + 2x1 - x22 + 4x2 + 5
OR
x1* 1
x2* 2
36
f ( x, y ) 0
0 f x dx f y dy
fx
dy
dx
fy
dy
Hence, the implicit derivative
can be found
dx
as the negative of the ratio of partial derivatives
of the implicit function.
38
dy f x 4 x 2 x
dx
fy
2y
y
39
40
y = -x2 + ax
For different values of a, this function
represents a family of inverted parabolas
If a is assigned a specific value, then y
becomes a function of x only and the value of x
that maximizes y can be calculated
41
V
alu01eofaV
alu1e0/2ofx*V
alu1e0/4ofy*
234 31
1
/
2
9
/
4
2
4
56 53/2 259/4
42
y*=f(a)
As a increases,
the maximal value
for y (y*) increases
The relationship
between a and y
is quadratic
43
44
Substituting, we get
y* ( x*) 2 a( x*) (a / 2) 2 a( a / 2)
y* a 2 / 4 a 2 / 2 a 2 / 4
45
46
47
dy * y
{x x *(a )}
da a
48
49
*
1
x = x (a ),
x2* = x2* (a ),
x (a ).
*
n
*
n
50
Differentiating yields
dy * f dx1 f dx2
f dxn f
...
da x1 da x2 da
xn da a
51
dy * f
{x x *(a )}
da a
52
x1* 1, x2* 2, y* 10
53
Constrained Maximization
What if all values for the xs are not feasible?
the values of x may all have to be positive
a consumers choices are limited by the amount
of purchasing power available
L / xn f n g n 0
L/ g ( x1 , x2 ,..., xn ) 0
57
58
59
marginal cost of xi
60
61
62
Duality
Any constrained maximization problem has
associated with it a dual problem in
constrained minimization that focuses
attention on the constraints in the original
problem
63
Duality
Individuals maximize utility subject to a
budget constraint
dual problem: individuals minimize the
expenditure needed to achieve a given level of
utility
Constrained Maximization
Suppose a farmer had a certain length of fence
(P) and wished to enclose the largest possible
rectangular shape
Let x be the length of one side
Let y be the length of the other side
Problem: choose x and y so as to maximize the
area (A = xy) subject to the constraint that the
perimeter is fixed at P = 2x + 2y
65
Constrained Maximization
Setting up the Lagrangian multiplier
L = xy + (P - 2x - 2y)
66
Constrained Maximization
Since y/2 = x/2 = , x must be equal to y
the field should be square
x and y should be chosen so that the ratio of
marginal benefits to marginal costs should be the
same
67
Constrained Maximization
Interpretation of the Lagrangian multiplier
if the farmer was interested in knowing how much
more field could be fenced by adding an extra yard
of fence, suggests that he could find out by
dividing the present perimeter (P) by 8
thus, the Lagrangian multiplier provides
information about the implicit value of the
constraint
68
Constrained Maximization
Dual problem: choose x and y to minimize the
amount of fence required to surround the field
minimize P = 2x + 2y subject to A = xy
69
Constrained Maximization
First-order conditions:
LD/x = 2 - Dy = 0
LD/y = 2 - Dx = 0
LD/D = A - xy = 0
Solving, we get
x = y = A1/2
Inequality Constraints
In some economic problems the constraints
need not hold exactly
For example, suppose we seek to maximize y
= f(x1,x2) subject to
g(x1,x2) 0,
x1 0, and
x2 0
73
Inequality Constraints
One way to solve this problem is to introduce
three new variables (a, b, and c) that convert
the inequalities into equalities
To ensure that the inequalities continue to
hold, we will square these new variables to
ensure that their values are positive
74
Inequality Constraints
g(x1,x2) - a2 = 0;
x1 - b2 = 0; and
x2 - c2 = 0
75
Inequality Constraints
We can set up the Lagrangian
L = f(x1,x2) + 1[g(x1,x2) - a2] + 2[x1 - b2] + 3[x2 - c2]
76
Inequality Constraints
L/x1 = f1 + 1g1 + 2 = 0
L/x2 = f1 + 1g2 + 3 = 0
L/a = -2a1 = 0
L/b = -2b2 = 0
L/c = -2c3 = 0
L/1 = g(x1,x2) - a2 = 0
L/2 = x1 - b2 = 0
L/3 = x2 - c2 = 0
77
Inequality Constraints
According to the third condition, either a or
1 = 0
if a = 0, the constraint g(x1,x2) holds exactly
if 1 = 0, the availability of some slackness of
the constraint implies that its value to the
objective function is 0
Inequality Constraints
These results are sometimes called KuhnTucker conditions
they show that solutions to optimization
problems involving inequality constraints will
differ from similar problems involving equality
constraints in rather simple ways
we cannot go wrong by working primarily with
constraints involving equalities
79
80
85
86
Constrained Maximization
Suppose we want to choose x1 and x2 to
maximize
y = f(x1, x2)
Constrained Maximization
The first-order conditions are
f1 - b1 = 0
f2 - b2 = 0
c - b1x1 - b2x2 = 0
Constrained Maximization
Only the values of x1 and x2 that satisfy the
constraint can be considered valid alternatives
to the critical point
Thus, we must calculate the total differential of
the constraint
-b1 dx1 - b2 dx2 = 0
dx2 = -(b1/b2)dx1
Constrained Maximization
Because the first-order conditions imply that
f1/f2 = b1/b2, we can substitute and get
dx2 = -(f1/f2) dx1
Since
d 2y = f11dx12 + 2f12dx1dx2 + f22dx22
Constrained Maximization
Combining terms and rearranging
d 2y = f11 f22 - 2f12f1f2 + f22f12 [dx12/ f22]
93
94
Homogeneous Functions
A function f (x1,x2,xn) is said to be
homogeneous of degree k if
f (tx1,tx2,txn) = tk f(x1,x2,xn)
when a function is homogeneous of degree one, a
doubling of all of its arguments doubles the value
of the function itself
when a function is homogeneous of degree zero,
a doubling of all of its arguments leaves the value
of the function unchanged
95
Homogeneous Functions
If a function is homogeneous of degree k, the
partial derivatives of the function will be
homogeneous of degree k-1
96
Eulers Theorem
If we differentiate the definition for
homogeneity with respect to the
proportionality factor t, we get
ktk-1f(x1,,xn) = x1f1(tx1,,txn) + + xnfn(x1,,xn)
97
Eulers Theorem
Eulers theorem shows that, for homogeneous
functions, there is a definite relationship
between the values of the function and the
values of its partial derivatives
98
Homothetic Functions
A homothetic function is one that is formed by
taking a monotonic transformation of a
homogeneous function
they do not possess the homogeneity properties of
their underlying functions
99
Homothetic Functions
For both homogeneous and homothetic
functions, the implicit trade-offs among the
variables in the function depend only on the
ratios of those variables, not on their absolute
values
100
Homothetic Functions
Suppose we are examining the simple, two
variable implicit function f(x,y) = 0
The implicit trade-off between x and y for a
two-variable function is
dy/dx = -fx/fy
Homothetic Functions
The implicit trade-off between x and y is
t k 1 f x (tx, ty )
f x (tx, ty )
dy
k 1
dx
t f y (tx, ty )
f y (tx, ty )
If t = 1/y,
x
F ' f x ,1
y
dy
dx
x
F ' f y ,1
y
f x
f y
x
y ,1
x
y ,1
102
Homothetic Functions
The trade-off is unaffected by the monotonic
transformation and remains a function only of
the ratio x to y
103
104
105
106
107
108
109
110
111