You are on page 1of 19

Session 6 Constrained Optimization

Integration

• Constrained Optimization
• Integration: examples of usual primitives and
integration rules

1
Constrained optimization

• We have seen how to find the min/max of a function when no


constraints were imposed.

• However, in most real-life situations, consumers and firms face


financial and production constraints as there are limits on the
availability of labor, capital and raw materials and, therefore, on the
total level of output and income produced within an economy.

2
Utility maximization under a budget constraint
Example 1. Suppose a consumer has the following utility function
U=5xy, where
the price of a unit of good x is 5$, and
the price of a unit of good y is 1$.
His budget is 30$. constraint
What quantities of goods x and y maximize the consumers’ utility?
5x+1y=30.

3
Utility maximization under a budget constraint
Solution of the Example 1: (optimize 5𝑥𝑦 under constraint 5𝑥 + 𝑦 = 30)

• Rewrite the budget constraint in a form: 30 − 5𝑥 − 𝑦 = 0


• Produce so called Lagrangian: 𝐿(λ, 𝑥, 𝑦) = 5𝑥𝑦 + λ(30 − 5𝑥 − 𝑦)
• The first order derivatives of the Lagrangian are:
𝐿λ = 30 − 5𝑥 − 𝑦
𝐿𝑥 = 5𝑦 + λ −5
𝐿𝑦 = 5𝑥 + λ −1
• 1st order conditions:
𝐿λ = 0
Equate all first-order derivatives to zero to get ൞𝐿𝑥 = 0
𝐿𝑦 = 0
The solution of the linear system is λ = 15, 𝑥 = 3, 𝑦 = 15.
4
2nd order conditions:
Bordered Hessian Matrix
𝐿λλ 𝐿λ𝑥 𝐿λ𝑦 0 −5 −1
𝐻𝑓,λ = 𝐿𝑥λ 𝐿𝑥𝑥 𝐿𝑥𝑦 = −5 0 5
𝐿𝑦λ 𝐿𝑦𝑥 𝐿𝑦𝑦 −1 5 0

det 𝐻𝑓,λ > 0 is a local maximum


det 𝐻𝑓,λ < 0 is a local minimum

det 𝐻𝑓,λ = 50 > 0 → (𝑥, 𝑦) = (3,15) is a local maximum

5
Determinant of a 3x3 matrix
1st method: development using first row (any row/column may be used in a similar way)
𝑎11 𝑎12 𝑎13
𝑎22 𝑎23 𝑎21 𝑎23 𝑎21 𝑎22
𝑎21 𝑎22 𝑎23 = 𝑎11 ∙
𝑎32 𝑎33 − 𝑎12 ∙ 𝑎31 𝑎33 + 𝑎13 ∙ 𝑎31 𝑎32
𝑎31 𝑎32 𝑎33

2nd method: append 1st and 2nd column


sum products of elements on diagonals (± for positive/negative direction)
𝑎11 𝑎12 𝑎13 𝑎11 𝑎12
𝑎21 𝑎22 𝑎23 𝑎21 𝑎22 = 𝑎11 ∙ 𝑎22 ∙ 𝑎33 + 𝑎12 ∙ 𝑎23 ∙ 𝑎31 + 𝑎13 ∙ 𝑎21 ∙ 𝑎32
𝑎31 𝑎32 𝑎33 𝑎31 𝑎32
−𝑎13 ∙ 𝑎22 ∙ 𝑎31 − 𝑎11 ∙ 𝑎23 ∙ 𝑎32 − 𝑎12 ∙ 𝑎21 ∙ 𝑎33
Remark: find a prepared calculation in Examples_Excel/Determinant 3x3

6
Lagrange multiplier method – 1st order conditions
• To find the optimum values of a function z = f (x, y) subject to a
constraint, ax + by =M, we use Lagrange multiplier method.
Define the Lagrangian function, L as:
𝐿 = 𝐿 𝜆, 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 + 𝜆(𝑀 − 𝑎𝑥 − 𝑏𝑦)
𝜆 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 𝑥 and 𝑦.

1st conditions are:𝑳𝝀 = 𝟎, 𝑳𝒙 = 𝟎, 𝑳𝒚 = 𝟎.

7
Lagrange multiplier method – 2nd order conditions

Solutions of the sistem of equations gives critical points λ𝑖 , 𝑥𝑖 , 𝑦𝑖 .


Check each critical point λ𝑖 , 𝑥𝑖 , 𝑦𝑖 using 2nd order conditions:

𝐿λλ 𝐿λ𝑥 𝐿λ𝑦


