50
Chapter 2 Mathematics of Optimization Many economic concepts can be expressed as functions (eg., cost, utility, profit), To be optimized (maximized or minimized), Subject to or not subject to constraints (eg., income or resource constraints). Optimizing a function of one variable (unconstrained):

Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Embed Size (px)

Citation preview

Page 1: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Chapter 2 Mathematics of Optimization

• Many economic concepts can be expressed as functions (eg., cost, utility, profit),

– To be optimized (maximized or minimized), – Subject to or not subject to constraints (eg.,

income or resource constraints). • Optimizing a function of one variable

(unconstrained):

Page 2: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Maximization (one variable and no constraint)

• To maximize π=f(q), look at changes in π as q increases.

• As long as Δ π > 0, π increases.

• Can express Δ’s as a ratio ; could be + or -.

• Limit of ratio as Δq 0 is derivative of π=f(q).

• For q<q*, derivative >0. • For q>q*, derivative <0. • At q*, derivative = 0.

ΔqΔΠ

∆q>0 q* ∆q>0 q

∆Π<0

∆Π=0 Π

∆Π>0

Π=f(q)

Π =f(q) is concave.

Page 3: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Minimization (one variable and no constraint)

• To minimize AC=f(q), look at ∆AC as q

increases. • As long as ∆AC<0, AC

is decreasing. The change ratio is Limit of ratio as ∆q 0 is

derivative of AC=f(q). For q<q**, derivative < 0. For q>q**, derivative > 0. At q= q** , derivative = 0.

qAC∆∆

0dq

dAC< 0

dqdAC

>

q** q

AC

AC = f(q)

AC =f(q) is convex.

Page 4: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• First derivative is the slope of a line tangent to the function at a point.

• Derivative is denoted as:

• To maximize or minimize f(q), find q value where: • Derivative will be a constant if the original function

is linear; thus, the function has no Max or Min. • But if the function is nonlinear, its derivative will be

a function of q itself (the derivative varies as q varies).

• For derivative at a specific value of q, say q1, denote At q*,

f(q)fordqdfor

dqdACor

dqdΠ ′=′

0dqdf

=

.dqd

1qq=Π 0.

dqd

*qq =Π

=

q

Π

0

Slope = dπ/dq at the point of tangency.

Page 5: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• To find the q where Π is maximized or AC is minimized, find the derivative of f(q), and set it equal to 0 and solve for q to get q*.

• The “First Order Condition (FOC)” for a maximum or a minimum of an unconstrained function of one variable is:

FOC is Solve the FOC for q to

get q* (the optimal q). The FOC is a necessary condition for a maximum

(or minimum) but not a sufficient condition.

.0dqdf

=

Page 6: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Second Order Condition (SOC)

.0 is FOC The =dxdyy

x 0dxdy

=

Convex function

0 0

dxdy

= x

y Concave function

0

y

x

Inflection point

0dxdy

=

Concave then convex

Convex then concave

0

dxdy

x 0

FOC is necessary but not sufficient

0 x Increases through 0

dxdy

dxdy Decreases

through 0

x 0

Take the derivative (second derivative) of the derivative (first derivative). 0*x

dxyd2

2

> 2

2

dxyd

0 + 0 - Min

Max

0*xdx

yd2

2

<2

2

dxyd

x

2

2

dxyd Inflection

0 x x

x* x*

x* x*

x*

x*

x* x*

x*

0x*dx

yd2

2

=

Page 7: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Examples: y

x

MAX

MIN

0dxdy

=

0dxdy

> 0dxdy

<

0dx

yd2

2

>0dx

yd2

2

<

0dxdy

> 0dxdy

>

0dx

yd2

2

< 0dx

yd2

2

>

0dx

yd2

2

=

0dxdy

=

0dx

yd2

2

=0

dxyd2

2

=

Local maximum and local minimum

Page 8: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

An inflection point is where the second derivative equals zero when evaluated at the q* identified by the FOC.

