Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

North South University North South University

So far we have covered optimization – finding the minima and maxima – of univariate functions.
Now, let us look at the idea of optimization of multivariate functions.
Here, 𝑧 = 𝑓(𝑥, 𝑦) = 𝑥 2 + 𝑦 2 is a multivariate function which is a three dimensional graph1, shaped
like a bowl, as below:

Here, we want to find out at what value of 𝑥 and 𝑦 does the minimum point (the lowest point) occur.
As we can see, at the minimum point the slope is zero. Therefore, both the first partial derivatives
(which gives slopes) should be zero, that is: 𝑓𝑥 = 0 𝑎𝑛𝑑 𝑓𝑦 = 0
Here, 𝑓𝑥 = 2𝑥 2−1 + 0 = 2𝑥 and 𝑓𝑦 = 0 + 2𝑦 2−1 = 2𝑦
Therefore, at the minimum point: 2𝑥 = 0 and 2𝑦 = 0
From 2𝑥 = 0 we find 𝑥 = 0 From 2𝑦 = 0 we find 𝑦 = 0
Therefore, at 𝑥 = 0, 𝑦 = 0 we have a stationary point (zero slope point)
Remember: Without a graph we cannot be sure whether the stationary point is a maximum or
minimum.
In case of multivariate functions, we need second derivatives and cross partial derivatives to
become sure.
Second derivative with respect to 𝒙 - 𝒇𝒙𝒙 - is found by differentiating 𝑓𝑥 = 2𝑥 with respect to 𝑥
Here, 𝑓𝑥𝑥 = 2(1)𝑥 1−1 = 2 > 0
Similarly, second derivative with respect to 𝒚 - 𝒇𝒚𝒚 - is found by differentiating 𝑓𝑦 = 2𝑦 with
respect to 𝑦
Here, 𝑓𝑦𝑦 = 2(1)𝑦1−1 = 2 > 0
Cross partial derivative with respect to 𝒙 - 𝒇𝒚𝒙 - is found by differentiation 𝑓𝑦 with respect to
2
𝑥
Therefore, 𝑓𝑦𝑥 = 0

1
Since there are two independent variables and one dependent variable (total three variables), we get a three
dimensional graph
2
We have to assume 𝑥 is variable and 𝑦 is constant
North South University North South University

Cross partial derivative with respect to 𝒚 - 𝒇𝒙𝒚 - is found by differentiation 𝑓𝑥 with respect to
𝑦
Therefore, 𝑓𝑥𝑦 = 0
Now, we need to check whether: 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑥
Here, (2)(2) > (0)(0) → 4>0
Since, 𝑓𝑥𝑥 > 0 , 𝑓𝑦𝑦 > 0 and 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑥 we can be sure that we have a minimum point.
Important: All three conditions together gives us the guarantee we have a minimum point.
Similarly, if 𝒇𝒙𝒙 < 𝟎 , 𝒇𝒚𝒚 < 0 and 𝒇𝒙𝒙 𝒇𝒚𝒚 > 𝒇𝒙𝒚 𝒇𝒚𝒙 we can be sure that we have a maximum
point.

Example: 𝑧 = 𝑓(𝑥, 𝑦) = 60𝑥 + 34𝑦 − 4𝑥𝑦 − 6𝑥 2 − 3𝑦 2 + 5


Find the values of 𝑥 and 𝑦 at which the function is stationary? Is the stationary point a maximum or
minimum?

At the stationary points: the first partial derivatives (slope) are equal to zero
Therefore, 𝑓𝑥 = 60(1)𝑥1−1 − 4(1)𝑥1−1 𝑦 − 6(2)𝑥 2−1 = 60 − 4𝑦 − 12𝑥 = 0 (1)
𝑓𝑦 = 34(1)𝑦1−1 − 4(1)𝑥𝑦1−1 − 3(2)𝑦 2−1 = 34 − 4𝑥 − 6𝑦 = 0 (2)
Multiplying (2) with 3 we get: 102 − 12𝑥 − 18𝑦 = 0
From this we can get: 12𝑥 = 102 − 18𝑦 Let us substitute this in (1): 60 − 4𝑦 − (102 − 18𝑦) = 0
From here we can find: −42 + 14𝑦 = 0 → 𝑦=3
Substituting 𝑦 = 3 in (1) : 60 − 4(3) − 12𝑥 = 0 → 𝑥=4
Therefore, 𝑥 = 4, 𝑦 = 3 we have a stationary point (where slope is zero)
To understand whether the stationary point is a maximum or minimum we need the second and cross partial
derivatives: 𝑓𝑥𝑥 , 𝑓𝑦𝑦 , 𝑓𝑥𝑦 , 𝑓𝑦𝑥
From 𝑓𝑥 = 60𝑦 − 4𝑦 − 12𝑥 we can find: 𝑓𝑥𝑥 = −12(1)𝑥 1−1 = −12 < 0 and 𝑓𝑥𝑦 = −4(1)𝑦1−1 = −4
From 𝑓𝑦 = 34 − 4𝑥 − 6𝑦 we can find: 𝑓𝑦𝑦 = −6(1)𝑦1−1 = −6 < 0 and 𝑓𝑦𝑥 = −4(1)𝑥1−1 = −4
Now we can check whether: 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑦
Here, 𝑓𝑥𝑥 𝑓𝑦𝑦 = (−12)(−6) = 72 and 𝑓𝑥𝑦 𝑓𝑦𝑥 = (−4)(−4) = 16
Therefore, 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑦
Since, 𝑓𝑥𝑥 < 0 , 𝑓𝑦𝑦 < 0 and 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑥 we can be sure that we have a maximum point at
𝑥 = 4 and 𝑦 = 3.

