# Optimization by hcj

VIEWS: 4 PAGES: 20

• pg 1
```									      Calculus-Based Optimization
AGEC 317
Economic Analysis for Agribusiness and Management

• Optimization Techniques
Why Consider Optimization?
• Consumers maximize utility or satisfaction.
• Producers or firms maximize profit or minimize
costs.
• Optimization is inherent to economists.
Setting-Up Optimization Problems
•   Define the agent’s goal: objective function and
identify the agent’s choice (control) variables
•   Identify restrictions (if any) on the agent’s
choices (constraints). If no constraints exist,
then we have unconstrained minimization or
maximization problems.
If constraints exist, what type?
Equality Constraints (Lagrangian)
Inequality Constraints (Linear Programming)
Mathematically,
Optimize y = f(x1, x2, . . . ,xn)
subject to (s.t.)
gj (x1, x2, . . . ,xn) ≤ bj
or
= bj       j = 1, 2, . . ., m.
or
≥ bj

y = f(x1, x2, . . . ,xn) → objective function
x1, x2, . . . ,xn → set of decision variables (n)
optimize → either maximize or minimize
gi(x1, x2, . . . ,xn) → constraints (m)
Constraints refer to
restrictions on resources
legal constraints
environmental constraints
behavioral constraints
Review of Derivatives
dy
•   y=f(x): First-order condition:                            f ' ( x)
dx
2
•           Second-order condition:                      d y
2
 f ' ' ( x)
dx
•   Constant function: y  f ( x)  a                      f ' ( x)  0
•   Power function: y  f ( x)  ax     b        f ' ( x)  baxb1
dy
•   Sum of functions: y  f ( x)  g ( x)           f ' ( x)  g ' ( x)
dx
dy
•   Product rule: y  f ( x) g ( x)     f ' ( x) g ( x)  f ( x) g ' ( x)
dx
•   Quotient rule: y     f ( x)    dy f ' ( x) g ( x)  f ( x) g ' ( x)

g ( x)     dx                g ( x)2
•   Chain rule: y  f ( g ( x)) dy
 f ' ( g ( x)) g ' ( x)
dx
Unconstrainted Univariate
Maximization Problems: max f(x)
•   Solution:
• Derive First Order Condition (FOC): f’(x)=0
• Check Second Order Condition (SOC): f’’(x)<0
• Local vs. global: If more than one point satisfy both
FOC and SOC, evaluate the objective function at
each point to identify the maximum.
Example
PROFIT = -40 + 140Q – 10Q2
Find Q that maximizes profit

dPROFIT
 140 – 20Q = set 0
dQ
Q=7

d 2 PROFIT - 20 < 0
2

dQ

max profit occurs at Q = 7
max profit = -40 + 140(7) – 10(7)2
max profit = \$450
Minimization Problems: Min f(x)
•   Solution:
• Derive First Order Condition (FOC): f’(x)=0
• Check Second Order Condition (SOC): f’’(x)>0
• Local vs. global: If more than one point satisfy both
FOC and SOC, evaluate the objective function at
each point to identify the minimum.
Example
COST = 15 - .04Q + .00008Q2

Find Q that minimizes cost

dCOST
 -.04 + .00016Q = set 0
dQ

2
Q = 250
d COST
2
 .00016 > 0
dQ

Minimize cost at Q = 250
min cost = \$10
Unconstrained Multivariate Optimization
•          Max                y  g ( x, z )                                     •           Min            y  g ( x, z )

y                                                                             y           g x ( x, z )
•          FOC:                    x
 g x ( x, z )                           •           FOC:                 x
y           g z ( x, z )
y           g z ( x, z )                                                            z
z
2 y
•          SOC:               y
2
 g xx ( x, z )  0                            •           SOC:          x 2
( x, z )  g xx ( x, z )  0
x 2

2 y
 y 2
 g zz ( x, z )  0                                                     z 2
( x, z )  g zz ( x, z )  0
z 2

2 y
x 2
2 y
( x, z ) z 2 ( x, z )     2 y
xz   ( x, z )   
2 y
zx

( x, z )  0   2 y
x 2
2 y
( x, z ) z 2 ( x, z )    
2 y
xz   ( x, z )    2 y
zx

( x, z )  0
Example
PROFIT is a function of the output of two products
(e.g.heating oil and gasoline)
Q1              Q2

PROFIT  60  140 Q1  100 Q2  10 Q12  8Q2  6Q1Q2
2

dPROFIT
 140  20 Q1  6Q2  set 0
dQ1
dPROFIT
 100  16 Q2  6Q1  set 0
dQ2
20Q1  6Q2  140
so, 6Q1  16Q2  100

Solve Simultaneously Q1 = 5.77 units
Q2 = 4.08 units
Second-Order Conditions
2                   d 2 PROFIT
d PROFIT
2
 20                    6
dQ1                  dQ1 dQ2

d 2 PROFIT
2
 16
dQ2
2
 d 2 PROFIT  d 2 PROFIT   d 2 PROFIT 

         2

        2     dQ dQ   0
            
      dQ1         dQ2          1  2  

(-20)(-16) – (-6)2 > 0
320 – 36 > 0
we have maximized profit.
Constrained Optimization
•    Solution: Lagrangian Multiplier Method
•    Maximize y = f(x1, x2, x3, …, xn)
•       s.t. g(x1, x2, x3, …, xn) = b
•    Solution:
• Set up Lagrangian:
L( x1 , x 2 ,..., x n ,  )  f ( x1 , x 2 ,..., x n )   g ( x1 , x 2 ,..., x n )  b .
• FOC:            L x1 ( x1, x 2,...,xn,  )  0
...
L xn ( x1, x 2,...,xn,  )  0
L ( x1, x 2,...,xn,  )  g ( x1, x 2,...,xn)  b  0
Lagrangian Multiplier
• Interpretation of Lagrangian Multiplier λ: the
shadow value of the constrained resource.
• If the constrained resource increases by 1 unit,
the objective function will change by λ units.
Example
Maximize Profit =  60  140 Q1  100 Q2  10 Q12  8Q2  6Q1Q2
2

subject to (s.t.) 20Q1 + 40Q2 = 200
Could solve by direct substitution

Note that 20Q1 = 200 – 40Q2
or Q1 = 10 – 2Q2

Maximize Profit =
 60  140(10  2Q2 )  100Q2  10(10  2Q2 )2  8Q2  6Q2 (10  2Q2 ).
2

Combine like terms.

Maximize Profit = 340  160Q2  36Q22

Q2  2.22 units
Q1  5.56 units
How arrived?
Lagrangian Multiplier Method
Formulate Lagrangian Function
L PROFIT  60  140Q1  100Q2  10Q12  8Q2  6Q1Q2
2

  (20Q1  40Q2  200)

Maximizing L profit Maximizes the profit function as long as 20Q1  40Q2  200.
Decision variables are Q1 , Q2 , .
dL profit
 140  20Q1  6Q2  20  set 0
dQ1
dL profit
 100  16Q2  6Q1  40  set 0
dQ2
dL profit
 (20Q  40Q2  200)  set 0
d
(1) 20Q1  6Q2  20  140
(2) 6Q1  16Q2  40  100
(3)         20Q1  40Q2  200

Now, we have three equations in three unknowns.

Use equations (1) and (2) to eliminate  .
20  140  20Q1  6Q2
40  100  6Q1  16Q2

Multiply the first equation by 2
40  280  40Q1  12Q2
40  100  6Q1  16Q2
Therefore,280  40Q1  12Q2  100  6Q1  16Q2 .
or
34Q1  4Q2  180
also    20Q1  40Q2  200

 Q1  5.56 units
Q2  2.22 units