0% found this document useful (0 votes)
3 views

9. Nonlinear Optimization - Computational Aspects

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

9. Nonlinear Optimization - Computational Aspects

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Inequality constraints - Computational aspects

 We are still looking for a method by which we can solve a NLO problem. Earlier we
had a set of equations (FOCs) to solve; now we have inequalities.

 We can approach this in an informal way, by working with the K-T conditions
using examples.

Example 1

Min. C = (X1 – 3)2 + (X2 – 4)2


s. t. X1 + X2 ≥ 4
X1, X2 ≥ 0

Non-linear optimization January 1, 202


5
1 1
Continued…

L = (X1 – 3)2 + (X2 – 4)2 + λ(4 - X1 - X2)

(1) ∂L/∂X1 = 2(X1 – 3) – λ ≥ 0 (i.e., ∂L/∂X1 =0 if X1 > 0)


(1’) X1[2(X1 – 3) – λ] = 0

(2) ∂L/∂X2 = 2(X2 – 4) – λ ≥ 0 (i.e., ∂L/∂X2 =0 if X2 > 0)


(2’) X2[2(X2 – 4) – λ] = 0

(3) ∂L/∂λ = 4 - X1 - X2 ≤ 0 (i.e., ∂L/∂λ =0 if λ > 0)


(3’) λ(4 - X1 - X2) = 0
We have 4 cases to consider:
1. X1 = 0, X2 = 0 (immediately rejected as it violates constraint)
2. X1 = 0, X2 > 0
3. X1 > 0, X2 = 0
4. X1 > 0, X2 > 0 and constraint is binding (λ ≠ 0) 2
Non-linear optimization January 1, 2025
2
Continued…
Case 2: If X1 = 0, X2 > 0,
From (1): -6 – λ ≥ 0, or 6 + λ ≤ 0 → λ < 0
If λ is also restricted to be non-negative, we already have a violation.

If not restricted (as is generally the case):


From (2), given λ < 0: 2X2 – 8 – λ = 0 (since X2 > 0) → 2X2 – 8 = λ (< 0)
→ X2 < 4. But from (3): 4 – X2 < 0, so X2 > 4 (contradiction/violation).

Case 3: If X1 > 0, X2 = 0,
From (1): 2X1 – 6 – λ = 0 (since X1 > 0).
From (2): -8 – λ ≥ 0 → 8 + λ ≤ 0 → λ < 0.
From (1), with λ < 0, 2X1 – 6 < 0 → X1 < 3.
From (3): 4 –X1 < 0 (contradiction/violation)

3
January 1, 2025
Non-linear optimization 3
Continued…

Case 4: If X1 > 0, X2 > 0, with λ ≠ 0


2(X1 – 3) – λ = 0 → 2X1 – 6 = λ (1)
2(X2 – 4) – λ = 0 → 2X2 – 8 = λ (2)

The constraint is equality (constrain binding), therefore:


X1 + X2 = 4 (3)

Solve the 3 equations to get:


X1 = 3/2, X2 = 5/2, λ = -3, C=4.5 [Point A on graph, next slide]

This solution satisfies the K-T conditions and the constraint;


however, this is not the optimal solution.

Non-linear optimization 4
January 1, 2025
4
Continued…

Case 5: X1 > 0, X2 > 0, with λ = 0


2X1 = 6
2X2 = 8

The point which minimizes the objective


function and satisfies the K-T conditions, and
the constraint is: X1 = 3, X2 = 4, λ = 0, C = 0.

The optimal value of the objective function X2


is: C = 0. The constraint is satisfied as a strict 4
inequality (the constraint is not binding).
A

X1
3 4
Non-linear optimization 5
January 1, 2025 5
Example 2

Max. -3e-2X1 – 4e-5X2


s. t. X1 + X2 ≤ 1
X1, X2, ≥ 0

L = -3e-2X1 – 4e-5X2 + λ(1 – X1 – X2)

∂L/∂X1 = 6e-2X1 – λ ≤ 0 (∂L/∂X1 =0 if X1 > 0)

∂L/∂X2 = 20e-5X2 – λ ≤ 0 (∂L/∂X2 =0 if X2 > 0)

∂L/∂λ = 1 – X1 – X2 ≥ 0 (∂L/∂λ =0 if λ > 0)