Business Example:
A business firm produces two products: A and B. 𝑥 represents amount of product A 𝑦 represents
amount of product B.
The profit function of a business firm is: 𝜋 = 𝑓(𝑥, 𝑦) = 64𝑥 − 2𝑥 2 + 4𝑥𝑦 − 4𝑦 2 + 32𝑦 − 14
Find the amount of A and B that should be produced to maximize the profit of the business firm? What is the
maximum profit that the business firm can generate?

At the profit maximum point, the first partial derivatives of the profit function should be zero, that is:
North South University North South University

𝑓𝑥 = 0 , 𝑓𝑦 = 0
Here, 𝑓𝑥 = 64 − 4𝑥 + 4𝑦 = 0 (1)
𝑓𝑦 = 4𝑥 − 8𝑦 + 32 = 0 (2) → 4𝑥 = 8𝑦 − 32 substituting this in (1) →
→ 64 − (8𝑦 − 32) + 4𝑦 = 0 → 𝑦 = 24 substituting 𝑦 = 24 in (1) →
→ 64 − 4𝑥 + 4(24) = 0 → 𝑥 = 40
(continued next page)

Now we need to check whether 𝑥 = 40, 𝑦 = 24 will give the maximum profit
𝑓𝑥𝑥 = −4 < 0 , 𝑓𝑦𝑦 = −8 < 0
𝑓𝑥𝑦 = 4 , 𝑓𝑦𝑥 = 4
Here, 𝑓𝑥𝑥 𝑓𝑦𝑦 = (−4)(−8) = 32 and 𝑓𝑥𝑦 𝑓𝑦𝑥 = (4)(4) = 16
Therefore, 𝑓𝑥𝑥 𝑓𝑦𝑦 > 𝑓𝑥𝑦 𝑓𝑦𝑥
All the conditions of a maximum point have been satisfied. Therefore, 𝑥 = 40 and 𝑦 = 24 will give us the
maximum profit.
Maximum profit amount:
𝜋 = 𝑓(40,24) = 64(40) − 2(4)2 + 4(40)(24) − 4(24)2 + 32(40) − 14 = 1650
Interpretation (conclusion): According to the above mathematical analysis, if the business firm produces 40
units of product A and 24 units of product B, then the business will be able to generate the maximum profit.
The maximum profit is BDT 1650.

Note: This was also an example of an optimization problem where we found the choice variables (𝑥 and 𝑦) at
which the objective function (profit) is maximized. The business can choose the amount (𝑥 and 𝑦) that they
will produce, that is why they are called choice or decision variables. However, in the all the optimization
problems we have seen so far there wasn’t any restriction (constraint) on the amount of output the business
can produce. That is, there was no restriction (constraint) on the choice or decision variables and that is why
these are called unconstrained optimization problems. Now we look at constrained optimization problems.

Constrained Optimization with Equality Constraints

Sometimes, the choice variables can have a restriction or constraint. For example, a garments factory can
produce two products A and B (𝑥 and 𝑦 represent the amount of produce A and B). The factory has to
produce exactly 34 units of product A and B in any combination for a foreign buyer.

The last sentence can be expressed mathematically as: 𝑥 + 𝑦 = 34 → this is an example of an equality
constraint. Hence, it is called an optimization problem with equality constraint3, since in this case the factory
would want to produce the 34 units at the lowest cost (cost minimization). More precisely, the garments

3
There is a equality sign, = , in the constraint
North South University North South University

