Math Economics Finance 3 A
Math Economics Finance 3 A
1
Topic 3: Functions of Several Variables &
Optimization for Decision Making
2
Functions of Several Variables
• So far, we have considered only functions with one independent
variable
• However, many functions used in economics and finance have
multiple variables
𝑦 = 𝑓(𝑥1 , 𝑥2 , ⋯ 𝑥𝑖 , ⋯ , 𝑥𝑛 )
3
Partial Differentiation
• We differentiating a function with multiple variables, we must hold the (n-
1) variables constant, while allowing one variable to vary
𝜕𝑓(𝑥1 , 𝑥2 , ⋯ 𝑥𝑖 , ⋯ , 𝑥𝑛 )
𝑓𝑖 =
𝜕𝑥𝑖
• For example 𝑧 = 𝑓(𝑥, 𝑦). Interpretation of rate of change:
𝜕𝑧
✓ is the rate of change of z with respect to x when y is held fixed.
𝜕𝑥
𝜕𝑧
✓ is the rate of change of z with respect to y when x is held fixed.
𝜕𝑦
4
Examples:
1. 𝑓 𝑥, 𝑦 = 𝑥𝑦2 + 𝑥2𝑦. Find 𝑓𝑥(𝑥, 𝑦) and 𝑓𝑦(𝑥, 𝑦). Find 𝑓𝑥(3, 1) and
𝑓𝑦(3, 1).
5
Examples:
2. 𝑓 𝑥, 𝑦, 𝑧 = 𝑥2 + 𝑦2𝑧 + 𝑧3. Find 𝑓𝑥, 𝑓𝑦, and 𝑓𝑧.
6
Examples:
𝑟𝑠𝑢 𝜕𝑝 𝜕𝑝 𝜕𝑝 𝜕𝑝
3. 𝑝 = 𝑔 𝑟, 𝑠, 𝑡, 𝑢 = 𝑟𝑡 2 +𝑠2 𝑡
. Find , ,
𝜕𝑟 𝜕𝑠 𝜕𝑡
and |
𝜕𝑢 (0,1,1,1)
7
Higher-Order Partial Derivatives
• Second-order partial derivatives of f(x,y)
𝜕2𝑓 𝜕2𝑓
𝑓𝑥𝑥 = 𝑓𝑥 𝑥 = 2 and 𝑓𝑥𝑦 = 𝑓𝑥 𝑦 =
𝜕𝑥 𝜕𝑥𝜕𝑦
𝜕2 𝑓 𝜕2 𝑓
𝑓𝑦𝑥 = 𝑓𝑦 = and 𝑓𝑦𝑦 = 𝑓𝑦 =
𝑥 𝜕𝑦𝜕𝑥 𝑦 𝜕𝑦 2
8
Example
• Find second-order partial derivatives of 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 + 𝑥 2 𝑦 2
9
Khan Academy Exercises: 10 minutes
• Basic partial derivatives
• Finding partial derivatives
• Higher order partial derivatives
10
Applications of Partial Derivatives in Economics
• Cost functions
• Production functions
• Utility functions
11
Applications in Economics Example
• A company manufactures two types of skis, the Lightning and the
Alpine models. Suppose the joint-cost function for producing x pairs
of the Lightning model and y pairs of the Alpine model per week is
𝑐 = 𝑓 𝑥, 𝑦 = 0.07𝑥 2 + 75𝑥 + 85𝑦 + 6000
• where c is expressed in dollars. Determine the marginal costs ∂c/∂x
and ∂c/∂y when x = 100 and y = 50, and interpret the results.
12
Production Functions
• Illustrate the relationship between inputs (labor, physical capital, raw
materials, technology, etc.) and output (goods and services)
• The most popular production function is the Cobb-Douglas
𝑄 = 𝑓 𝐿, 𝐾 = 𝐴𝐾 𝛼 𝐿𝛽
where 𝐴 is a constant, 0 < 𝛼 < 1 and 0 < 𝛽 < 1
13
Production Functions
• Marginal Product of Capital is the amount of extra output the firm gets from an extra
unit of capital, holding the amount of labor constant.
𝜕𝑄
𝑀𝑃𝐾 = 𝑄𝐾 = = 𝐴𝛼𝐿𝛽 𝐾 𝛼−1 > 0
𝜕𝐾
• Marginal Product of Labor is the amount of extra output the firm gets from an extra
unit of labor holding the amount of capital constant.
𝜕𝑄
𝑀𝑃𝐿 = 𝑄𝐿 = = 𝐴𝛽𝐿𝛽−1 𝐾 𝛼 > 0
𝜕𝐿
14
Production Functions
• Law of diminishing returns to capital and labor
15
Production Functions
Isoquant
450
Capital
between K and L 250
200
Labor
𝛼 𝛽
• E.g., 𝑄 = 5 = 𝐴𝐾 𝐿
16
Example
• A manufacturer of a popular toy has determined that the production
function is Q = 𝑙𝑘, where 𝑙 is the number of labor-hours per week
and 𝑘 is the capital required for a weekly production of Q units of the
toy.
• Determine the marginal productivity functions and evaluate them
when 𝑙 = 400 and 𝑘 = 16.
• How does marginal productivity change as the production factor
increases?
• Draw the isoquant when Q=20
17
18
Graph of the Example
Isoquant
450
400
350
300
250
Capital
200
150
100
50
0
0 5 10 15 20 25
Labor
19
Utility Function
• Describe the utility (well-being) derived from the consumption of
goods and services
𝑈 = 𝑓 𝑥, 𝑦 = 𝐴𝑥 𝛼 𝑦 𝛽
where 𝐴 is a constant, 0 < 𝛼 < 1 and 0 < 𝛽 < 1
20
Utility Function
• Marginal Utility the change in utility as an additional unit is
consumed.
𝜕𝑈
𝑀𝑈𝑥 =
𝜕𝑥
𝜕𝑈
𝑀𝑈𝑦 =
𝜕𝑦
• Diminishing Marginal Utility:
The Law Of Diminishing Marginal Utility states that all else equal as
consumption increases the marginal utility derived from each
additional unit declines. 21
Utility Function
Indifference Curve
y
x
22
Maximum, minimum, saddle points
for functions of two variables
• When the function is continuous and differentiable, all the partial derivatives will be 0 at a local
maximum or minimum point.
• For each critical point, check second order derivatives:
𝝏𝟐 𝒛 𝜕2 𝑧
> 𝟎 𝐚𝐧𝐝 >𝟎 (or 2 > 0) 𝐥𝐨𝐜𝐚𝐥 𝐦𝐢𝐧
𝟐 𝝏𝒙𝟐 𝜕𝑦
𝝏𝟐 𝒛 𝝏𝟐 𝒛 𝝏𝟐 𝒛
𝑯𝑫 = ∙ − 𝝏𝟐 𝒛 𝜕2 𝑧
𝝏𝒙𝟐 𝝏𝒚𝟐 𝝏𝒙𝝏𝒚 > 𝟎 𝐚𝐧𝐝 < 𝟎 or < 0 𝐥𝐨𝐜𝐚𝐥 𝐦𝐚𝐱
𝝏𝒙𝟐 𝜕𝑦 2
< 𝟎 𝐬𝐚𝐝𝐝𝐥𝐞 𝐩𝐨𝐢𝐧𝐭
= 𝟎? need to check further conditions…
24
Maximum, minimum, saddle points
for functions of two variables
𝜕2 𝑧 𝜕2 𝑧
𝜕𝑥 2 𝜕𝑥𝜕𝑦
𝐻𝑓 𝑎, 𝑏 =
𝜕2 𝑧 𝜕2 𝑧
𝜕𝑥𝜕𝑦 𝜕𝑦 2
26
Maximum, minimum, saddle points
for functions of two variables
• Example 2:
• Find local maximum, local minimum or saddle points for the function
𝑧 = ln 𝑥 2 + 0.5 ln 𝑦 2 + 𝑥𝑦 + 𝑥 + 10
27
Maximum, minimum, saddle points
for functions of two variables
• Example 3: Application in Economics
• A monopolist produces two goods. The demand function for each good is
𝑃1 = 50 − 4𝑄1 and 𝑃2 = 80 − 3𝑄2
where 𝑃1 and 𝑄1 and 𝑃2 and 𝑄2 are the price and the quantity of goods 1
and 2, respectively. The cost function is
𝑇𝐶 = 120 + 8 ∙ (𝑄1 + 𝑄2)
• Find the price and the quantity of the good in each market which maximize
the total profit.
28
29
𝑇𝑃 = 𝑄1 50 − 4𝑄1 + 𝑄2 80 − 3𝑄2 − 120 + 8 ∙ 𝑄1 + 𝑄2 = −4𝑄12 + 42𝑄1 − 3𝑄22 + 72𝑄2 − 120
𝜕𝑇𝑃
= −8𝑄1 + 42 = 0
𝜕𝑄1
𝜕𝑇𝑃
= −6𝑄2 + 72 = 0
𝜕𝑄2
𝑄1 = 5.25, Q 2 = 12
𝜕 2 𝑇𝑃
= −8
𝜕𝑄12
𝜕 2 𝑇𝑃
= −6
𝜕𝑄22
𝜕 2 𝑇𝑃
=0
𝜕𝑄1 𝜕𝑄2
𝐻𝐷 = −8 × −6 − 0 > 0
𝜕 2 𝑇𝑃
= −8 < 0
𝜕𝑄12
Global concave, global maximum
When 𝑄1 = 5.25, P1 = 50 − 4 × 5.25 = 29
When 𝑄2 = 12, P2 = 80 − 3 × 12 = 44
Plugging 𝑄1 = 5.25 and 𝑄2 = 12 into TP function, you can get TP= 422.25
30
Khan Academy Exercises: 15 minutes
• Classifying critical points
• Examples: Second partial derivative test
31
Optimization with Constraints
• We have seen how to find the min/max of a function when no
constraints were imposed.
32
Utility Maximization Under a Budget Constraint
• Suppose a consumer has the following utility function
U=5xy
• His budget is 30$ and the price of a unit of good x is 5$ and a unit of
good y is 1$.
• So, if he would like to spend all of his budget, then 5x+1y=30.
• What quantity of good x and y maximize the consumers’ utility?
33
34
Lagrange multiplier method
st
1 order conditions (necessary conditions)
• To find the optimum values of a function 𝑧 = 𝑓 (𝑥, 𝑦) subject to a constraint,
𝑔(𝑥, 𝑦) = 𝑐, we can use Lagrange multiplier method.
• Define the Lagrangian function, L as:
𝐿 = 𝐿 𝜆, 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 − 𝜆[𝑔 𝑥, 𝑦 − 𝑐]
where λ is called the Lagrange multiplier and is treated as a variable.
L is the sum of the original function to be optimized and λ ∙ (constraint = 0).
• The optimum value of λ must be determined in addition to the optimum values
of the variables x and y.
35
Lagrange multiplier method
nd
2 order conditions (sufficient condition)
• Bordered Hessian Matrix
𝐿λλ 𝐿λ𝑥 𝐿λ𝑦 0 −𝑔𝑥 −𝑔𝑦
𝐻𝑓,λ = 𝐿𝑥λ 𝐿𝑥𝑥 𝐿𝑥𝑦 = −𝑔𝑥 𝐿𝑥𝑥 𝐿𝑥𝑦
𝐿𝑦λ 𝐿𝑦𝑥 𝐿𝑦𝑦 −𝑔𝑦 𝐿𝑦𝑥 𝐿𝑦𝑦
38
Example 2:Maximize production subject to a
cost constraint
• Given a Cobb-Douglas production function Q = L0.3K0.7, subject to a
cost constraint of £150 with the price of labor w = 3 and the price of
capital, r = 15.
a. Find the values of L and K for which production is maximized.
b. What is the maximum level of production possible subject to the
constraint?
39
Solving Example 2
• Second order condition
0.3 0.7
max Q = 𝐿 𝐾 𝓛𝐿𝐿 = −0.21𝐿−1.7 𝐾 0.7
𝐿,𝐾
𝓛𝐾𝐾 = −0.21𝐿0.3 𝐾 −1.3
𝑠. 𝑡. 3 ∙ 𝐿 + 15 ∙ 𝐾 = 150
𝓛𝐿𝐾 = 0.21𝐿−0.7 𝐾 −0.3
• The Lagrangian is 𝓛 = 𝐿0.3 𝐾 0.7 − λ(3𝐿 + 15𝐾 − 150)
• The first order derivatives of the Lagrangian are: • Bordered Hessian Matrix
41
Solving Example 3:
• 2nd Order Conditions:
m𝑖𝑛 𝐶 = 25𝐿 + 50𝐾 𝓛𝜆𝐿 = −6𝐿−0.5 𝐾 0.5
𝐿,𝐾
𝓛𝜆𝐾 = −6𝐿0.5 𝐾 −0.5
𝑠. 𝑡. 12𝐿0.5 𝐾 0.5 = 240
𝓛𝐿𝐿 = 3𝜆𝐿−1.5 𝐾 0.5
• The Lagrangian is: 𝓛 = 25L+50K − λ(12L0.5K0.5-240) 𝓛𝐾𝐾 = 3𝜆𝐿0.5 𝐾 −1.5
𝓛𝐿𝐾 = −3𝜆𝐿−0.5 𝐾 −0.5
• The first order derivatives of the Lagrangian:
• Bordered Hessian Matrix
𝓛𝜆 = 240 − 12𝐿0.5 𝐾 0.5 = 0
𝓛λλ 𝓛λ𝐿 𝓛λ𝐾
𝓛𝐿 = 25 − 12𝜆0.5 𝐿0.5−1 𝐾 0.5 = 25 − 6𝜆 𝐿−0.5 𝐾 0.5 = 0 𝐻𝑓,λ = 𝓛𝐿λ 𝓛𝐿𝐿 𝓛𝐿𝐾
𝓛𝐾 = 50 − 12𝜆0.5 𝐿0.5 𝐾 0.5−1 = 50 − 6𝜆 𝐿0.5 𝐾 −0.5 = 0 𝓛𝐾λ 𝓛𝐾𝐿 𝓛𝐾𝐾
1 𝐾 0 −8.4853 −4.2426
• Divide the last 2 equations to get rid of λ: 2 = 𝐿 = −8.4853 1.7678 −0.8839
25 −4.2426 −0.8839 0.4419
• So 𝐿 = 20 2, 𝐾 = 10 2, λ = 6
2
• det 𝐻𝑓,λ = −127.28 < 0
43
Solving Example 4:
• 2nd Order Conditions:
m𝑖𝑛 𝑐 = 2𝑞12 + 𝑞1 𝑞2 + 𝑞22 + 200
𝐿,𝐾
• Bordered Hessian Matrix
𝑠. 𝑡. 𝑞1 + 𝑞2 = 200
• The Lagrangian is:
𝓛λλ 𝓛λ𝑞1 𝓛λ𝑞2
𝐻𝑓,λ = 𝓛𝑞1λ 𝓛𝑞1𝑞1 𝓛𝑞1𝑞2
𝓛 = 2𝑞12 + 𝑞1 𝑞2 + 𝑞22 + 200 − λ(𝑞1 + 𝑞2 − 200)
𝓛𝑞2λ 𝓛𝑞2𝑞1 𝓛𝑞2𝑞2
• The first order derivatives of the Lagrangian:
𝓛𝜆 = −(𝑞1 + 𝑞2 − 200) = 0
0 −1 −1
𝓛𝑞1 = 4𝑞1 + 𝑞2 − 𝜆 = 0
= −1 4 1
𝓛𝑞2 = 2𝑞2 + 𝑞1 − 𝜆 = 0 −1 1 2
• So 𝑞1 = 50, 𝑞2 = 150, 𝜆 = 350
• det 𝐻𝑓,λ = −4 < 0
44
Exercise 1
• Suppose a consumer has the following utility function
𝑈 = 50𝑥 0.5 𝑦 0.5
• His budget is 200$ and the price of a unit of good x is 10$ and a unit of
good y is 20$.
• If he would like to spend all of his budget, what quantity of good x and y
maximize the consumers’ utility? (Please use the Lagrange multiplier
method to solve this problem. Make sure you test both the first order and
second order condition.)
• What is the maximum level of utility possible subject to the constraint?
45
Solution to Exercise 1
46
Exercise 2
• Given a Cobb-Douglas production function Q =5 L0.5K0.5, subject to a
cost constraint of $5000 with the price of labor w = 50 and the price
of capital, r = 100.
• Find the values of L and K for which production is maximized. (Please
use the Lagrange multiplier method to solve this problem. Make sure
you test both the first order and second order condition.)
• What is the maximum level of production possible subject to the
constraint?
47
Solution to Exercise 2
48