When the first derivative equals zero, you have a minimum, maximum, or an inflection point. Not all inflections have

SOC if have a maximum at q*

if have a minimum at q*

if have an inflection at q*

Max Min

FOC

SOC Solve FOC for q* and evaluate at q*.

,0f *q >′′

,0f *q =′′

For an unconstrained function of one variable

0f =′ 0f =′0f *q <′′

.0f =′

,0f *q <′′

0f *q >′′f ′′

Page 9: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Rules for Finding Derivatives 1.The derivative of a constant is 0. If b is a constant in y = b, then y = a + bx, the derivative of a with respect to x is 0. 2. The Power Rule – The derivative of a variable raise to a power is

.0dxdb

dxdy

==

,baxdx

dax 1bb

−=

.bxdxdx 1b

b−=,1

dxdx

=

,aaxdxdax 11 == −

Parameters Variable

Page 10: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• Examples: For y = a+bx2 y = a+bx+cx2+ex3

bx2dxdy

= 2ex3cx2bdxdy

++=Anything raised to the 0 power is 1!

b2dx

yd2

2

= ex6c2dx

yd2

2

+=

Review of the FOC and SOC for an unconstrained function of one variable:

Find x* from the FOC then look at SOC by substituting x* into

to see if second derivative evaluated at x* is >, <, or = 0.

( ),0dxdy

=2

2

dxyd

FOC 2bx=0 ⇒x*=0

b2f *x =′′

Page 11: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• The derivative of the natural log of x is the inverse of X, The actual rule is because If ,

x25

dxdy ⋅

=

.x1

dxxlnd

dxdy

==

xbc