Non-linear optimization 6
January 1, 2025
6
Continued…
Examine the 4 cases:
X1 = 0, X2 = 0 (rejected: it implies λ > 0. Hence constraint is binding:
X1+X2=1, not= 0)

(2) X1 = 0, X2 > 0, then: 6 – λ ≤ 0


Furthermore, from the second condition:
20e-5X2 = λ (since X2 > 0) → λ > 0

Thus, with λ > 0: 1 – X2 = 0 → X2 = 1


Then, λ = 20e-5 = 0.134 which violates 6 – λ ≤ 0.

(3) X1 > 0, X2 = 0, then:


6e-2X1 – λ = 0
20 - λ ≤ 0 → λ > 0, and:
1– X1 = 0 → X1 = 1
So, 6e
Non-linear optimization
-2
= 0.81 = λ, which violates 20 – λ ≤ 0. 7
January 1, 2025 7
Continued…
(4) X1 > 0, X2 > 0, and constraint is binding.
Then:
6e-2X1 = λ (1)
20e-5X2 = λ (2)
→λ>0

Hence, 1 – X1 – X2 = 0 → X2 = 1 – X1.
Substitute:
20e-5(1-X1) = 6e-2X1 [i.e., (1) = (2)]
→ (20/6) e-5(1 – X1) = e-2X1
→ (20/6) = e-2X1 + 5(1-X1)
Or, 3.33 = e-7X1 + 5
Or, ln(3.33) = -7X1 + 5 = 1.2
→ X1 = 0.54, X2 = 0.46
This is the optimal solution.
Note: in this example λ cannot be 0 (violates K-T conditions)
8
January 1, 2025
Non-linear optimization 8
An economic example: Highlighting how a graph can help by observing which
constraint/s are binding.
A firm produces and sells products x1 and x2 using 3 resources; the demand curves
are:
P1 = 10 – x1 and P2 = 20 – x2
The problem is:
Max R = x1(10 – x1) + x2(20 – x2)
Subject to: 5x1 + 3x2 ≤ 40
i.e., the firm has 40, 5, and 10 units of the 3
x1 ≤5 resources available, respectively
x2 ≤ 10
x1, x2 ≥ 0

Use a Lagrangian function and the Kuhn-Tucker conditions to find the revenue
maximizing values of x1, x2, as well as the values of the λs.
Also: Find the effect on maximum revenue if the firm had one more unit of the first
resource; then find the effect on maximum revenue if the firm had one more unit of
the optimization 9
second resource. Check that K-T sufficiency conditions for maximum hold.
Non-linear January 1, 2025
9
Answer
L = x1(10 – x1) + x2(20 – x2) + λ1(40 – 5x1 – 3x2) + λ2(5 – x1) + λ3(10 – x2)

(1) ∂L/∂x1 = 10 – 2x1 - 5λ1 – λ2 ≤ 0 [x1*(10 – 2x1 - 5λ1 – λ2)=0]

(2) ∂L/∂x2 = 20 – 2x2 - 3λ1 – λ3 ≤ 0 [x2*(20 – 2x2 - 3λ1 – λ3 )=0]

(3) ∂L/∂λ1 = 40 – 5x1 – 3x2 ≥ 0 [λ1*(40 – 5x1 – 3x2 )=0]

(4)∂L/∂λ2 = 5 – x1 ≥ 0 [λ2*(5 – x1)=0]

(5) ∂L/∂λ3 = 10 – x2 ≥ 0 [λ3*(10 – x2)=0]

Non-linear optimization 10
January 1, 2025
10
X2
(2)
13

10 A (3)

5 (1)
B

2 5 8 X1
 Consider point A (x1=2, x2=10; constraints 1 and 3 binding):