𝐻𝑓,λ = 𝐿𝑥λ 𝐿𝑥𝑥 𝐿𝑥𝑦
𝐿𝑦λ 𝐿𝑦𝑥 𝐿𝑦𝑦

det 𝐻𝑓,λ > 0 is a local maximum


det 𝐻𝑓,λ < 0 is a local minimum
8
Maximize production subject to a cost’s constraint
1. 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?

9
Minimize costs subject to a production constraint
2*. A production function is Q =12L0.5K0.5. Find the values of L and K that minimize costs when
- the labor costs are £25 per unit (wage rate),
- the capital costs are £50 per unit (rent), and
- the production constraint is 240 units of output.

Solution:

Write down the cost function:

Constraint: 𝑄 = 12𝐿0.5 𝐾 0.5 = 240


The Lagrangian is: ℒ 𝜆, 𝐿, 𝐾 = 25𝐿 + 50𝐾 + 𝜆(240 − 12𝐿0.5 𝐾 0.5 )
10
• 1st order derivatives of the Lagrangian: ℒ𝜆 = 240 − 12𝐿0.5 𝐾 0.5
ℒ𝐿 = 25 − 6𝜆𝐿−0.5 𝐾 0.5
ℒ𝐾 = 50 − 6𝜆𝐿0.5 𝐾 −0.5
• Equate all 1st order derivatives to zero and solve the system of equations
• 240 = 12𝐿0.5 𝐾 0.5
25 0.5 −0.5
• 25 = 6𝜆𝐿−0.5 𝐾 0.5 →𝜆=
6
𝐿 𝐾 25 0.5 −0.5 50 −0.5 0.5
50 −0.5 0.5 → 𝐿 𝐾 = 𝐿 𝐾 → 𝐿 = 2𝐾
• 50 = 6𝜆𝐿0.5 𝐾 −0.5
→𝜆= 𝐿 𝐾 6 6
6
• Substitute 𝐿 = 2𝐾 into the 1st equation
20 25
240 = 12(2𝐾)0.5 𝐾 0.5 → 𝐾 = = 10 2 → 𝐿 = 20 2 → λ = 2
2 6

• 2nd Order Conditions? →HW Exercise

11
Other applications of constrained optimization

3.Suppose a firm has an order for 200 units of its product and wishes to
distribute its manufacture between two of its plants, plant “1” and
plant “2”. Let q1 and q2 denote the outputs of plants “1” and “2”,
respectively, and suppose the total-cost function is given by

c = f (q1 , q2 ) = 2q12 + q1q2 + q22 + 200.


How should the output be distributed in order to minimize costs?

12
Integrals
• A tool that initially designed by Newton and Leibniz to calculate the
surface below a curve (or between to curves).

13
Integrals 𝑦𝑛
𝑦𝑛−1

𝑦0 𝑦1

Suppose 𝑭′ 𝒙 = 𝒇 𝒙 𝑥0 𝑥1 𝑥𝑛−1 𝑥𝑛
Calculate 𝑭 𝒃 − 𝑭(𝒂)
𝑏−𝑎
1. Divide (𝑎, 𝑏) into n equal parts of length ∆𝑥 =
𝑛
2. Denote 𝑥𝑖 = 𝑎 + 𝑖 ∙ ∆𝑥, 𝑖 = 0, … , 𝑛; 𝑦𝑖 = 𝑓(𝑥𝑖 )
3. 𝐹 𝑏 − 𝐹 𝑎 = 𝐹(𝑥𝑛 ) − 𝐹(𝑥𝑛−1 ) + 𝐹(𝑥𝑛−1 ) − ⋯ + 𝐹(𝑥1 ) − 𝐹(𝑥0 )
= σ𝑛1 ∆𝐹𝑖 ≈ σ𝑛1 𝐹 ′ 𝑥𝑖−1 ∆𝑥𝑖 = σ𝑛1 𝑓 𝑥𝑖−1 ∆𝑥 = σ𝑛1 𝑦𝑖−1 ∆𝑥 ≈ 𝑎𝑟𝑒𝑎

14
Integration = search for 𝐹 𝑥 s.t. 𝐹 ′ 𝑥 = 𝑓(𝑥)
• Hence, integration is the reverse of differentiation

• If 𝐹 ′ 𝑥 = 𝑓(𝑥), then we can integrate 𝑓(𝑥) to find 𝐹 𝑥


• 𝐹 𝑥 + 𝑐 is called the (indefinite) integral or primitive function of 𝑓(𝑥)

sign of the integral