dx)dbln(xc

=

xc

dxdclnxandclnx)ln(xc ==

),5ln(x3y 2+=xbc

dxdbclnxandbclnx)bln(xc ==

May not always have the parentheses.

Page 12: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

The exponential function rule - For y = the derivative of the exponent (bx) times the original function times the natural log of the constant (a).

Can give constants different labels than above. If then

lna,balnaadx

dbxdx

da bxbxbx

==

,acy x= .clnacdxdy x=

alnadxda x

x

=

xxxx

e)1(eelnedxde

===,be)1(beelnbedx

de bxbxbxbx

===

,abx

( )bxa=

dxdy

e is the base of natural logarithms = 2.71828, so that lne = 1.

Page 13: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

The Sum of Two Functions Rule –

The derivative of the sum of two functions of x is the sum of derivatives of the two functions:

Example: If y = ax + bx2, then a +2bx.

[ ] ).x(g)x(fdx

)x(g)x(fd ′+′=+

=dxdy

Page 14: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

The Product Rule – The derivative of the product of two functions of x is the first times the derivative of the second plus the second times the derivative of the first.

Example: y = (2x-1)(2-9X2)

[ ] )x(f)x(g)x(g)x(fdx

)x(g)x(fd ′+′=⋅

2

22

2

x54x184)x184()x18x36(

)2)(x92()X18)(1X2(dxdy

−+=

−++−=

−+−−=

Page 15: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

The Quotient Rule - The derivative of the quotient of two functions of x is the derivative of the top times the bottom minus the top times the derivative of the bottom all divided by the bottom squared. Ex 1: If Ex 2: If Or

[ ]2)x(g)x(g)x(f)x(g)x(f

dx)x(g)x(fd

′−′=

,2x

xy 2

3

+= ( )

4x4xx6x

4x4x)x2(x2xx3

dxdy

24

24

24

322

+++

=++

−+=

,x1y 4=

( ) 558

3

8

34

x4x

4x

x4x

)x4(1x0dxdy −−=

−=

−=

−=

5x4dxdy −−=,x

x1y 4

4−==

Page 16: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

The Chain Rule - Allows differentiation of complex functions in terms of elementary functions. If and so that

then )x(fy = )z(gx =

)),z(g(fy =

dzdg

dxdf

dzdg

)z(dgdf

dzdx

dxdy

dzdy

⋅=⋅=⋅=

Page 17: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Examples:

1. 3123

12 xyso,z2zx,)z2z(y =+=+=

+=

+==

−2z2

dzdx)z2z(

31

dxdy

dzdy 3

22

( )3

22

322

)z2z(3

)1z(2)2z2(z2z31

+

+=++=

Page 18: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Examples:

3. )2x4xln(y 2 +−=

2x4x4x2)4x2(

2x4x1

dxdy

22 +−−

=−⋅+−

=

2. ,)1x3(y 2+= 6x183)1x3(2dxdy

+=+=w w

w

dxdw

dwdy

Page 19: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Functions of More than One Variable “Partial” derivatives – May want to know how y

changes as one of several x variables changes, ceteris paribus (as in demand curve).

Several derivatives can be taken; one with respect to

each Xi holding the other variables constant. Denoted as:

When taking this derivative, all other xi’s are treated as constants. Fortunately, the rules for derivatives of functions of one variable apply to partial derivatives also. We simply treat the other x’s as constants.

( )n321 x,...,x,x,xfy =

ixi

ffxy

i==

∂∂

Page 20: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Second Order Partial Derivatives are analogous to the early one-variable case. Denoted as:

ijji

2

fxxy

=∂∂

There are four combinations in the two variable case, fij, fii, fji, and fjj; but fij and fji are equal (Young’s Theorem). The order of differentiation does not matter.

Partial derivatives reflect the units of measurement for y and x. If y = quantity of apples demanded per year in 100 pound units and x is the price of apples per pound, ∂y/∂x measures the change in the quantity of apples demanded in 100 pound units per year for a dollar change in the apple price, ceteris paribus. If demand were measured in pounds per year, the partial derivative would be 100 time larger than when demand is measured in 100 pounds per year.

“cross second partial” i≠j

“own second partial” i=j

Page 21: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example 1: 22 I36P201000Q +−=

,P40PQ

−=∂∂ ,0

IPQ2

=∂∂

∂ 40PP

Q2

−=∂∂

,I72IQ=

∂∂

,0PI

Q2

=∂∂

∂ 72II

Q2

=∂∂

Example 2: IPI36P201000Q 22 ++−=

,IP40PQ

+−=∂∂ ,1

IPQ2

=∂∂

∂40

PPQ2

−=∂∂

,PI72IQ

+=∂∂

,1PI

Q2

=∂∂

∂ 72II

Q2

=∂∂

Page 22: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Total Differential The total differential shows what happens to y

as both x1 and x2 change simultaneously. The total differential is To find a maximum or minimum for y (where dy

= 0 as x1 and x2 change), the FOC is that all because then dy = 0! That is, all the first partial derivatives must be 0. This happens at the “top of the Hill” in

three dimensions or the “bottom of the hole”.

22

11

dxxfdx

xfdy

∂∂

+∂∂

=

0xf

i=∂

x2

x1

f2

f1

Page 23: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example 1: To find max. or min. for

we must find where both first partials equal zero (FOCs) and solve the FOCs simultaneously for and .

FOC 1:

FOC 2:

Example 2:

5,4xx2xxy 22

212

1 ++−+−=

02x2xy

11

=+−=∂∂

04x2xy

22

=+−=∂∂

2x2 1 =

4x2 2 = 2x*2 =

These FOCs are not sufficient; could be a maximum, a minimum, or a saddle point. All we know is that it is a flat spot! Need SOCs (later).

1x*1 =

*1x *

2x

,xx54xx2xxy Optimize 2122

212

1 −++−+−=FOC 1: FOC 2:

22xx0x22xxy

12211

+−=⇒=−+−=∂∂

0x42)-2(-2x0x42xxy

11122

=−++⇒=−+−=∂∂

2xand0x *2

*1 ==⇒ Plug these optimal values into y to get y* = 9.

Plug these optimal values into y to get y* = 10.

Page 24: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Implicit Functions • Usually express functions explicitly as y = f(x1, x2 ,…, xn) where y is a function of xi. • However, some functions will be expressed

implicitly as 0 = f(x1, x2 ,…, xn, y) where there is no dependent variable.

• Can find:

Remember the negative sign.

yi ff

dxdy i−=

iff

dydx yi −=and

i

j

ff

dxdx

j

i −=or

Page 25: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example

044y2xyxy)f(x, 22 =++−+=

2x2fx −= 4y2fy +=

2yx1

2y1x

4y22x2

dxdy

+−

=+−

−=+−

−=

x12y

22x42y

dydx

−+

=−+

−= Remember the sign!

Examples of implicit functions are production possibility curves, indifference curves, budget constraints.

Page 26: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Envelope Theorem

• Deals with how the optimal value of the function (y*) changes as the value of one of the parameters changes (What are parameters?)

• Theorem states that one can calculate by holding independent variables at their optimal values in the function and finding .

ay∂∂ ∗

dady

)x,...,x,f(xy *n

*2

*1=∗

Page 27: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example: bxaxxy 2 ++−=

First, find the FOC: ,0bax2dxdy

=++−=

2bax* +

=Second, solve FOC for x: Third, substitute x* into y to get:

4)ba(

2bab

2baa

2bay

22 +=

+

+

+

+

+−=∗

Forth, partially differentiate with respect to a:

(Partial derivative because b is constant)

∗y2

baay +

=∂∂ ∗

Page 28: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Thus, depends only on values of a and b, but no variables!

Assume b=2 then:

=∂∂

=

=∂∂

=

=∂∂

=

=+

=∂∂

1ay,0a

2ay,2a

3ay,4a

22a

ay

*

*

*

*

2ba

ay +

=∂∂ ∗

ay∂∂ ∗

Example cont’d From previous slide

In many-variable case, solve all FOC simultaneously for xi*(a) and substitute into y to get y* = f(x1

*, x2*, …, xn

*), then .ay

dady *

∂∂

=

Page 29: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Constrained Optimization

• Because we are looking at scarce resources, we usually must find an optimum value subject to one or more constraints (limits). These may prevent us from achieving the maximum (or minimum) of the objective function.

Page 30: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Lagrangian Multiplier Method Mathematical “voodoo” to short-cut optimization subject to a constraint. The following is an important format for setting up a constrained optimization problem.

Max (Min): )x,...,x,x,x(fy n321=s.t. )x,...,x,x,x(g0 n321=

Implicit form!

Where λ is the Lagrangian multiplier.

Constraint example: x1 + 2x2 + x3 = 3

Set up )x,...,x,x,x(g)x,...,x,x,x(fL n321n321 λ+=

)x,...,x,x,x(gxx2x30 n321321 =−−−=Value of constraint

Objective function to be optimized

Constraint

Page 31: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Find FOC for each xi and λ:

==λ∂∂

=λ+=∂∂

=λ+=∂∂

=λ+=∂∂

=λ+=∂∂

0)x,...,x,x(gL

0gfxL

0gfxL

0gfxL

0gfxL

n21

nnn

333

222

111

FOC

Page 32: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Lagrangian Multiplier Method (cont)

Solve these n + 1 FOCs simultaneously to find values for and

These are optimum values of the xis given the constraint.

Substituting the into y will give

These conditions are necessary, but not sufficient for an optimum. Look at Second Order Conditions (SOC) later.

,x,...,x,x,x *n

*3

*2

*1 .*λ

*ix .y*

Page 33: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

)x,...,λ2g2(x)x,...,λ1g1(x)x,...,f(xL n1n1n1 ++=

You can use the Lagrangian method for any number of xi (i=1…n)and for any number of constraints. Just add another λj (j=1…m) for each constraint, gj (j=1…m).

Page 34: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Interpretation of λ

Solve the first FOC for λ to get:

1

11111 g

fλ,fλg0,λgf−

=−==+

Do it for all n FOC to get:

n

n

2

2

1

1

gf...

gf

gf

−==

−=

−=λ

Because all ratios equal λ, all ratios are equal. i

i

gfλ−

=

Page 35: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• At optimum (Max or Min of y), the negative of the ratios of the partial derivatives (objective/constraint) with respect to each xi are equal and equal to λ.

• The fi shows the marginal contribution (benefit) of xi to y (the objective function), while the –gi shows the marginal cost of xi in the constraint. That is, –gi shows how much the other xis must be reduced when xi is increased slightly, and therefore, how much y is foregone if the constraint is to hold.

Page 36: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• Because λ = the ratio of marginal benefit to marginal cost for all xi, all these ratios are equal. This condition is necessary for a maximum (or minimum). That is, the Margin Benefit/Marginal Cost ratios must be equal for all xi and equal to λ. If one xi ratio were larger than the others, then more xi should be used and less of other xis should be used until the ratios are equal again.

Page 37: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• λ* indicates how y * would be affected by relaxing the constraint slightly. λ* is the shadow price for a unit of the resource represented by the constraint (the value of an additional unit of the resource). If λ* = 0, the constraint is redundant and the optimum is unconstrained. An additional unit of the resource would be worth nothing in regard to increasing y.

• If λ* is large, relaxing the constraint would be very beneficial because the benefit/cost ratio is high.

• Relaxing the constraint refers to increasing (decreasing) the value of the constraint in a maximization (minimization) problem!

Page 38: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Duality

• Any constrained Max (Min) problem (called the primal problem) is associated with a constrained Min (Max) problem (called the dual problem). – Primal (Dual) may be: Max Utility s.t.

Income; or Min Cost s.t. Output level. – Dual (Primal) would be: Min Expenditures

s.t. Utility level; or Max Output s.t. Cost level.

Always two ways to look at any constrained optimization problem.

Page 39: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example: Primal x5xy3yxz)y,x(f 22 ++−==Min:

s.t. 0y2x =−2y)xλ(05x3xyyxL 22 +−+++−=

05y3x2xL

=λ−++=∂∂

FOCs 02x3y2yL

=λ++−=∂∂

0y2xL=+−=

λ∂∂

1.

2.

3.

Page 40: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Primal example (cont.) Simultaneous Solution

0104y7x02λ02y3x02λ106y4x

=++

=++−=−++1. Multiply FOC 1 by 2 and add it to FOC 2.

2. Solve FOC 3 for x to get

3. Substitute x into above result to get:

This gives:

4. Substitute into x=2y from FOC 3 to get:

5. Substitute and into FOC 1 to get:

6. Substitute and into z to get:

7. Optimal solution is:

.y2x =

.010y4)y2(7 =++

.95y* −=

.910)95(2x* −=−=*y*x *y .910* =λ*x *y .81225z* −=

,910x* −= ,95y* −= ,81225z* −=

If you could relax the constraint by one unit (decrease it by one unit from 0 to -1), shows that would decrease by 10/9 of a unit. *λ *z

.910λ* =

Page 41: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Example: Dual

y2xw −=Max:

s.t.: 81225x5xy3yx 22 −=++−

5x)3xyyx81225(λ2yxL 22D −−+−−+−=

The constraint in implicit form is: 0 = –225/81 – f(x,y).

From the constraint of the primal.

From the objective function of the primal assuming optimality.

Page 42: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Dual example (cont.)

05x3xyyx81225

λL

0x3λy2λ2yL

05λ3λx2λ1xL

22D

DD

DDD

=−−+−−=∂∂

=−+−=∂∂

=−−−=∂∂ y

Solve these FOCs simultaneously to get:

,910x* −= ,95y* −= ,109λD* =

If we could relax (increase) the constraint by 1 unit, the optimal value of the objective function would increase by 9/10 of a unit. Notice that values for x* and y* are common to the primal and dual, while the value of λD* for the dual is the reciprocal of λ* for the primal.

FOCs

0w* =

)w( *

Page 43: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Envelope Theorem in Constrained Max.

• Theorem can be used as discussed earlier to examine how a function’s optimum value (y*) changes as a parameter in the problem changes. In the case at hand, differentiate optimal Lagrangian expression with respect to the parameter:

Max: )a;x,x(fy 21= st: )a;x,x(g0 21=

)a;x,x(g)a;x,x(fL 2121 λ+=Solve FOC for x1*, x2* and substitute into L to get L*, which is a function of parameters only.

Page 44: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Envelope Theorem …(cont.)

aL

dady **

∂∂

=Only difference is that y* is a constrained optimum.

If a is the value of the constraint, then

is the shadow price of the resource in the constraint.

See the section in the text on Inequality Constraints (pp. 45-47) for the Lagranian methods for solving problems with inequality constraints.

Warnings:

Not all optimization problems can be solved with calculus. Functions must be continuous at optimum. If not, use Linear Programming methods.

aL

dady *

**

∂∂

=λ=

Page 45: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Further discussion of FOC and SOC

We have already talked about FOC and SOC for functions of one independent variable and no constraints: y = f(x).

FOC

SOC Max

0}concave*xf0f

<′′=′

FOC

SOC

Min0}convex*xf

