9. Nonlinear Optimization - Computational Aspects
9. Nonlinear Optimization - 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
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…
Non-linear optimization 4
January 1, 2025
4
Continued…
X1
3 4
Non-linear optimization 5
January 1, 2025 5
Example 2
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)
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)
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
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.
Non-linear optimization 14
January 1, 2025
14
K-T conditions:
Recall that the Lagrange multiplier, λ, has been interpreted as the MU of money
income, I.
(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