factory will produce the amount of A and B so that in total the output is 34 units and the cost is minimum as
well4.
Since, the objective is to minimize cost we need the cost function (the objective function in this case).
Given, the cost function is: 𝐶 = 𝑓(𝑥, 𝑦) = 6𝑥 2 + 10𝑦 2 − 𝑥𝑦 + 30
Equality constraint: 𝑥 + 𝑦 = 34
Constrained optimization with equality constraint problems can be solved using the Lagrange Multiplier
Method.
Note: The Lagrange Multiplier Method is used to solve constrained optimization problems.
The first step in the Lagrange Multiplier Method is to focus on the constraint. In this case: 𝑥 + 𝑦 = 34
We assume the constant of the constraint is 𝑘 and the variable side 𝑔
Now find the expression: 𝑘 − 𝑔
Here, 𝑘 − 𝑔 = 34 − (𝑥 + 𝑦) = 34 − 𝑥 − 𝑦
In the second step we write the Lagrange function, 𝐿: 𝐿 = 𝑜𝑏𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 + 𝜆(𝑘 − 𝑔)
Note: 𝜆 is a variable in the Lagrange function. It is called the Lagrange Multiplier.
Here, 𝐿 = 𝑓(𝑥, 𝑦, 𝜆) = 6𝑥 2 + 10𝑦 2 − 𝑥𝑦 + 30 + 𝜆(34 − 𝑥 − 𝑦)
Remember: Our objective is to minimize the total cost
At the minimum cost point, the first partial derivatives are equal to zero. Here, there are three
variables so there will be three first partial derivatives with respect to each:
𝐿𝑥 = 12𝑥 − 𝑦 − 𝜆 = 0 (1)
𝐿𝑦 = 20𝑦 − 𝑥 − 𝜆 = 0 (2)
𝐿𝜆 = 34 − 𝑥 − 𝑦 = 0 (3)
Subtracting (2) from (1) → 12𝑥 − 𝑦 − 𝜆 − (20𝑦 − 𝑥 − 𝜆) = 0 → 13𝑥 − 21𝑦 = 0 (4)
From (3) → 𝒙 = 𝟑𝟒 − 𝒚 substituting this in (4) → 13(34 − 𝑦) − 21𝑦 = 0
→ 442 − 34𝑦 = 0 → 𝑦 = 13 substitute in 𝒙 = 𝟑𝟒 − 𝒚 → 𝑥 = 21
Now we need to check whether 𝑥 = 21, 𝑦 = 13 is a maximum or not
In Constrained Optimization with Equality Constraint problems, we use the Bordered Hessian Matrix
to check the nature of a stationary point (whether its maximum or minimum).
̅ be a 3 x 3 (3 by 3) matrix because there are three independent variables
Here, the bordered Hessian matrix, 𝐻
0 𝑔𝑥 𝑔𝑦 0 1 1
̅ = [𝑔𝒙
𝐻 𝐿𝒙𝑥 𝐿𝒙𝑦 ] = [1 12 −1]
𝑔𝒚 𝐿𝒚𝑥 𝐿𝒚𝑦 1 −1 20
̅ has the following properties:
𝐻
1) The first element is zero
2) The first row and column will contain the partial derivatives of 𝑔 **
3) In the principle diagonal we have the second derivatives

4
If the cost is minimized then the profit can be maximized in the given situation
North South University North South University

4) The first letter of the subscripts should be the same along a particular row
** Remember: Here, 𝑔 = 𝑥 + 𝑦 → 𝑔𝑥 = 1𝑥 1−1 + 0 = 1 and 𝑔𝑦 = 0 + 1𝑦1−1 = 1
From 𝐿𝑥 we can find 𝐿𝑥𝑥 = 12 and 𝐿𝑥𝑦 = −1
From 𝐿𝑦 we can find 𝐿𝑦𝑦 = 20 and 𝐿𝑦𝑥 = −1
Now, let’s substitute these values in the matrix above. Then, calculate the determinant of the
matrix.
̅̅̅ = 0[(12 × 20) − (−1 × −1)] − 1[(1 × 20) − (1 × −1)] + 1[(1 × −1) − (12 × 1)] = −44
|𝐻|
̅̅̅ = −44 < 0
|𝐻| If the determinant of a 3 x 3 bordered hessian matrix is negative, then we have a
minimum
Conclusion: The business can minimize its total cost of producing 34 units if it produces 21 units of
product A and 13 units of product B
Another Business Situation where Constrained Optimization with Equality Constraints can be
Applied:
A business firm which produces only one product is under a contract to produce 434 units for a
client. The business produces its output using labour and machines and the production function of
the business firm is: 𝑄 = 𝑓(𝐾, 𝐿) = 10𝐾 0.7 𝐿0.1 where 𝐾 is the number of machines and 𝐿 is
the number of workers.
Note: The production function tells us that the business produces its output using both machines
and labor.
The salary per labour is BDT 10 and the cost per machine is BDT 28.
1) What should be the aim of the business in the given situation?
2) How can the business achieve the aim that you stated in 1) above?

1) The aim of the business should be produce the 434 units at the lowest possible cost.
2) They need to use the combination of inputs (labour and machines)5 that will let them produce
the 434 units at the lowest possible cost.