0f

>′′=′

y

x

concave

y

x

convex

X*

X*

y*

y*

Page 46: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Suppose

==

0f0f

2

1FOC

)x,x(fy 21=

Indicates a flat spot—

max, min, saddle point.

Two independent variables, no constraint.

Logic suggests that the own second partials evaluated at would indicate which (max or Min), but….

>

>

<

<

0f

0f

0f

0f

*2

*1

*2

*1

*2

*1

*2

*1

x,x22

x,x11

x,x22

x,x11

Max

Min

Assumes only x1 or x2 is changing!

*2

*1 xandx

SOC

Page 47: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

However, what if both x1 and x2 are changing? Must consider a third SOC condition (partial derivatives are evaluated at X1* and X2* for SOCs):

0fff 2122211 >−

This condition must hold when evaluated at the optimal values of x1 and x2. This condition is one of three sufficient conditions (SOCs) when f is a function of two variables (unconstrained).

Page 48: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

FOC for maximum or minimum

==

0f0f

2

1 max,min, saddle point

>−

<<

0fff

0f,0f2

122211

2211Concave function

>−

>>

0fff

0f,0f2

122211

2211 Convex function

SOC for a maximum:

Summary of FOC and SOC for functions of two independent variables and no constraint.

SOC for a minimum:

)x,f(xy 21=

Page 49: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

• f1 and f2 locate a flat spot.

• f11 and f22 distinguish between a minimum and a maximum.

• Think of a saddle in case of a minimum. The flat spot on the saddle is not the lowest point on the saddle.

• f11f22 - f122 > 0 confirms that it is not a saddle

point.

Page 50: Chapter 2 Mathematics of Optimizationweb.utk.edu/~rrobert3/505notes/Chapter2.pdf · Chapter 2 Mathematics of Optimization • Many economic concepts can be expressed as functions

Constrained Optimization

0xL

0xL

2

1

=∂∂

=∂∂

FOC

0λL

0xL

1

n

=∂∂

=∂∂

Solve the FOC simultaneously to get the optimal solution and plug the xi* into the appropriate expression above (SOC) to see if it is satisfied (or just determine the signs of the partial derivatives and determine if the expression has the appropriate sign).

The SOC for constrained maximization of a function of two variables, subject to a linear constraint (or its dual) is:

. xandat x evaluated ,0ffff2fff *2

*1

21222112

2211

<+−

If a constrained function has this property, it is strictly quasi-concave. In economic theory, we usually use this problem (e.g., Max. a utility function, s.t. a linear budget constraint (primal), or Min. linear expenditures, s.t. a fixed level of the utility function (dual). …

0λL

m

=∂∂

The SOC for constrained minimization of a function of two variables, subject to a linear constraint (or its dual) is:

. xand at x evaluated ,0ffff2fff *2

*1

21222112

2211

>+−If a constrained function has this property, it is strictly quasi-convex.