Week 5 Quiz: Constrained Optimisation

Week 5 Quiz: Constrained Optimisation
SGPE Summer School 2014
July 15, 2014
Substitution
Question 1: For each of the following following functions, find the optimum (i.e. maximum or minimum) value
of z subject to the given constraint by using direct substitution.
1
2
(a) z = x 3 y 3 subject to the constraint y = 150 − 5x
1
2
Answer: Substituting the constraint into the objective function gives z = x 3 (150 − 5x) 3 . As this is a function of
x alone, we can set its first derivative equal to zero to find its maximum, minimum or point of inflection. Thus,
−2
−1
−2
2
1
2
dz
using the product and chain rules: dx
= x 3 (150 − 5x) 3 + x 3 23 (150 − 5x) 3 (−5) = 0. Then, (150 − 5x) 3 13 ∗ x 3 =
−1
1
2
1
1
10
3 . Multiplying both sides by x 3 and (150 − 5x) 3 yields (150 − 5x)
x 3 10
3 (150 − 5x)
3 = x 3 . This gives x = 10,
y = 150 − 5x = 100, and finally z = 46.42.
(b) z = x2 + 0.5xy + y 2 subject to the constraint y = 90 − 2x
Answer: Substituting the constraint into the objective function gives z = x2 + 0.5x(90 − 2x) + (90 − 2x)2 . This
dz
is a function of x alone, and dx
= 2x + 45 − 2x + 2(90 − 2x)(−2) = 0. From this, x = 39.375, y = 11.25.
(c) z = x2 + y 2 − 5xy + 4x + 2y subject to the constraint y = −2x + 100.
Answer: As in parts (a) and (b), substitute the constraint directly into the objective function: z = x2 + (−2x +
dz
100)2 − 5x(−2x + 100) + 4x + 2(−2x + 100). Thus, z = 15x2 − 900x + (100)2 + 200. Then, dx
= 30x − 900 = 0
and x = 30. From the constraint, when x = 30, y = −60 + 100 = 40. Then, x = −3300.
Question 2 [More advanved]: Solve each of the problems in question 1 using the Lagrange multiplier method.
Answer:
1
2
(a) The Lagrangean expression is L = x 3 y 3 + λ(150 − 5x − y). Calculate the first order conditions (FOC) and set
them equal to zero:
∂L
∂x
= 31 x
−2
3
y 3 − 5λ = 0 (1), which implies
1
3
−1
3
2
2
1 −2
3 y3
15 x
1
3
− λ = 0 (2), which implies 23 x y
−1
3
= λ (1a)
∂L
∂x
= 32 x y
∂L
∂λ
= 150 − 5x − y = 0 (3) Notice that this is the constraint
Combining (1a) and (2a),
2
1 −2
3 y3
15 x
1
= 32 x 3 y
−1
−1
3
= λ (2a)
(4)
1
After multiplying both sides by 15x 3 y 3 , (4) becomes x−1 y = 10 from which y = 10x. Substituting this into (3)
gives 150 − 5x − 10x = 0, so x = 10, y = 100, z = 46.416 as we found in question 1.
1
(b) The Lagrangean expression is L = x2 + 0.5xy + y 2 + λ(90 − 2x − y). Use FOCs and set them equal to zero:
∂L
∂x
= 2x − 5y + 4 − 2λ = 0 (1), which implies x − 25 y + 2 = λ (1a)
∂L
∂y
= 2y − 5x + 2 − λ = 0 (2), which implies 2y − 5x + 2 = λ (2a)
∂L
∂λ
= 100 − 2x − y = 0 (3)
Combining (1a) and (2a) yields x + 0.25y = 2y + 0.5x, which rearranges to give y = 27 x. Substituting this into (3)
gives 16
7 x = 90, so x = 39.375, y = 11.25, z = 1898.438 as before.
(c) The Lagrangean expression is L = x2 − 5xy + y 2 + 4x + 2y + λ(100 − 2x − y). Once again, use FOCs and set
them equal to zero.
∂L
∂x
= 2x − 5y + 4 − 2λ = 0 (1), from which x −
∂L
∂y
= 2y − 5x + 2 − λ = 0 (2), from which 2y − 5x + 2 = λ (2a)
∂L
∂λ
= 100 − 2x − y = 0 (3)
5
2
= 2y − 5x (1a)
Combine (1a) and (2a) as x − 52 y = 2y − 5x, and rearrange to obtain x = 43 y. Substituting this back into (3) gives
100 − 23 y − y = 0. Then, y = 40, x = 43 y = 30, and z = −3300 as before.
Question 3: Maximize the following functions, subject to their respective restrictions, using the Lagrange multiplier method.
(a) z = 4x2 − 5xy + 6y subject to the constraint x + y = 30
(b) z = −7x2 + 6xy − 9y 2 subject to the constraint 2x + y = 165
(c) z = −3x2 + 40x + 8xy + 288y − 10y 2 subject to the constraint x + 2y = 58
(d) z = 8x2 − 70x − 4xy − 50y + 5y 2 subject to the constraint x + y = 35
Answer: a) The Langrangean is L = 4x2 − 5xy + 6y 2 + λ(x + y − 30). Take the derivatives and set them equal
to zero.
∂L
= 8x − 5y + λ = 0
∂x
∂L
= 12y − 5x + λ = 0
∂y
∂L
= x + y − 30 = 0
∂λ
Combining the first two and rearranging the third yields:
8x − 5y = 12y − 5x
y = 30 − x
Solving the system yields the solutions x = 17 and y = 13.
2
b) The Langrangean is L = −7x2 + 6xy − 9y 2 + λ(2x + y − 165). Take the derivatives and set them equal to zero.
∂L
= −14x + 6y + 2λ = 0 ⇔ λ = 7x − 3y
∂x
∂L
= −18y + 6x + λ = 0 ⇔ λ = −6x + 18y
∂y
∂L
= 2x + y − 165 = 0
∂λ
Combining the first two and rearranging the third yields:
7x − 3y = −6x + 18y
y = 165 − 2x
Solving the system yields the solutions x = 63 and y = 39.
c) The Langrangean is L = −3x2 + 40x + 8xy + 288y − 10y 2 + λ(x + 2y − 58). Take the derivatives and set them
equal to zero.
∂L
= −6x + 40 + 8y + λ = 0 ⇔ λ = 6x − 40 − 8y
∂x
∂L
= 8x + 288 − 20y + 2λ = 0 ⇔ λ = 10y − 144 − 4x
∂y
∂L
= 2x + y − 165 = 0
∂λ
Combining the first two and rearranging the third yields:
6x − 40 − 8y = 10y − 144 − 4x
x = 58 − 2y
Solving the system yields the solutions x = 22 and y = 18.
d) The Langrangean is L = 8x2 − 70x − 4xy − 50y + 5y 2 + λ(x + y − 35). Take the derivatives and set them equal
to zero.
∂L
= 16x − 70 − 4y + λ = 0
∂x
∂L
= −4 − 50 + 10yλ = 0
∂y
∂L
= x + y − 35 = 0
∂λ
Combining the first two and rearranging the third yields:
16x − 70 − 4y = −4x − 50 + 10y
x = 35 − y
Solving the system yields the solutions x = 15 and y = 20.
3