From (1): 5λ1 + λ2 = 10-4 = 6
From (2): 3λ1 + λ3= 20-20 = 0
Given that λ2=0 (since the corresponding constraint is not binding):
The values associated with point A are x1 = 2, x2 = 10, λ1=6/5, λ2 = 0, λ3 = -18/5.
This solution satisfies all K-T conditions and the constraints.

 It also gives a better value than point B (x1 =5, x2 = 5, λ1 = 10/3, λ2 = - 50/3 < 0, λ3 = 0 (116 versus 100).
Non-linear optimization 11
January 1, 2025
Continued…
X2
13  However, you can check that the
optimal solution is somewhere
A
10 along segment AB. To find: set
λ1 > 0 (since the first constraint
is binding) and λ2 = λ3 = 0 (since
5 B
the other two constraints are not
binding). Then:

2 5 8 X1
10 – 2x1 - 5λ1 = 0 (1) If the firm had one more unit of the first resource, R
20 – 2x2 - 3λ1 = 0 (2) would increase by λ1* = 0.88. If it had one more unit of the
40 – 5x1 – 3x2 = 0 (3) second or third resource, no change in revenue.

5 – x1 > 0 The solution (in red) is: x1* = 2.8, x2* = 8.66, λ1* = 0.88
10 – x2 > 0 and R* = 118.3 > 116 at point A.
12
January 1, 2025 12
Non-linear optimization
To check the sufficient conditions, we only need to show that the objective
function: R = x1(10 – x1) + x2(20 – x2) = 10x1 –x12 + 2x2 – x22 is concave.
R1 = 10 – 2x1, R2 = 20 – 2x2
R11 = -2, R22 = -2, R12 = R21 = 0

-2 0 10 – 2x1
D= 0 -2 20 - 2x1
10 – 2x1 20 - 2x1 0

= -2 [ - (20 -2x2)2 ] + (10 – 2x1)[2(10 – 2x1)]


= 2(20 -2x2)2 + 2(10 – 2x1)2 > 0 [pattern, D1 < 0, D2 = D > 0]

Non-linear optimization 13
January 1, 2025 13
Revisiting Maximization of Utility
The model of a consumer maximizing utility, U(X1, X2), subject to a budget
constraint can be given a treatment using K-T analysis.

 The qualifying difference here, compared to the usual treatment, is that now the
consumer is not necessarily spending all income and doesn’t need to
consume positive amounts of both goods.

Max: U(X1, X2)


s. t: P1X1 + P2X2 ≤ I
X1, X2, ≥ 0

L = U(X1, X2) + λ(I - P1X1 - P2X2)

Non-linear optimization 14
January 1, 2025
14
 K-T conditions:

∂L/∂X1 = U1 – λP1 ≤ 0 (∂L/∂X1 =0 if X1 > 0; < 0 if X1 = 0)


∂L/∂X2 = U2 – λP2 ≤ 0 (∂L/∂X2 =0 if X2 > 0; < 0 if X2 = 0)
∂L/∂λ = I - P1X1 - P2X2 ≥ 0 (∂L/∂λ =0 if λ ≠ 0; > 0 if λ = 0)

Recall that the Lagrange multiplier, λ, has been interpreted as the MU of money
income, I.

(1) Consider as a first case:


X1, X2 > 0, and budget constraint is binding (standard case of interior max). Then:
U1 = λP1
U2 = λP2

 λ (MU of money income) = U1/P1 = U2/P2 (which is positive)


This represents the MU per $ spent on X1 and X2.
Non-linear optimization 15
January 1, 2025 15
 In the case interior point maximization, the consumer equates the MU per $
spent on each good to the MU of one more $ income/budget. In this case, ∂L/∂λ =
I - P1X1 - P2X2 = 0 (consumer exhausts all income).

 (2) Another possibility is, the consumer not necessarily spends all income: ∂L/∂λ =
I - P1X1 - P2X2 > 0, this can be written as: P1X1 + P2X2 < I. If the constraint is not
binding (i.e., the consumer does not exhaust income), then, for the last $ spent,
U1/P1 = U2/P2 = λ = 0, that utility from spending one more $ of income = 0.
 This means that the consumer is satiated in all goods. To see this:
U1 = λP1 = 0
U2 = λP2 = 0,
 So, in this case the consumer will not consume more of the 2 goods even if they
are free. i.e., the consumer is maximizing at some point inside the feasible region.

Non-linear optimization
16
January 1, 2025
16
(3) The remaining possibility is that the consumer is maximizing at a corner
(while exhausting the budget):
17
X2

U(X1, X2)

X1
Since X1 = 0 → U1 - λP1 < 0, or U1< λP1 [and X1*(U1 - λP1)= 0],
 λ > U1/ P1
So, MU from holding-on to and additional $ always exceeds the MU from spending
one $ on X1.
At the same time, since X2 > 0, → U2 - λP2 = 0, or U2 = λP2
 λ = U2/P2, i.e., the consumer is consuming X2 so that he equates the MU per $
spent
Non-linear on X2 to the MU of income.
optimization 17
January 1, 2025 17

You might also like