Lecture Notes On Module-4
Lecture Notes On Module-4
• Decrease in transportation cost with larger lot sizes may not be linear. (Transportation
problem)
• Decrease in production cost with increase in production volume may not be linear.
(Inventory problem)
……………………………………
Where,
xj ≥ 0 ; j = 1 , 2 , 3 , ……… , n
Prepared by Ranbir Kalita
The above LPP becomes non-linear if the Objective Function and / or one or more of the
Constraints are non-linear in X (x1 , x2 , x3 , ……… , xn). Such a problem is called as Non-
linear Programming Problem (NLPP).
Page - 1
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Subject to,
gi (X) ≤ = ≥ bi ; i = 1 , 2 , 3 , ……… , m
Where, X≥0
∴ In the NLPP, we have to determine the n-tuple X = (x1 , x2 , x3 , ……… , xn) to minimize /
maximize the Objective Function subject to the constraints.
Finding the optimum solution in an LPP is comparatively easy because of the certainty that
the optimum solution lies at one or more extreme points of the Feasible Region. Therefore,
number of iterations to reach the optimal point is limited. But, in case of NLPP, the optimal
solution may be located at any point along the boundary of the feasible region or even within
the feasible region.
The main complexity in the solution of NLPP comes from the fact that, there is no single
algorithm, like the Simplex algorithm in case of LPP, which can be employed to solve
efficiently all the NLPPs. An algorithm that performs well on one type of problem may
perform very poorly on a problem with a different structure.
The optimization techniques to solve the NLPPs can be categorized into two types:
The main limitation of the Classical Optimization Techniques (COTs) is that, the
techniques are not applicable to non-differential / discontinuous functions.
• The COTs are useful in finding the optimum solution, i.e. Maxima or Minima of
continuous and differentiable functions.
Page - 2
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
• These are analytical methods and make use of the differential calculus in locating the
optimum solution.
The kind of problems that COTs address can be broadly divided into two types:
In non-linear programming, a function may have more than one maximum or minimum
values. That is, when a non-linear function is plotted, it will have more than one Peak and
more than one Velley. Each of these peaks is a Local Maxima, and each of the valleys is a
Local Minima.
Since an NLPP can have more than one maximum or minimum values, therefore, these
maximum or minimum values can be categorized into Relative or Local Maximum /
Minimum and Global or Absolute Maximum / Minimum. The following definitions are given
for a single variable NL function. But they are equally application to multi-variable NL
functions too.
Prepared by Ranbir Kalita
Fig. 4.4
Page - 3
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
• Relative / Local Maximum: A function of one variable f (x) is said to have a relative
/ local maximum at x = x* if f (x*) ≥ f (x + h) for all sufficiently small positive or
• Relative / Local Minimum: A function of one variable f (x) is said to have a relative /
local minimum at x = x* if f (x*) ≤ f (x + h) for all sufficiently small positive or
negative values of h.
• Global / Absolute Maximum: A function of one variable f (x) is said to have a global
/ absolute maximum at x = x* if f (x*) ≥ f (x) ∀ x in the interval [a , b]. That is, a
Global or Absolute Maximum of a function is a value which is higher than all values
of the function.
• Global / Absolute Minimum: A function of one variable f (x) is said to have a global
/ absolute minimum at x = x* if f (x*) ≤ f (x) ∀ x in the interval [a , b]. A Global or
The point x* mentioned in the definitions for Local and Global Maximum / Minimum is said
to be a Stationery Point / Point of Inflection if the function f (x*) has neither maximum or
minimum.
• At a point when maximum occurs (local / global), the function changes its trend
from increasing to decreasing.
• At a point when minimum occurs (local / global), the function changes its trend from
decreasing to increasing.
Prepared by Ranbir Kalita
• At the point of inflection, the function has either increasing or decreasing trend on
both sides of the point.
Page - 4
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
As can be seen in Fig. 4.1, the tangents drawn at the maximum, minimum and point of
inflections have Zero Slopes or they are parallel to the x-axis.
For example, as shown in Fig. 4.2, when a single variate NL function is plotted within
interval x = a and x = b, the function is seen to have Three Local Maxima at x1 , x3 and x6.
The Global Maximum is al x6.
Similarly, there are Three Local Minima at x2 , x4 and x7. The Global Minimum is at x7.
Prepared by Ranbir Kalita
The function f (x5) corresponding to x5 which has a Zero Slope is called the Point of
Inflection. If a point with Zero Slope is not a Maximum or Minimum, then it must
automatically be a Point of Inflection.
Page - 5
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
When the plot of a single variable function results in a curve, always curving downward or
not curving at all is called a Concave Function.
Also, for a concave function of several variables, if it has a Local Maxima, then the same is
the Global Maximum for the function.
When the plot of a single variable function results in a curve always curving upward is called
a Convex Function.
Figure 4.3
Page - 6
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
The Fig. 4.3 shows a single variable Convex Function. A line joining any two points on the
curve in the Feasible Region (S) is always above the function. There is always a Unique
Global Minimum of such a function
Important:
For a doubly differentiable single variable function f (x) without any constraint
(unconstrained optimization), then,
𝑑2 𝑓(𝑥)
• If ≤ 0 ∀ 𝑥 ; then the local or relative maxima is also the global maxima.
𝑑𝑥 2
Such a function is the concave function.
𝑑2 𝑓(𝑥)
• If ≥ 0 ∀ 𝑥 ; then the local or relative minima is also the global minima.
A single variable optimization problem is the one in which the value of x = x* is to be found
in the interval [a , b] such that x* maximizes / minimizes f (x).
Fig. 4.4
Page - 7
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
If a function f (x) is defined in the interval a ≤ x ≤ b and has a Saddle Point (local maxima or
minima or point of inflection) at x = x*, where a ≤ x* ≤ b and if the First Order Derivative
Let, f ′ (x*) = f ′′ (x*) = f ′′′ (x*) = ……… = f n-1 (x*) = 0 but f n (x*) ≠ 0, where f n is the n-th
order derivative, then x = x* is a:
Problem 4.1: Determine the Maximum and Minimum values of the function:
This means, that f ′ (x) = 0 at x = –2 , 1 and 2. For checking whether the function f (x) has
local maximum or local minimum at x = –2 , 1 and 2, calculate the Second Order Derivative
f ′′ (x) for the function f (x). therefore,
∵ at x = –2 , f ′′ (–2) = 144 ( > 0 ), ∴ f (x) has a local minima at x = –2 and the value is
Prepared by Ranbir Kalita
at x = 1 , f ′′ (1) = –36 ( < 0 ), ∴ f (x) has a local maxima at x = 1 and the value is 38
(concave curve).
Page - 8
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Alternate method:
Now find two values of f ′ (x), one < x and one > x for each value of x = –2 , 1 , 2 and show
• If the value of f ′ (x) is changing from +ve to –ve, this means it is a concave curve and
as such Local Maximum occurs at x.
• If the value of f ′ (x) is changing from–ve to +ve, this means it is a convex curve and
as such Local Minima occurs at x.
Here,
f ′ (–3) = –240
f ′ (–1) = 72
f ′ (3) = 120
On putting the values of x = –2 , 1 and 2 in f (x), we get the local maxima and local minima
values as f′ (–2) = –97 , f (1) = 38 and f′ (2) = 31.
Problem 4.2: Determine the Maximum and Minimum values of the function:
Solution: Find the first order derivative of the given non-linear function, equate to zero and
find the value(s) of the decision variable x.
Prepared by Ranbir Kalita
f ′ (x) = 0 => 12x5 – 24x3 + 12x = 0 => 12x (x2 – 1)2 = 0 => 12x = 0 and (x2 – 1)2 = 0
=> x = 0 => x2 = 1
=> x = ±1
Therefore, x = –1 , 0 , 1
Page - 9
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Here,
f ′ (–2) = –216
f ′ (–0.5) = –3.375
f ′ (2) = 216
Problem 4.3:
2 − (𝑥 − 1)2 ; 0 ≤ 𝑥 < 3
Maximize 𝑓(𝑥) = {
−3 + (𝑥 − 4)2 , 3 ≤ 𝑥 < 6
−2(𝑥 − 2) , 0≤𝑥<3
𝑓 ′ (𝑥) = {
2(𝑥 − 2) , 3≤𝑥<6
Equating the first f ′ (x) and second f ′ (x) values separately to zero, we get,
Therefore,
f ′ (0) = –2(0 – 1) = 2
f ′ (2) = –2(2 – 1) = –2
Prepared by Ranbir Kalita
f ′ (3) = 2(3 – 4) = –2
f ′ (5) = 2(5 – 4) = 2
Page - 10
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Therefore, the maximum value of the given function occurs at x = 1 and the corresponding
value is f (1) = 2 – (1 – 1)2 = 2.
The minimum value of the given function occurs at x = 4 and the corresponding value is f (4)
Problem 4.4: Find the maximum or minimum values for the functions:
(a) f (x) = x2 – 4x (b) f (x) = 2x3 + 3x2 – 12x (c) f (x) = 3x4 – 16x3 + 24x2
f ′ (x) = 2x – 4 = 0 => x = 2
Therefore,
Therefore,
f ′ (–3) = 4
f ′ (–1) = –2
f ′ (2) = 4
Hence, the local minimum value is f (1) = (2×13) + (3×12) – (12×1) = –7 corresponding to
Prepared by Ranbir Kalita
point (1 , –7).
Page - 11
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
For each of the following functions, show whether it is convex, concave or neither.
(a) f (x) = 10 – x2 (b) f (x) = x4 + 6x2 + 12x (c) f (x) = 2x3 – 3x2
𝑑𝑓(𝑥) 𝑑 2 𝑓(𝑥)
∴ = −2𝑥 and = −2 < 0 always
𝑑𝑥 𝑑𝑥 2
𝑑𝑓(𝑥) 𝑑 2 𝑓(𝑥)
∴ = 4𝑥 3 + 16𝑥 + 12 and = 12𝑥 2 + 16
𝑑𝑥 𝑑𝑥 2
𝑑𝑓(𝑥) 2
𝑑2 𝑓(𝑥)
∴ = 6𝑥 − 6𝑥 and = 12𝑥 − 16
𝑑𝑥 𝑑𝑥 2
𝑑2 𝑓(𝑥) 𝟏
Put = 0 ⇒ 12𝑥 − 6 = 0 ⇒ 𝒙 =
𝑑𝑥 2 𝟐
For x > 1/2, d2f (x)/dx2 is always > 0, therefore, the given function is Convex ∀ x > 1/2.
(d) f (x) = x4 + x2
Prepared by Ranbir Kalita
𝑑𝑓(𝑥) 3
𝑑 2 𝑓(𝑥)
= 4𝑥 + 2𝑥 and = 12𝑥 2 + 2
𝑑𝑥 𝑑𝑥 2
Page - 12
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
(e) f (x) = x3 + x4
𝑑𝑓(𝑥) 𝑑2 𝑓(𝑥)
∴ = 3𝑥 2 + 4𝑥 3 and = 6𝑥 + 12𝑥 2
𝑑𝑥 𝑑𝑥 2
At x = 0, d2f (x)/dx2 = 0.
Problem 4.6: Find the maximum and minimum values of the following function:
Therefore,
f ′ (–3) = – 240
f ′ (–1) = 72
f ′ (1.5) = – 10.5
f ′ (3) = 120
Hence,
Prepared by Ranbir Kalita
• The given function is Convex at x = – 2 and the corresponding local minimum value
is f (–2) = – 97.
• The given function is Concave at x = 1 and the corresponding local maximum value is
f (1) = 38.
• The given function is Convex at x = 2 and the corresponding local minimum value is
f (2) = 31.
Page - 13
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Page - 14
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Here, we have to find the maximum and minimum values of a function having two
independent variables. The function is not subjected to any constraint.
Let f is a function of two independent variables x and y. Since two independent variables are
involved, therefore, the differentiation will be partial.
𝜕𝑓 𝜕𝑓
Put =0 ; = 0 and find the values of 𝑥 and 𝑦.
𝜕𝑥 𝜕𝑦
These obtained values of x and y gives the Saddle Point at which maxima or minima will
occur.
(3) If rt – s2 < 0 and r > 0, then neither maximum nor minimum at (x , y).
(4) If rt – s2 = 0 and r > 0, then the case is doubtful and need further investigation.
Solution:
Prepared by Ranbir Kalita
𝜕𝑓 𝜕𝑓
= 2𝑥 + 6 = 0 ⇒ 𝑥 = −3 and = 2𝑦 = 0 ⇒ 𝑦 = 0
𝜕𝑥 𝜕𝑦
𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
𝑟= = 2 ; 𝑠 = = 0 ; 𝑡 = =2
𝜕𝑥 2 𝜕𝑥𝜕𝑦 𝜕𝑦 2
At (x , y) = (–3 , 0): r = 2 ; s = 0 ; t = 2
Page - 15
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Since, rt – s2 > 0 and r > 0, then f (x , y) is minimum at (–3 , 0). And the minimum
value is: f (–3 , 0) = (–3)2 + 0 + [6×(–3)] + 12 = 9 – 18 + 12 = 3.
Solution:
𝜕𝑢 −2
= 3𝑥1 2 + 2𝑥1 = 0 ⇒ 𝑥1 (3𝑥1 + 2) = 0 ⇒ 𝑥1 = 0 and 3𝑥1 + 2 = 0 ⇒ 𝑥1 =
𝜕𝑥1 3
𝜕𝑢 −8
= 3𝑥2 2 + 8𝑥2 = 0 ⇒ 𝑥2 (3𝑥2 + 8) ⇒ 𝑥2 = 0 and 3𝑥2 + 8 = 0 ⇒ 𝑥2 =
𝜕𝑥2 3
Now,
NOTE: Instead of (0 , 0) and (–2/3 , –8/3), the points (0 , –8/3) and (–2/3 , 0) can also be
tested as the saddle points. But at these points, there will be neither maximum nor minimum.
Prepared by Ranbir Kalita
𝜕𝑢
= 3𝑥 2 + 3𝑦 2 − 30𝑥 + 72 = 0 … … (1)
𝜕𝑥
𝜕𝑢
= 6𝑥𝑦 − 30𝑦 = 0 ⇒ 𝑦(6𝑥 − 30) = 0 ⇒ 𝑦 = 0 and 6𝑥 − 30 = 0 ⇒ 𝑥 = 5
𝜕𝑦
Page - 16
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
At (4 , 0) At (6 , 0) At (5 , 1) At (5 , –1)
r = –6 , s = 0 , t = –6 r=6,s=0,t=6 r=0,s=6,t=0 r = 0 , s = –6 , t = 0
rt – s2 = 36 > 0 rt – s2 = 36 > 0 rt – s2 = –36 < 0 rt – s2 = –36 < 0
and r = –6 < 0 and r = 6 > 0 and r = 0 and r = 0
Therefore, the Therefore, the
Therefore, the Therefore, the
function u is neither function u is neither
function u is function u is
maximum nor maximum nor
𝜕𝑓 𝜕𝑓
= 𝑥2 − 2𝑥1 = 0 … … (1) = 𝑥1 − 2𝑥2 = 0 ⇒ 𝑥1 = 2𝑥2 … … (2)
𝜕𝑥1 𝜕𝑥2
Therefore, f(X) is maximum at (0 , 0). That is Concave function and the maximum value is
Max. f(X) = 0.
Page - 17
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Strictly Strictly
Entity Convex Concave
Convex Concave
𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
[ × ] − [ ] ≥0 >0 ≥0 >0
𝜕𝑥1 2 𝜕𝑥2 2 𝜕𝑥1 𝜕𝑥2
𝜕𝑓 𝜕 2𝑓
= 4 + 2𝑥2 − 2𝑥1 and 𝑡 = =2
𝜕𝑥2 𝜕𝑥2 2
𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
Since [ × ] − [ ] = 4 > 0 and = 4 > 0 , =2>0
𝜕𝑥1 2 𝜕𝑥2 2 𝜕𝑥1 𝜕𝑥2 𝜕𝑥1 2 𝜕𝑥2 2
𝜕𝑓 𝜕𝑓
= 3 + 4𝑥1 − 2𝑥2 = 0 … … (1) and = 4 + 2𝑥2 − 2𝑥1 = 0
𝜕𝑥1 𝜕𝑥2
2𝑥1 − 4
⇒ 𝑥2 = … … (2)
2
Prepared by Ranbir Kalita
Page - 18
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
At (7/6 , –5/6),
𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
Since rt – s2 = 4 > 0 and r = 4 > 0, therefore, the function f(X) has a minimum value at (7/6 ,
–5/6) and the minimum value is 199/36 = 5.528.
𝜕𝑓 𝜕 2𝑓
= 3𝑥1 + 4𝑥2 and 𝑡 = =4
𝜕𝑥2 𝜕𝑥2 2
𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
Since [ × ] − [ ] = −1 < 0 and = 2 > 0 , =4>0
𝜕𝑥1 2 𝜕𝑥2 2 𝜕𝑥1 𝜕𝑥2 𝜕𝑥1 2 𝜕𝑥2 2
𝜕𝑓 𝜕𝑓 −3𝑥1
= 2𝑥1 + 3𝑥2 = 0 … … (1) and = 3𝑥1 + 4𝑥2 = 0 ⇒ 𝑥2 = … … (2)
𝜕𝑥1 𝜕𝑥2 4
−3𝑥1
2𝑥1 + 3 ( ) = 0 ⇒ 𝒙𝟏 = 𝟎 … … (3)
4
Page - 19
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Unlike finding the maximum or minimum value at a point (saddle point) that we did in the
previous classes, in this method, the point at which the maximum / minimum is to be
L = f + λ.g
Solution Steps:
(2) Find x, y, z and λ using the above equations. (x, y, z) is the saddle point.
(3) Construct the following matrix to check whether it is a maxima / minima at (x, y, z).
Equate the determinant of this matrix to zero and find the value of k.
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿11 = 2 ; 𝐿12 = ; 𝐿13 =
𝜕𝑥 𝜕𝑥𝜕𝑦 𝜕𝑥𝜕𝑧
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿21 = ; 𝐿22 = 2 ; 𝐿23 =
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑦𝜕𝑧
Prepared by Ranbir Kalita
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿31 = ; 𝐿32 = ; 𝐿33 = 2
𝜕𝑧𝜕𝑥 𝜕𝑧𝜕𝑦 𝜕𝑧
𝜕𝑔 𝜕𝑔 𝜕𝑔
𝑔1 = ; 𝑔2 = ; 𝑔3 =
𝜕𝑥 𝜕𝑦 𝜕𝑧
Property: The determinant of any matrix is zero when any two rows are equal.
Page - 20
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝐿
= 𝑥1 𝑥3 + 𝜆 = 0 ⇒ 𝜆 = −𝑥1 𝑥3 … … (2)
𝜕𝑥2
𝜕𝐿
= 𝑥1 𝑥2 + 𝜆 = 0 ⇒ 𝜆 = −𝑥1 𝑥2 … … (3)
𝜕𝑥3
𝜕𝐿
= 𝑥1 + 𝑥2 + 𝑥3 − 1 = 0 … … (4)
𝜕𝜆
𝑥1 + 𝑥2 + 𝑥3 − 1 = 0 ⇒ 𝑥1 + 𝑥2 + 𝑥3 = 1 ⇒ 𝑥1 + 𝑥1 + 𝑥1 = 1 ⇒ 3𝑥1 = 1 ⇒ 𝑥1 = 1⁄3
Now,
𝐿11 − 𝑘 𝐿12 𝐿13 𝑔1
𝐿 𝐿22 − 𝑘 𝐿23 𝑔2
[ 21 ]
𝐿31 𝐿32 𝐿33 − 𝑘 𝑔3
𝑔1 𝑔2 𝑔3 0
Therefore,
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
Prepared by Ranbir Kalita
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿21 = = 𝑥3 ; 𝐿22 = 2 = 0 ; 𝐿23 = = 𝑥1
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑦𝜕𝑧
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿31 = = 𝑥2 ; 𝐿32 = = 𝑥1 ; 𝐿33 = 2 = 0
𝜕𝑧𝜕𝑥 𝜕𝑧𝜕𝑦 𝜕𝑧
Page - 21
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝑔 𝜕𝑔 𝜕𝑔
𝑔1 = = 1 ; 𝑔2 = = 1 ; 𝑔3 = =1
𝜕𝑥 𝜕𝑦 𝜕𝑧
Now, to find out the value of k in the above matrix, equate the determinant of the above
matrix to zero.
Property: Determinant of a matrix is zero, when any two rows are identical.
Considering Rows-1 & 2, the last two elements are equal; and the first two elements will be
equal when,
This means 𝑘 = − 1⁄3 . Since 𝑘 < 0 , therefore, Maximum will occur at (1/3 , 1/3 , 1/3)
𝜕𝐿
= 1 + 2𝑥1 𝜆 = 0 ⇒ 𝑥1 = − 1⁄2𝜆 … … (1)
𝜕𝑥1
𝜕𝐿
= 1 + 2𝑥2 𝜆 = 0 ⇒ 𝑥2 = − 1⁄2𝜆 … … (2)
𝜕𝑥2
𝜕𝐿
= 1 + 2𝑥3 𝜆 = 0 ⇒ 𝑥3 = − 1⁄2𝜆 … … (3)
𝜕𝑥3
Page - 22
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝐿
= 𝑥1 2 + 𝑥2 2 + 𝑥3 2 − 1 = 0 … … (4)
𝜕𝜆
1 1 1 3 √3
⇒ + 2 + 2 − 1 = 0 ⇒ 𝜆2 = ⇒ 𝜆 = ±
√3 1 2 1
For 𝜆 = , from (1) => 𝑥1 = − 2 × ⇒ 𝑥1 = −
2 √3 √3
1
Therefore, 𝑥1 = 𝑥2 = 𝑥3 = −
√3
1 1 1 √3
Hence, saddle point is (− ,− ,− ) for 𝜆 =
√3 √3 √3 2
√3 1 2 1
For 𝜆 = − , from (1) => 𝑥1 = (− 2) × (− ) ⇒ 𝑥1 =
2 √3 √3
1
Therefore, 𝑥1 = 𝑥2 = 𝑥3 =
1 1 1 √3
Hence, saddle point is ( , , ) for 𝜆 = −
√3 √3 √3 2
Now,
𝐿11 − 𝑘 𝐿12 𝐿13 𝑔1
𝐿 𝐿22 − 𝑘 𝐿23 𝑔2
[ 21 ]
𝐿31 𝐿32 𝐿33 − 𝑘 𝑔3
𝑔1 𝑔2 𝑔3 0
Therefore,
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿11 = = 2𝜆 ; 𝐿12 = = 0 ; 𝐿13 = =0
𝜕𝑥1 2 𝜕𝑥1 𝜕𝑥2 𝜕𝑥1 𝜕𝑥3
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
Prepared by Ranbir Kalita
𝜕 2𝐿 𝜕 2𝐿 𝜕 2𝐿
𝐿31 = = 0 ; 𝐿32 = = 0 ; 𝐿33 = = 2𝜆
𝜕𝑥3 𝜕𝑥1 𝜕𝑥3 𝜕𝑥2 𝜕𝑥3 2
𝜕𝑔 𝜕𝑔 𝜕𝑔
𝑔1 = = 2𝑥1 ; 𝑔2 = = 2𝑥2 ; 𝑔3 = = 2𝑥3
𝜕𝑥1 𝜕𝑥2 𝜕𝑥3
Page - 23
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Therefore,
𝐿11 − 𝑘 𝐿12 𝐿13 𝑔1 2𝜆 − 𝑘 0 0 2𝑥1
𝐿 𝐿22 − 𝑘 𝐿23 𝑔2 0 2𝜆 − 𝑘 0 2𝑥2
[ 21 ]=0⇒[ ]=0
𝐿31 𝐿32 𝐿33 − 𝑘 𝑔3 0 0 2𝜆 − 𝑘 2𝑥3
𝑔1 𝑔2 𝑔3 0 2𝑥1 2𝑥2 2𝑥3 0
2𝜆 − 𝑘 = 0 and 0 = 2𝜆 − 𝑘
⇒ 𝑘 = 2𝜆 and ⇒ 𝑘 = 2𝜆
√3 √3
For 𝜆 = ; 𝑘 =2× ⇒ 𝑘 = √3 > 0
2 2
1 1 1
Therefore, the function has a minima at (− ,− ,− ) and the minimum value is,
√3 √3 √3
√3 √3
For 𝜆 = − ; 𝑘 = 2 × (− ) ⇒ 𝑘 = −√3 < 0
2 2
1 1 1
Therefore, the function has a maxima at ( , , ) and the maximum value is,
√3 √3 √3
1 1 1
𝑓𝑚𝑎𝑥 = 𝑥1 + 𝑥2 + 𝑥3 = + + ⇒ 𝒇𝒎𝒂𝒙 = √𝟑
√3 √3 √3
Problem 4.13: A company produces TV sets at two different factories A & B. suppose x
number of TVs are produced at factory A and y number of TVs are produced at factory B.
The total cost of production of x + y TVs is given by C(x , y) = 6x2 + 12y2
Prepared by Ranbir Kalita
If 90 numbers of TV sets are produced in a month, then calculate how much TV sets should
be produced at each of the factories?
Subject to, 𝑥 + 𝑦 = 90 ⇒ 𝑔 = 𝑥 + 𝑦 − 90
Page - 24
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝐿
= 12𝑥 + 𝜆 = 0 ⇒ 12𝑥 = −𝜆 ⇒ 𝑥 = − 𝜆⁄12 … … (1)
𝜕𝑥
𝜕𝐿
= 24𝑦 + 𝜆 = 0 ⇒ 12𝑥 = −𝜆 ⇒ 𝑦 = − 𝜆⁄24 … … (2)
𝜕𝑦
𝜆 −720
From (1): 𝑥 = − 12 = − ( ) ⇒ 𝒙 = 𝟔𝟎
12
𝜆 −720
From (2): 𝑦=− = −( ) ⇒ 𝒚 = 𝟑𝟎
24 24
Therefore,
𝜕2𝐿 𝜕 2𝐿
𝐿11 = 2 = 12 ; 𝐿12 = =0
𝜕 2𝐿 𝜕 2𝐿
𝐿21 = = 0 ; 𝐿22 = 2 = 24
𝜕𝑦𝜕𝑥 𝜕𝑦
𝜕𝐿 𝜕𝐿
𝑔1 = = 1 ; 𝑔2 = =1
𝜕𝑥 𝜕𝑦
𝐿11 − 𝑘 𝐿12 𝑔1 12 − 𝑘 0 1
[ 𝐿21 𝐿22 − 𝑘 𝑔2 ] = 0 ⇒ [ 0 24 − 𝑘 1] = 0
𝑔1 𝑔2 0 1 1 0
12 − 𝑘 = 0 and 0 = 24 − 𝑘
This means Minima at (60 , 30) and the minimum value is:
Page - 25
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Whenever we need to find out the minimum or maximum value at a point w.r.t some
constraints (one / two) of inequality type, then Karush-Kuhn-Tucker (KKT) conditions are to
Solution steps:
(2) Find / Identify f (x1, x2); h1 (x1, x2) and h2 (x1, x2).
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 … … … (1)
𝜕𝑥1 𝜕𝑥1 𝜕𝑥1
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
𝜆1 ℎ1 (𝑥1 , 𝑥2 ) = 0 … … … (3)
𝜆2 ℎ2 (𝑥1 , 𝑥2 ) = 0 … … … (4)
𝑥1 , 𝑥2 ≥ 0 … … … (7)
(4) Solve equations (1) to (4) to find out the values of x1 , x2 , λ1 and λ2 . These values must
satisfy the inequalities (5) to (8).
Prepared by Ranbir Kalita
For solving equations (1) to (4), following four cases may be considered:
Case-1: 𝜆1 = 𝜆2 = 0 Case-2: 𝜆1 ≠ 0 ; 𝜆2 ≠ 0
Case-3: 𝜆1 = 0 ; 𝜆2 ≠ 0 Case-4: 𝜆1 ≠ 0 ; 𝜆2 = 0
Page - 26
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝑓 𝜕ℎ
−𝜆 = 0 ⇒ 8 − 2𝑥1 − 𝜆(3) = 0 ⇒ 8 − 2𝑥1 − 3𝜆 = 0 … … … (1)
𝜕𝑥1 𝜕𝑥1
𝜕𝑓 𝜕ℎ
−𝜆 = 0 ⇒ 10 − 2𝑥2 − 𝜆(2) = 0 ⇒ 10 − 2𝑥2 − 2𝜆 = 0 … … … (2)
𝜕𝑥2 𝜕𝑥2
Case-1: when λ = 0
⇒ 𝒙𝟏 = 𝟒 and ⇒ 𝒙𝟐 = 𝟓
(4) ⇒ (3 × 4) + (2 × 5) − 6 = 𝟏𝟔 ≮ 𝟎
Therefore, even though the values of x1 and x2 satisfies the inequalities (4) & (5), yet
inequality (6) is not satisfied. Hence, the solution x1 = 4 and x2 = 5 must be rejected.
Page - 27
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Case-2: when λ ≠ 0
From equation (3), if λ ≠ 0, then, 3𝑥1 + 2𝑥2 − 6 must be equal to zero. Therefore,
4 33 32
𝑥1 = ; 𝑥2 = ; 𝜆=
13 13 13
Since, these values of x1 , x2 and λ are satisfying the inequalities (4) , (5) & (6), therefore,
these set of values can be accepted. Hence,
4 33 4 2 33 2 𝟐𝟕𝟕
Max. Z = (8 × ) + (10 × ) − ( ) − ( ) ⇒ 𝐌𝐚𝐱. 𝐙 =
13 13 13 13 𝟏𝟑
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ (10 − 2𝑥1 ) − 𝜆1 (1) − 𝜆2 (−1) = 0
𝜕𝑥1 𝜕𝑥1 𝜕𝑥1
⇒ 2𝑥1 + 𝜆1 − 𝜆2 = 10 … … … (1)
Prepared by Ranbir Kalita
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ (10 − 2𝑥2 ) − 𝜆1 (1) − 𝜆2 (1) = 0
𝜕𝑥2 𝜕𝑥2 𝜕𝑥2
⇒ 2𝑥2 + 𝜆1 + 𝜆2 = 10 … … … (2)
Page - 28
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
ℎ1 (𝑥1 , 𝑥2 ) ≤ 0 ⇒ 𝑥1 + 𝑥2 − 14 ≤ 0 … … … (5)
Case-1: when λ1 = λ2 = 0
⇒ 𝑥1 = 5 and ⇒ 𝑥2 = 5
Now, these values of x1 and x2 must satisfy the inequalities (5), (6) & (7).
Therefore,
Though the solution to the problem stops here, yet, lets try Case-2: λ1 ≠ 0 & λ2 ≠ 0
Solving equations (1), (2), (A) & (B), we will get the values of x1 , x2 , λ1 & λ2 .
Prepared by Ranbir Kalita
(1) ⇒ (2 × 4) + 𝜆1 − 𝜆2 = 0 ⇒ 𝜆1 − 𝜆2 = 2 … … … (C)
Page - 29
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Through the values of x1 and x2 obtained in Case-2 satisfies the inequality (7), yet the values
of λ1 & λ2 do not satisfy inequality (8). Therefore. These set of values can be discarded.
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ (10 − 4𝑥1 ) − 𝜆1 (1) − 𝜆2 (−1) = 0
𝜕𝑥1 𝜕𝑥1 𝜕𝑥1
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ 3 − 𝜆1 (4) − 𝜆2 (1) = 0
𝜕𝑥2 𝜕𝑥2 𝜕𝑥2
⇒ 4𝜆1 + 𝜆2 = 3 … … … (2)
ℎ2 (𝑥1 , 𝑥2 ) ≤ 0 ⇒ 𝑥1 + 𝑥2 − 2 ≤ 0 … … … (6)
Prepared by Ranbir Kalita
Case-1: when λ1 = λ2 = 0
Page - 30
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
1
⇒ 𝑥1 = and ⇒ 𝑥2 = 0
2
Now, these values of x1 and x2 must satisfy the inequalities (5), (6) & (7).
1
(6) ⇒ 𝑥1 + 𝑥2 − 2 = + 0 − 2 = −1.5 < 0 [satisfied]
2
1
(7) ⇒ 𝑥1 = > 0 and 𝑥2 = 0 [satisfied]
2
Therefore,
2
1 1 2 𝟏
𝑍𝑚𝑎𝑥 = 2𝑥1 + 3𝑥2 − 2𝑥1 = (2 × ) + (3 × 0) − [2 × ( ) ] ⇒ 𝒁𝒎𝒂𝒙 = 𝟎. 𝟓 =
2 2 𝟐
Solving equations (1), (2), (A) & (B), we will get the values of x1 , x2 , λ1 & λ2 .
4 2
Solving (A) and (B), we get: 𝑥1 = 3 and 𝑥2 = 3
4 10
(1) ⇒ (4 × ) + 𝜆1 + 𝜆2 = 0 ⇒ 𝜆1 + 𝜆2 = − … … … (C)
3 3
Prepared by Ranbir Kalita
19 49
Solving equations (C) and (D), we get: 𝜆1 = and 𝜆2 = −
9 9
Since, λ2 < 0, therefore, inequality (8) is not satisfied. Hence, these set of values obtained
under Case-2 can be discarded.
Page - 31
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝑓 𝜕ℎ
−𝜆 = 0 ⇒ 6𝑥1 + 14𝑥2 − 𝜆(1) = 0 ⇒ 6𝑥1 + 14𝑥2 − 𝜆 = 0 … … … (1)
𝜕𝑥1 𝜕𝑥1
𝜕𝑓 𝜕ℎ
−𝜆 = 0 ⇒ 14𝑥1 − 16𝑥2 − 𝜆(2) = 0 ⇒ 14𝑥1 − 16𝑥2 − 2𝜆 = 0 … … … (2)
𝜕𝑥2 𝜕𝑥2
Case-1: when λ = 0
𝟒 𝟕
⇒ 𝒙𝟏 = and ⇒ 𝒙𝟐 =
𝟕𝟑 𝟏𝟒𝟔
4 7 𝟏𝟕𝟒𝟏
(4) ⇒ 𝑥1 + 2𝑥2 − 24 = + (2 × ) − 24 = − < 𝟎 [satisfied]
73 146 𝟕𝟑
Therefore,
4 2 4 7 7 2
𝑍𝑚𝑎𝑥 = 3𝑥1 2 + 14𝑥1 𝑥2 − 8𝑥2 2 = [3 × ( ) ] + (14 × × ) − [8 × ( ) ]
73 73 146 146
Page - 32
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝟐
⇒ 𝒁𝒎𝒂𝒙 =
𝟕𝟑
Case-2: when λ ≠ 0
𝑥1 + 2𝑥2 − 24 = 0 … … … (7)
𝑥1 = 22 ; 𝑥2 = 1 ; 𝜆 = 146
Since, these values of x1 , x2 and λ are satisfying the inequalities (4) , (5) & (6), therefore,
these set of values can be accepted. Hence,
⇒ 𝒁𝒎𝒂𝒙 = 𝟏𝟕𝟓𝟐
Since, the value of Zmax obtained from Case-1 is less than that obtained from Case-2,
therefore, the final solution to the given problem is:
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ (2𝑥1 − 4) − 𝜆1 (−2𝑥1 ) − 𝜆2 (−1) = 0
𝜕𝑥1 𝜕𝑥1 𝜕𝑥1
Page - 33
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
𝜕𝑓 𝜕ℎ1 𝜕ℎ2
− 𝜆1 − 𝜆2 = 0 ⇒ (2𝑥2 − 2) − 𝜆1 (1) − 𝜆2 (−1) = 0
𝜕𝑥2 𝜕𝑥2 𝜕𝑥2
⇒ 𝑥1 = 2 and ⇒ 𝑥2 = 1
Now, these values of x1 and x2 must satisfy the inequalities (5), (6) & (7).
Though the values of x1 and x2 satisfies the inequality (7), yet, the inequalities (5) & (6)
remains unsatisfied. Therefore, these set of values must be rejected.
Case-2: λ1 ≠ 0 & λ2 ≠ 0
Page - 34
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Solving equations (1), (2), (A) & (B), we will get the values of x1 , x2 , λ1 & λ2 .
(𝐵) ⇒ −𝑥2 = 𝑥1 − 2 ⇒ 𝑥2 = 2 − 𝑥1
𝑥2 = 2 − 1 ⇒ 𝑥2 = 1 and 𝑥2 = 2 − (−2) ⇒ 𝑥2 = 4
Putting these values of x1 and x2 in equations (3) & (4), we have to find the values of λ1 & λ2
When x1 = 1 and x2 = 1:
Now, theses set of values, i.e. x1 = 1 , x2 = 1 , λ1 = 0 and λ2 = 0 satisfies the inequalities (5),
(6), (7) & (8). Therefore, these set of values can be accepted.
When x1 = –2 and x2 = 4:
Now, theses set of values, i.e. x1 = –2 , x2 = 4 , λ1 = 0 and λ2 = 0 satisfies the inequalities (5),
(6), (7) & (8). Therefore, these set of values can be accepted.
Therefore, 𝑍𝑚𝑎𝑥 = (𝑥1 − 2)2 + (𝑥2 − 1)2 = [(−2) − 2]2 + (4 − 1)2 ⇒ 𝒁𝒎𝒂𝒙 = 𝟏𝟕
Page - 35
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
Case-3: λ1 = 0 & λ2 ≠ 0
Solving the above three equations, we get the values of x1 , x2 and λ2 as:
3 1
𝑥1 = ; 𝑥2 = ; 𝜆2 = 1
2 2
Now, these set of values must satisfy the inequalities (5), (6), (7) & (8).
2
3 2 1 7
(5) ⇒ −𝑥1 + 𝑥2 = − ( ) + ( ) = − ≯ 0 [not satisfied]
2 2 4
Since, inequality (5) is not satisfied, therefore, these set of values are not acceptable.
Case-4: λ1 ≠ 0 & λ2 = 0
The above equation is of the form ax3 + bx2 + cx + d = c. Solving the above equation, we get,
𝑥1 = 1.165
Page - 36
Mechanical Engineering Department Jorhat Engineering College
OR : Module-4
These values of x1 = 1.165 , x2 = 1.357 , λ1 = 0.72 & λ2 = 0 must satisfy the inequalities (5),
(6), (7) & (8).
References:
[1] Hamdy A. Taha (2007), Operations Research: An Introduction (8th edition), Pearson,
ISBN 0-13-188923·0, Chapter 16, pp. 605-640.
[2] Prem Kumar Gupta and D. S. Hira (2014), Operations Research (7th revised edition),
S. Chand, ISBN: 81-219-0281-9, Chapter 16, pp. 1396-1474.
Page - 37
Mechanical Engineering Department Jorhat Engineering College