Here, the aim (objective) of the business is to minimize total cost of production. Therefore, we need
the total cost function (the objective function) in this case.
Total cost = total cost of labour + total cost machines
𝐶 = 10𝐿 + 28𝐾

Here, output must equal 434 units.


Therefore, 𝑄 = 434. Also, 𝑄 = 10𝐾 0.7 𝐿0.1. Combining these two → 10𝐾 0.7 𝐿0.1 = 434
10𝐾 0.7 𝐿0.1=434 is the equality constraint in this case (a constraint on the independent choice
variables)

5
The business can produce the 434 units using many possible combinations. For example, 100 workers (L) and 39
machines (K) or 50 L and 125 K or 10 L and 157 K, etc. They need to choose the (optimum) combination which will let
them produce the 434 units at the lowest cost. This is idea is very good example of business optimization.
North South University North South University

Remember: 𝑔 represents the variable side, here 10𝐾 0.7 𝐿0.1, of the constraint; 𝑘 represents and the
constant side, that is 434. Therefore, 𝑘 − 𝑔 = 434 − 10𝐾 0.7 𝐿0.1

Now, we can write the Lagrange function, ℒ =objective function +𝜆(𝑘 − 𝑔)


Here, ℒ = 10𝐿 + 28𝐾 + 𝜆(434 − 10𝐾 0.7 𝐿0.1 )
At the minimum point all the first partial derivatives will be equal to zero
ℒ𝐿 = 10 − 10(0.1)𝜆𝐾 0.7 𝐿0.1−1 = 10 − 𝜆𝐾 0.7 𝐿−0.9 = 0 (1)
ℒ𝐾 = 28 − 10(0.7)𝜆𝐾 0.7−1 𝐿0.1 = 28 − 7𝜆𝐾 −0.3 𝐿0.1 = 0 (2)
ℒ𝜆 = 434 − 10𝐾 0.7 𝐿0.1 = 0 (3)

(You won’t be asked to perform the following calculations during exam, but you should understand
the following steps; they are the same as the last math)

By solving equations (1), (2) and (3) we can find 𝐿 = 50, 𝐾 = 125 and 𝜆 = 11.25

Now, we need to check using the bordered Hessian matrix whether 𝐿 = 50, 𝐾 = 125 will lead to
the minimum cost

0 𝑔𝐿 𝑔𝐾 0 𝐾 0.7 𝐿−0.9 7𝐾 −0.3 𝐿0.1


̅ = [ 𝑔𝑳
𝐻 ℒ𝑳𝑳 ℒ𝑳𝑲 ] = [ 𝐾 0.7 𝐿−0.9 0.9𝜆𝐾 0.7 𝐿−1.9 −0.7𝜆𝐾 −0.3 𝐿−0.9 ]
𝑔𝑲 ℒ𝑲𝑳 ℒ𝑲𝑲 7𝐾 −0.3 𝐿0.1 −0.7𝜆𝐾 −0.3 𝐿−0.9 2.1𝜆𝐾 −1.3 𝐿0.1
̅<0
From above we can find: 𝐻 → At 𝐿 = 50, 𝐾 = 125 the cost will be minimized

(You won’t be asked to perform the above calculation of this math during exam, but you should
understand the steps; they are the same as the last math)

Conclusion: If the business employs 50 workers and 125 machines to produce 434 units, then the
total cost of production will be minimized (lowest cost).

(END OF MID 1 Syllabus)

Summary and Important Points:

At a stationary point (maximum, minimum or inflection point) the first derivatives or first partial
derivatives are equal to zero.

To be sure whether a stationary point is a maximum or minimum we need to perform further tests:

- Using second derivatives if it’s a univariate function

- Using second and cross partial derivatives if it’s a multivariate function

- In case of constrained optimization with equality constraints we need to check using the
bordered Hessian matrix.
North South University North South University

We can apply the above concepts in business optimization problems.


In optimization problems
we can apply the following steps: Example (to understand the steps):
In a business situation the objective of
1) Identify the objective function the business is to minimize the average
total cost (ATC). Therefore, in this case
2) Identify the choice or decision variable(s) the objective function would be the
average total cost (ATC) function. ATC
3) Differentiate the objective function is a function of 𝑄 (page 1).
with respect to the choice variables Here, 𝑄 is the choice variable, since the
business can choose the amount of 𝑄
4) Using first order condition(s) they want to produce. Differentiate with
find values of the choice variables respect to 𝑄.
5) Check whether maximum or minimum
E.g.𝐴𝑇𝐶 = 𝑓(𝑄) = 𝑄 2 − 10𝑄 + 60
𝑓′ = 2𝑄 − 10
2𝑄 − 10 = 0
→ 𝑄=5
𝑓 ′′ = 2 > 0 → ATC is minimized if
the business produces 5 units

You might also like