CHAPTER 8:
Lagrange Multipliers
[ME538] Special Topics in Thermo-Fluid
[ME488] Design of Thermal Systems
Engineering
Dr. Asad Alebrahim
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-1 Calculus Methods of Optimization
❑ Requirements
The function must be differentiable.
Constraints must be equality constraints.
The function must be continuous.
❑ The Gradient vector
The gradient of a scalar:
𝜕𝑦 𝜕𝑦 𝜕𝑦
∇𝑦 = 𝑖1 + 𝑖2 + ⋯ + 𝑖𝑛
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑛
e.g. 𝑡 = 2𝑥1 + 𝑥1 𝑥2 + 𝑥2 𝑥32
∇𝑡 = 2 + 𝑥2 𝑖1 + 𝑥2 + 𝑥32 𝑖2 + 2𝑥2 𝑥3 𝑖3
8-1 Calculus Methods of Optimization 2
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-2 Unconstrained Optimization
❑ Objective function, 𝒚
𝑦 = 𝑦 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛
❑ Condition for optimum
∇𝑦 = 0
𝜕𝑦 𝜕𝑦 𝜕𝑦
=0 =0 ⋯ =0
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑛
A function of two variables
𝜕𝑦 𝜕𝑦
=0=
𝜕𝑥1 𝜕𝑥2
8-2 Unconstrained Optimization Examples 8-1, 8-2 3
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-3 Constrained Optimization
❑ Objective function, 𝒚
𝑦 = 𝑦 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛
❑ Constraints
𝜙1 = 𝜙1 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛
⋮
𝜙𝑚 = 𝜙𝑚 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛
❑ The method of Lagrange Multipliers
𝑚
∇𝑦 − 𝜆𝑖 ∇𝜙𝑖 = 0
𝑖=1
𝜙1 = 𝜙1 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 Solve for 𝑥1∗ , ⋯ , 𝑥𝑛∗ , 𝜆1 , ⋯ , 𝜆𝑚
⋮
𝜙𝑚 = 𝜙𝑚 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛
8-3 Constrained Optimization 4
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
❑ The Lagrange Multipliers, 𝝀
𝑖1 𝜕𝑦 𝜕𝜙1 𝜕𝜙𝑚
− 𝜆1 − ⋯ − 𝜆𝑚 =0
𝜕𝑥1 𝜕𝑥1 𝜕𝑥1
⋮
𝜕𝑦 𝜕𝜙1 𝜕𝜙𝑚
𝑖𝑛 − 𝜆1 − ⋯ − 𝜆𝑚 =0
𝜕𝑥𝑛 𝜕𝑥𝑛 𝜕𝑥𝑛
→ 𝑛 scalar equations + 𝑚 constraint equations
→ 𝑛+𝑚 equations and 𝑛+𝑚 unknowns 𝑥1∗ , ⋯ , 𝑥𝑛∗ , 𝜆1 , ⋯ , 𝜆𝑚
❑ The number of constraints
For optimization → 𝑚 < 𝑛
If 𝑚 = 𝑛 → 𝑥 ′ 𝑠 are fixed → No optimization → Simulation
8-3 Constrained Optimization Examples 8-3, 8-4 5
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-4 Visualization of the Lagrange Multiplier
❑ The contour line
Let 𝑦 = 𝑦(𝑥1 , 𝑥2 )
Contour line: The line of constant 𝑦 on the 𝑥1 Vs. 𝑥2
graph.
8-4 Visualization of the Lagrange Multiplier 6
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
❑ Example 8-3
Determine the minimum value of 𝑦 = 2𝑥1 + 3𝑥2
subject to 𝑥1 𝑥22 = 48
8-4 Visualization of the Lagrange Multiplier 7
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-5 Test for Maximum and Minimum
❑ 𝒚(𝒙)
𝑑2𝑦
2
ቤ >0 Min.
𝑑𝑦 𝑑𝑥 𝑥 ∗
= 0 Find 𝑥 ∗
𝑑𝑥 𝑑2𝑦
2
ቤ <0 Max.
𝑑𝑥 𝑥 ∗
❑ 𝒚(𝒙𝟏 , 𝒙𝟐 )
𝑑2𝑦 𝑑2𝑦
𝑑𝑥12 𝑑𝑥1 𝑑𝑥2
𝐷=
𝑑2𝑦 𝑑2𝑦
𝑑𝑥2 𝑑𝑥1 𝑑𝑥22
𝑑2𝑦 𝑑2𝑦
𝐷>0 & 2 > 0 Min. 𝐷<0 & 2 > 0 Max.
𝑑𝑥1 𝑑𝑥1
8-5 Sensitivity Coefficient Example 8-5 8
[ME 488] Design of Thermal systems Dr. Asad Alebrahim
8-6 Sensitivity Coefficient
❑ What would be the effect on the optimal value of
slightly relaxing the constraint?
A parameter known as the sensitivity coefficient 𝑺𝑪 is defined
as the rate of change of the objective function with the
constraint at the optimum.
This parameter is useful in adjusting the design variables to
come up with the final design.
The value of the sensitivity coefficient gives an indication of the
level of adjustment needed in the constraint in order to employ
standard sizes and readily available components.
❑ Notes
𝑆𝐶 = 𝜆 For 𝜙𝑖 → 𝑆𝐶𝑖 = 𝜆𝑖
8-5 Sensitivity Coefficient Example 8-6 9
End of Chapter 8.