Notation:
𝑑𝑒𝑓
‫ 𝑥 𝐹 = 𝑥𝑑 𝑥 𝑓 ׬‬+ 𝑐 𝐹 ′ 𝑥 = 𝑓(𝑥)
sign of the variable, here 𝑥, wrt which we integrate
no need for brackets
15
16
Basic Integration Properties:

1. ‫ 𝑥𝑘 = 𝑥𝑑𝑘 ׬‬+ 𝐶 (𝑘 is a constant)

𝑛 𝑥 𝑛+1
2. ‫= 𝑥𝑑 𝑥 ׬‬ +𝐶 (𝑛 ∈ ℝ, 𝑛 ≠ −1)
𝑛+1

3. ‫ 𝑥 ׬‬−1 𝑑𝑥 = ln 𝑥 + 𝐶 (both ln 𝑥 and ln −𝑥 have derivative 1/𝑥)


1
4. ‫׬‬ 𝑒 𝑥 𝑑𝑥 = 𝑒𝑥 +𝐶 (‫׬‬ 𝑎 𝑥 𝑑𝑥 = 𝑎𝑥 + 𝐶)
ln 𝑎

5. ‫𝑥𝑑)𝑥(𝑓 ׬ 𝑘 = 𝑥𝑑)𝑥(𝑓𝑘 ׬‬

6. ‫ 𝑥 𝑓 ׬‬+ 𝑔 𝑥 𝑑𝑥 = ‫ 𝑥𝑑)𝑥(𝑓 ׬‬+ ‫𝑥𝑑)𝑥(𝑔 ׬‬


17
‫‪Exercises‬‬
‫‪4‬‬ ‫‪1‬‬ ‫‪1‬‬
‫𝑥𝑑‪ 5‬׬ ‪1.‬‬ ‫𝑥𝑑 𝑥 ׬ ‪2.‬‬ ‫‪3.‬‬ ‫𝑥𝑑 ‪ 𝑥 4‬׬‬ ‫𝑥𝑑𝑥 ׬ ‪4.‬‬ ‫׬ ‪5.‬‬ ‫𝑥𝑑‬
‫‪𝑥3‬‬

‫‪𝑥 3 −1‬‬ ‫‪𝑥+5𝑥 2‬‬ ‫‪2𝑥−1 𝑥+3‬‬


‫‪6.‬‬ ‫𝑥𝑑 ‪ 𝑥 2‬׬‬ ‫‪7.‬‬ ‫𝑥𝑑 ‪ 𝑥 2‬׬‬ ‫׬ ‪8.‬‬
‫‪𝑥2‬‬
‫𝑥𝑑‬

‫‪5‬‬ ‫‪3‬‬ ‫𝑥‬ ‫‪1‬‬


‫‪ 2‬׬ ‪9.‬‬ ‫‪𝑥4‬‬ ‫𝑥𝑑‪− 7 𝑥 + 10𝑒 − 1‬‬ ‫‪ 2𝑥 +‬׬ ‪10.‬‬ ‫𝑥𝑑‬
‫𝑥‪2‬‬

‫‪2𝑄−5‬‬ ‫‪1‬‬
‫‪11.‬‬ ‫𝑄𝑑 𝑄 ׬‬ ‫‪12.‬‬ ‫𝑄‪ 5‬׬‬ ‫𝑄𝑑𝑥‪− 5‬‬

‫‪18‬‬
Integrating “by substitution”
Example. (a) Calculate 𝐼 = ‫(׬‬5𝑥 − 2)10 𝑑𝑥
𝑓 𝑢 in general
We substitute 𝟓𝒙 − 𝟐 = 𝒖 𝑓𝑢′
′ ′ 1
(𝟓𝒙 − 𝟐)𝒙 𝒅𝒙 = (𝒖)𝒖 𝒅𝒖 → 5𝑑𝑥 = 𝑑𝑢 → 𝑑𝑥 = 𝑑𝑢
5
10 1 1 𝑢11 1
𝐼= ‫ 𝑢 ׬‬5 𝑑𝑢 = = (5𝑥 − 2)11 +𝐶
5 11 55

Exercises
1 5𝑥−2 5
(b) ‫׬‬ 𝑑𝑥 (c) ‫𝑒 ׬‬ dx (d) ‫ ׬‬3𝑥 + 4𝑑𝑥 (e) ‫( ׬‬6𝑥+3)4 𝑑𝑥
5𝑥−2
2
(f) ‫(׬‬1 − 3𝑄)5 𝑑𝑄 (g*) ‫׬‬ 𝑥
𝑥𝑒 𝑑𝑥
19

You might also like