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

Page 1

MA1511

MA1511 Engineering Calculus


Chapter 1 Partial Derivatives

1.1 Functions of Several Variables


Functions of two or more variables arise in mathematics, physics, engineering sciences, economics
and many other disciplines. A simple example of such a function is the volume 𝑉 of a right circular
cylinder of height ℎ and base radius 𝑟, given by
𝑉 = 𝜋𝑟 2 ℎ.
It is customary to write functions of several variables in the usual functional notation 𝑓(𝑥, 𝑦, … ).
So we may write 𝑉 = 𝜋𝑟 2 ℎ = 𝑓(𝑟, ℎ) for the above example.

Function of 𝐓𝐰𝐨 variables


In this course, we shall mostly be dealing with functions of two variables. The domain of a function
𝑓(𝑥, 𝑦) of two variables is a set of points (𝑥, 𝑦) on the 𝑥𝑦 − plane. An commonly encountered
example of 𝐷 is a rectangle, an example of which is {(𝑥, 𝑦): 0 ≤ 𝑥 ≤ 2, 1 ≤ 𝑦 ≤ 2}.

Any point (𝑥, 𝑦) in the domain 𝐷 will be mapped to a point 𝑃(𝑥, 𝑦, 𝑓(𝑥, 𝑦)) in the three-dimensional
space, with 𝑧 = 𝑓(𝑥, 𝑦) the 𝑧-coordinate of the point 𝑃.
When all such points are plotted, we get the graph of the function f. We call this graph a surface.

Graph of 𝒛 = 𝒇(𝒙, 𝒚)
(a surface)

Dr NG Wee Seng
Page 2

MA1511

A familiar example of a surface is the graph of the linear function 𝑧 = 5 – 𝑥 − 𝑦 . In the vector form,
this equation can be written as 𝐫 • (𝐢 + 𝐣 + 𝐤) = 𝟓 where 𝐫 = 𝑥 𝐢 + 𝑦𝐣 + 𝑧𝐤,
showing that the graph is a plane perpendicular to the vector i + j + k.

Level Curves
Geometrically, for any constant 𝑘, the horizontal plane 𝑧 = 𝑘 intersects the surface 𝑧 = 𝑓(𝑥, 𝑦)
along a curve, called a contour curve of height 𝒌, whose equation is 𝑓(𝑥, 𝑦) = 𝑘.

The projection of the contour curve onto the 𝑥𝑦 − plane is a level curve of 𝑓. Hence, a level curve
consists of the set of points (𝑥, 𝑦) for which 𝑓(𝑥, 𝑦) has a constant value.

An example:

Dr NG Wee Seng
Page 3

MA1511

Remark
Functions of three or more variables, 𝑧 = 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) can be defined on some domain, 𝐷 of
points (𝑥1 , 𝑥2 , … , 𝑥𝑛 ) in a 𝑛 − dimensinal space . 𝑥1 , 𝑥2 , … , 𝑥𝑛 are the independent variables and z
is the dependent variable. The graph of 𝑓 is the set of points (𝑥1 , 𝑥2 , … , 𝑥𝑛 , 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) ) in a
(n+1) - dimensional space.

Video Example 1.1.1


Let 𝑓(𝑥, 𝑦) = 𝑦𝑥 2 (x > 0, y > 0)
Find an equation for a typical level curve of 𝑓, and plot it

Dr NG Wee Seng
Page 4

MA1511

1.2 First Order Partial Derivatives

Partial Derivatives of a Function of Two Variables

Consider a function 𝑓(𝑥, 𝑦) and a point (𝑎, 𝑏) in the domain of f.

Geometrical Meaning of Partial Derivatives with respect to 𝒙

The vertical plane whose equation is 𝑦 = 𝑏 intersects the surface 𝑧 = 𝑓(𝑥, 𝑦) along a curve on
this plane whose equation is 𝑧 = 𝑓(𝑥, 𝑏) (obtained by substituting 𝑦 = 𝑏 in = 𝑓(𝑥, 𝑦) ).

The gradient of the tangent line to this curve at the point 𝑃(𝑎, 𝑏, 𝑓(𝑎, 𝑏)) is called the partial
derivative of 𝒇 at (𝑎, 𝑏) with respect to 𝒙.

We denote this quantity by 𝑓𝑥 (𝑎, 𝑏). The subscript 𝑥 indicates that 𝑥 is the variable.

𝑓𝑥 (𝑎, 𝑏) gives the rate of change of 𝑓 at the point P (𝑎, 𝑏, 𝑓(𝑎, 𝑏)) in the direction of the 𝑥-axis.

Remark
We recall the mathematical definition of a derivative with respect to a single variable :
𝑓(𝑎 + ℎ, 𝑏) − 𝑓(𝑎, 𝑏)
𝑓𝑥 (𝑎, 𝑏) = lim
ℎ→0 ℎ

Dr NG Wee Seng
Page 5

MA1511

Geometrical Meaning of Partial Derivatives with respect to 𝒚

The vertical plane whose equation is 𝑥 = 𝑎 intersects the surface 𝑧 = 𝑓(𝑥, 𝑦) along a curve on
the plane whose equation is 𝑧 = 𝑓(𝑎, 𝑦) (obtained by substituting 𝑥 = 𝑎 in = 𝑓(𝑥, 𝑦) ).

The gradient of the tangent line to this curve at the point 𝑃(𝑎, 𝑏, 𝑓(𝑎, 𝑏)) is called the partial
derivative of 𝒇 at (𝑎, 𝑏) with respect to 𝒚.

We denote this quantity by 𝑓𝑦 (𝑎, 𝑏). The subscript 𝑦 indicates that 𝑦 is the variable.

𝑓𝑦 (𝑎, 𝑏) gives the rate of change of 𝑓 at the point where 𝑃 (𝑎, 𝑏, 𝑓(𝑎, 𝑏)) in the direction of the 𝑦-axis

Remark
We recall the mathematical definition of a derivative with respect to a single variable :
𝑓(𝑎, 𝑏 + ℎ) − 𝑓(𝑎, 𝑏)
𝑓𝑦 (𝑎, 𝑏) = lim
ℎ→0 ℎ

Notations
𝜕𝑓
The partial derivatives , 𝑓𝑥 (𝑎, 𝑏) and 𝑓𝑦 (𝑎, 𝑏) are also commonly denoted by 𝜕𝑥 (𝑎, 𝑏) and
𝜕𝑓
(𝑎, 𝑏) respectively. As a function of 𝑥 and 𝑦, with no reference to any specific point, the partial
𝜕𝑦
𝜕𝑓 𝜕𝑓
derivatives can be written as 𝑓𝑥 , , 𝑓𝑦 , .
𝜕𝑥 𝜕𝑦

𝜕𝑓 𝜕𝑓
The use of the symbol 𝜕 instead of 𝑑 in or indicates that the derivative is a partial
𝜕𝑥 𝜕𝑦
derivative of a function in more than one independent variable.

Dr NG Wee Seng
Page 6

MA1511

Method of finding Partial Derivatives


From the definition of partial derivatives, we know that
𝜕𝑓
• can be found by differentiating 𝑓(𝑥, 𝑦) with respect to 𝑥, treating 𝑦 as a constant
𝜕𝑥
𝜕𝑓
• can be found by differentiating 𝑓(𝑥, 𝑦) with respect to 𝑦, treating 𝑥 as a constant
𝜕𝑦

𝜕𝑓
For example, if 𝑓(𝑥, 𝑦) = 2𝑥 2 + 3𝑦 2 , then = 6𝑦 since the partial derivative of 3𝑦 2 with
𝜕𝑦
𝜕𝑓
respect to 𝑦 is 6𝑦 while the partial derivative of 2𝑥 2 with respect to y is zero. Similarly, = 4𝑥.
𝜕𝑥

Partial derivatives for functions of three or more variables can be defined and determined in a similar
fashion.
For example, if 𝑓(𝑥, 𝑦, 𝑧) = 2𝑥 + 𝑦 2 𝑧, then 𝑓𝑥 = 2, 𝑓𝑦 = 2𝑦𝑧 and 𝑓𝑧 = 𝑦 2 .

Since we are performing differentiation with respect to a single variable, the usual derivative formulae
and differentiation rules we have learnt from a single-variable Calculus course can be used.
For example, we shall need the following rules of differentiation for functions in one variable:

Rules of Differentiation

 ( fg )'  f ' g  g ' f (product rule)


'
 f  f ' g  g' f
   (quotient rule)
g g2
  f  g' f ' ( g )  g ' (chain rule) where (𝑓 o 𝑔)(𝑥) = 𝑓(𝑔(𝑥))

The following example illustrates the use of some of the above rules.
Video Example 1.2.1
Find the first order partial derivatives of
(a) 𝑓(𝑥, 𝑦) = 𝑥 3 + 𝑐𝑜𝑠𝑦
(b) 𝑔(𝑥, 𝑦) = 𝑥 3 𝑐𝑜𝑠𝑦
(c) ℎ(𝑥, 𝑦) = 2𝑦 3 cos(𝑥𝑦)

Answers: (a) 𝑓𝑥 = 3𝑥 2 , 𝑓𝑦 = −𝑠𝑖𝑛𝑦 (𝑏)𝑔𝑥 = 3𝑥 2 𝑐𝑜𝑠𝑦 , 𝑔𝑦 = −𝑥 3 𝑠𝑖𝑛𝑦


(c) ℎ𝑥 = −2𝑦 4 sin(𝑥𝑦) , ℎ𝑦 = 6𝑦 2 cos(𝑥𝑦) − 2𝑥𝑦 3 sin(𝑥 𝑦)

Dr NG Wee Seng
Page 7

MA1511

1.3 Higher Order Partial Derivatives


Given a function 𝑓(𝑥, 𝑦), 𝑓𝑥 (𝑥, 𝑦) and 𝑓𝑦 (𝑥, 𝑦) are both functions of 𝑥 and 𝑦.

Differentiation of these functions produces the so-called second order partial derivatives of f
Notations we use are:
𝜕2 𝑓 𝜕 𝜕𝑓 𝜕𝑓
or 𝑓𝑥𝑥 denotes ( ) the partial derivative of w.r.t. 𝑥
𝜕𝑥 2 𝜕𝑥 𝜕𝑥 𝜕𝑥

𝜕2 𝑓 𝜕 𝜕𝑓 𝜕𝑓
or 𝑓𝑥𝑦 denotes ( ) the partial derivative of w.r.t. 𝑦
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑥

𝜕2 𝑓 𝜕 𝜕𝑓 𝜕𝑓
or 𝑓𝑦𝑥 denotes ( ) the partial derivative of w.r.t. 𝑥
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑦

𝜕2 𝑓 𝜕 𝜕𝑓 𝜕𝑓
or 𝑓𝑦𝑦 denotes ( ) the partial derivative of w.r.t. 𝑦
𝜕𝑦 2 𝜕𝑦 𝜕𝑦 𝜕𝑦

Second order partial derivatives will be required in subsequent topics such as the calculation of
extreme values (maxima or minima) of functions (in Chapters 1.7 & 1.8).

Video Example 1.3.1


Find the first and second order partial derivatives of
𝑓(𝑥, 𝑦) = 𝑐𝑜𝑠(2𝑥 + 𝑦 2 )
2
Answers: 𝑓𝑥 = −2𝑠𝑖𝑛(2𝑥 + 𝑦2 ) , 𝑓𝑦 = −2𝑦𝑠𝑖𝑛(2𝑥 + 𝑦2 ), 𝑓𝑦𝑥 = 𝑓𝑥𝑦 = −4𝑦 𝑐𝑜𝑠(2𝑥 + 𝑦 ),
𝑓𝑦𝑦 − 2 𝑠𝑖𝑛(2𝑥 + 𝑦 2 ) − 4𝑦 2 𝑐𝑜𝑠(2𝑥 + 𝑦 2 ) ; 𝑓𝑥𝑥 = −4𝑐𝑜𝑠(2𝑥 + 𝑦 2 )

Dr NG Wee Seng
Page 8

MA1511

In the preceding example, the second order partial derivatives 𝑓𝑥𝑦 and 𝑓𝑦𝑥 are identical. It turns
out that this result holds for most commonly encountered function such as polynomials, exponential
and trigonometric functions.

Result 1.3A (The Mixed Derivative Theorem)


Under certain conditions (see remark 1 below) on the function 𝑓, the following holds
𝑓𝑥𝑦 = 𝑓𝑦𝑥

Remarks
1. We shall assume that the above result holds for all functions we consider in this course.

2. Repeated differentiation of second order partial derivatives will produce partial derivatives of
order 3 and above. For example,
𝜕3 𝑓 𝜕 𝜕2 𝑓 𝜕2 𝑓
or 𝑓𝑥𝑦𝑦 denotes ( ) , the partial derivative of w.r.t. 𝑦
𝜕𝑦𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑦𝜕𝑥 𝜕𝑦𝜕𝑥

3. Higher order derivatives for functions of three or more variables can be defined in similar fashion.
For example, 𝑓(𝑥, 𝑦, 𝑧) = 2𝑥 + 𝑦 2 𝑧, then 𝑓𝑥 = 2, 𝑓𝑦 = 2𝑦𝑧 and 𝑓𝑧 = 𝑦 2 , so
𝜕 2𝑓 𝜕 𝜕𝑓 𝜕
or 𝑓𝑦𝑧 = ( )= ( 2𝑧𝑦) = 2𝑦
𝜕𝑧𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧

and so on.

Dr NG Wee Seng
Page 9

MA1511

1.4 Normal Lines and Tangent Planes

𝑓𝑥 (𝑎, 𝑏)
Let 𝑃(𝑎, 𝑏, 𝑓(𝑎, 𝑏)) be a point on the surface 𝑧 = 𝑓(𝑥, 𝑦). It can be shown1 that the vector (𝑓𝑦 (𝑎, 𝑏))
−1
is a normal to the tangent plane at 𝑃. Hence, the vector equations of the tangent plane and normal line
at 𝑃 can be determined.
3
For example, if P has coordinates (1, 2, 3) and a normal vector at P is found to be the vector ( 2 ),
−1
then a vector equation of the tangent plane is
3 1 3
𝐫  ( 2 ) = (2 )  ( 2 )
−1 3 −1
𝑥
where 𝐫 = (𝑦) is the position vector of any point on the plane, and a vector equation for the
𝑧
normal line through P is

1 3
𝐫 = (2) + ( 2 ) 𝑡, 𝑡 ∈ 𝐑
3 −1
𝑥
where 𝐫 = (𝑦) is the position vector of any point on the normal line.
𝑧

1
Refer to the proof in LUMINUS > Files > Supplementary Slides folder
Dr NG Wee Seng
Page 10

MA1511

In general, we have the following results.


Result 1.4A
A vector equation of the tangent plane at 𝑃 is

𝑓𝑥 (𝑎, 𝑏) 𝑎 𝑓𝑥 (𝑎, 𝑏)
𝐫  (𝑓𝑦 (𝑎, 𝑏)) = ( 𝑏 ) • (𝑓𝑦 (𝑎, 𝑏))
−1 𝑓(𝑎, 𝑏) −1
𝑥
where 𝐫 = (𝑦).
𝑧
Equivalently, a Cartesian equation of the plane is
𝑧 = 𝑓𝑥 (𝑎, 𝑏) ∙ (𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝑏) ∙ (𝑦 − 𝑏) + 𝑓(𝑎, 𝑏)

Result 1.4B
The equation of the normal line at 𝑃 (which is the line passing through P and perpendicular to the
tangent plane ) is

𝑎 𝑓𝑥 (𝑎, 𝑏)
𝐫 = ( 𝑏 ) + (𝑓𝑦 (𝑎, 𝑏)) 𝑡, 𝑡 ∈ 𝐑
𝑓(𝑎, 𝑏) −1

Video Example 1.4.1


Find an equation of (i) the tangent plane and (ii) the normal line to the surface
𝑧 = 32 − 3𝑥 2 − 4𝑦 2
at the point where 𝑥 = 2 and 𝑦 = 1.

𝑥 2 −12
Answers: tangent plane : 𝑧 = −12𝑥 − 8𝑦 + 48; Normal line : (𝑦) = ( 1 ) + ( −8 ) 𝑡 , 𝑡∈𝑹
𝑧 16 −1

Dr NG Wee Seng
Page 11

MA1511

1.5 Chain Rule


For a function of a single variable 𝑦 = 𝑓(𝑥) where x is in turn a function of a third independent
variable, we recall the chain rule:
𝑑𝑦 𝑑𝑦 𝑑𝑥
= ∙
𝑑𝑡 𝑑𝑥 𝑑𝑡
The multivariable counterparts of the above results are presented below.
Chain Rule with One Independent Variable
Result 1.5A
If 𝑧 is a function of 𝑥 and 𝑦, and both 𝑥 and 𝑦 are functions of an independent variable 𝑡,
then
𝑑𝑧 𝜕𝑧 𝑑𝑥 𝜕𝑧 𝑑𝑦
= × + ×
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡

One way to remember result 1.5A is to draw the following tree diagram :

Video Example 1.5.1

Given that 𝑧 = 3𝑥 2 + 𝑦 2 , 𝑥 = 𝑡 3 −𝑒 𝑡 and 𝑦 = 𝑒 𝑡 + 𝑡 , use the chain rule to find the value of
𝑑𝑧
when 𝑡 = 0
𝑑𝑡

Answer: 10

Dr NG Wee Seng
Page 12

MA1511

One typical application of the above rule is the calculation of rate of change of a function in two
variables.
For example, if we know that the length 𝑥 and breadth 𝑦 of a rectangle are both increasing at 2 cm s-1,
we can easily find the rate of change of the area, 𝑧 = 𝑥𝑦 of the rectangle for any (𝑥, 𝑦), say 𝑥 = 2
cm and 𝑦 = 3 cm, by using the chain rule:

𝑑𝑧 𝜕𝑧 𝑑𝑥 𝜕𝑧 𝑑𝑦
= × + × = 2𝑦 + 2𝑥 = 10 cm2 s-1
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡

Dr NG Wee Seng
Page 13

MA1511

We can extend the chain rule on 𝑓(𝑥, 𝑦) by allowing x and y to depend on more than one independent
variable.
Chain Rule with Two Independent Variables
Result 1.5B
If 𝑧 is a function of 𝑥 and 𝑦, and both 𝑥 and 𝑦 are functions of two independent variables
s , 𝑡, then
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
= × + ×
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠

𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
= × + ×
𝜕𝑡 𝜕𝑥 𝜕𝑡 𝜕𝑦 𝜕𝑡

One way to remember result 1.5B is to draw the following tree diagrams:

𝝏𝒛 𝝏𝒛
𝒅𝒔 𝒅𝒕

Video Example 1.5.2


𝜕𝑤 𝜕𝑤
Given that 𝑤 = 2𝑢𝑣, 𝑢 = 2𝑠 − 3𝑡 and 𝑣 = 𝑠𝑡, use the chain rule to find and in
𝜕𝑠 𝜕𝑡
terms of 𝑠 and 𝑡.

2 2
Answer: 8𝑠𝑡 − 6𝑡 ; 4𝑠 − 12𝑠𝑡

Dr NG Wee Seng
Page 14

MA1511

1.6 Directional Derivatives


For a given function 𝑓(𝑥, 𝑦), we now generalise the notion of partial derivative (where only one of the
variables is changing) to the case when both 𝑥 and 𝑦 are changing. We consider only the special case
when 𝑥 and 𝑦 are changing linearly, giving rise to the concept of directional derivative.

Directional Derivative

Given a surface 𝑧 = 𝑓(𝑥, 𝑦), a point 𝑃(𝑎, 𝑏, 𝑓(𝑎, 𝑏)) on the surface and a direction unit vector u =
𝑢1 i + 𝑢2 j , the vertical plane containing P and parallel to u intersects the surface along a curve . The
gradient of the tangent to this curve at 𝑃 is called the directional derivative of 𝑓(𝑥, 𝑦) at (𝑎, 𝑏) in
the direction of u. We denote this derivative by 𝐷𝐮 𝑓(𝑎, 𝑏).

We can interpret 𝐷𝐮 𝑓(𝑎, 𝑏) as the rate of change of the function 𝑓(𝑥, 𝑦) when (𝑥, 𝑦) lies on the line
passing through 𝑄(𝑎, 𝑏) and in the direction of the vector u.

tangent at P

Remark
For any unit vector u = 𝑢1 i + 𝑢2 j , the mathematical definition of derivative gives

f (a  hu1 , b  hu 2 )  f (a, b)
𝐷𝐮 𝑓(𝑎, 𝑏) = lim
h 0 h

Dr NG Wee Seng
Page 15

MA1511

The following result2 provides us with an efficient way to compute directional derivatives.
Result 1.6A
For any unit vector u = 𝑢1 i + 𝑢2 j ,
𝑓𝑥 (𝑎, 𝑏) 𝑢1
𝐷𝐮 𝑓(𝑎, 𝑏) = 𝑢1 𝑓𝑥 (𝑎, 𝑏) + 𝑢2 𝑓𝑦 (𝑎, 𝑏) = ( )  (𝑢 )
𝑓𝑦 (𝑎, 𝑏) 2

Remarks
1. If the given direction vector 𝑢1 i + 𝑢2 j is not a unit vector, we can normalise the vector to
get a unit vector:
1
u= (𝑢1 i + 𝑢2 j )
2
√𝑢1 +𝑢2 2

2. The gradient vector of 𝑓 , denoted by ∇𝑓, is the vector


𝑓𝑥
𝑓𝑥 𝐢 + 𝑓𝑦 𝐣 (= ( ))
𝑓𝑦

With this notation, we can write

𝐷𝐮 𝑓(𝑎, 𝑏) = ∇𝑓(𝑎, 𝑏)  𝐮

3. The first order partial derivatives of 𝑓 are special cases of directional derivatives. Specifically,

𝑓𝑥 = 𝐷𝐮 f when 𝐮 = 𝐢 (along the 𝑥 −axis)

𝑓𝑦 = 𝐷𝐮 f when 𝐮 = 𝐣 (along the 𝑦 −axis)

4. Directional derivatives for functions of three or more variables can be defined in a similar
fashion.

In particular, the directional derivative of a function 𝑓(𝑥, 𝑦, 𝑧) at the point 𝑥 = 𝑎, 𝑦 =


𝑏 , 𝑧 = 𝑐, in the direction of the unit vector u = 𝑢1 i + 𝑢2 j +𝑢3 𝐤 is given by

𝑓𝑥 (𝑎, 𝑏, 𝑐) 𝑢1
𝐷𝐮 𝑓(𝑎, 𝑏, 𝑐) = 𝑢1 𝑓𝑥 (𝑎, 𝑏, 𝑐) + 𝑢2 𝑓𝑦 (𝑎, 𝑏, 𝑐) + 𝑢3 𝑓𝑧 (𝑎, 𝑏, 𝑐) 𝑓
= (𝑦 (𝑎, 𝑏, 𝑐) 𝑢
)  ( 2)
𝑓𝑧 (𝑎, 𝑏, 𝑐) 𝑢3

2
Refer to the proof in LUMINUS > Files > Supplementary Slides folder
Dr NG Wee Seng
Page 16

MA1511

Video Example 1.6.1


Let 𝑓(𝑥, 𝑦) = 𝑥𝑒 𝑦−1 + 𝑦 2 .
(i) Find the directional derivative of 𝑓 at the point (𝑥, 𝑦) = (2, 1), in the direction of 3i – 4j
(ii) Find a unit vector w such that the directional derivative 𝐷𝐰 𝑓(2,1) is zero.

−4 4
13
Answers (i) − (ii) (√17 √17
1 ) , ( −1 )
5
√17 √17

Dr NG Wee Seng
Page 17

MA1511

1.7 Local Extrema


Let 𝑓(𝑥, 𝑦) be defined on a region 𝐷 containing the point (𝑎, 𝑏). We are interested in locating extreme
values (maxima and minima) of 𝑓 such as those shown in the diagram below. These are extreme
values of the functions over a sub-domain containing the maximum or minimum point. They are not
necessarily the highest or lowest value of the function over the entire domain. We thus call these
extreme values local maxima / local minima.

Local Maximum

𝑓 has a local maximum at (𝑎, 𝑏) if 𝑓(𝑎, 𝑏) ≥ 𝑓(𝑥, 𝑦) for all (𝑥, 𝑦) in some open subset of 𝐷
containing (𝑎, 𝑏)

Local Minimum

𝑓 has a local minimum at (𝑎, 𝑏) if 𝑓(𝑎, 𝑏) ≤ 𝑓(𝑥, 𝑦) for all (𝑥, 𝑦) in some open subset of 𝐷
containing (𝑎, 𝑏)

We recall from single−variable calculus that if a differentiable function 𝑓(𝑥) in one variable has a
local maximum/minimum at 𝑥 = 𝑐, then 𝑓 ′ (𝑐) = 0. An analogous result holds for functions in two
variables.

Result 1.7A
If 𝑓 has a local maximum/minimum at an interior point (𝑎, 𝑏) of its domain, then
𝑓𝑥 (𝑎, 𝑏) = 0 and 𝑓𝑦 (𝑎, 𝑏) = 0

Critical Point

𝑓 (𝑥, 𝑦) has a critical point at (a, b) if


𝑓𝑥 (𝑎, 𝑏) = 0 and 𝑓𝑦 (𝑎, 𝑏) = 0
Dr NG Wee Seng
Page 18

MA1511

Result 1.7A says that a local maximum or a local minimum occurs only at a critical point. Hence, to
locate local maximum or local minimum of 𝑓(𝑥, 𝑦), we will solve the simultaneous equations
𝑓𝑥 = 0 and 𝑓𝑦 = 0

for all possible critical points. The nature (local maximum or local minimum, or neither) can be
determined using the following derivative test

Result 1.7B (Derivative Test for Nature of Critical Points)

Let (𝑎, 𝑏) be a critical point of f, that is

𝑓𝑥 (𝑎, 𝑏) = 0 and 𝑓𝑦 (𝑎, 𝑏) = 0 .


2
Let 𝐷 = 𝑓𝑥𝑥 (𝑎, 𝑏)𝑓𝑦𝑦 (𝑎, 𝑏) − (𝑓𝑥𝑦 (𝑎, 𝑏)) .

 𝑓 has a local maximum at (𝑎, 𝑏) if 𝐷 > 0 and 𝑓𝑥𝑥 (𝑎, 𝑏) < 0 .


 𝑓 has a local minimum at (𝑎, 𝑏) if 𝐷 > 0 and 𝑓𝑥𝑥 (𝑎, 𝑏) > 0 .
 𝑓 has neither a local maximum nor a local minimum point at (𝑎, 𝑏) if 𝐷 < 0.
(In this case, (𝑎, 𝑏) is known as a saddle point)

Remarks
2
1. The term 𝐷 = 𝑓𝑥𝑥 (𝑎, 𝑏)𝑓𝑦𝑦 (𝑎, 𝑏) − (𝑓𝑥𝑦 (𝑎, 𝑏)) is known as a discriminant

2. The above test is inconclusive if 𝐷 = 0.


3. The proof of the above result which requires the use of advanced calculus techniques (such as two-
variable Taylor series), is beyond the scope of this course.

Dr NG Wee Seng
Page 19

MA1511

Video Example 1.7.1


Locate, if any, the local extrema and saddle points of
𝑓(𝑥, 𝑦) = 𝑦 2 + 3𝑥 2 − 2𝑥𝑦 − 8𝑦 + 7.
Answers : local minimum value at (2, 6)

Dr NG Wee Seng
Page 20

MA1511

Video Example 1.7.2


Locate and determine the nature of the critical points of
𝑔(𝑥, 𝑦) = 3𝑥 − 3𝑥𝑦 2 − 𝑥 3
Answers: saddle points at (0,1) , (0, -1); local max at (1, 0), local min at (-1, 0)

Dr NG Wee Seng
Page 21

MA1511

1.8 Lagrange Multipliers


Method of Lagrange Multipliers

Given a function 𝑓(𝑥, 𝑦), we seek the extreme values of 𝑓 when (𝑥, 𝑦) is subject to one constraint
given by an equation of the form

𝑔(𝑥, 𝑦) = 0
Geometrically, we find the maximum/minimum values of 𝑓(𝑥, 𝑦) for points (𝑥, 𝑦) lying on the curve
whose equation is 𝑔(𝑥, 𝑦) = 0.

To find largest/smallest
value of f along this curve

A practical example of optimizing a function 𝑓(𝑥, 𝑦) subject to a constraint is the problem of


maximizing the area of a rectangle of dimensions 𝑥 cm by 𝑦 cm with a fixed perimeter, 𝑃 cm.
Specifically, we are maximizing 𝑓(𝑥, 𝑦) = 𝑥𝑦 when 2𝑥 + 2𝑦 = 𝑃 (a 𝐜𝐨𝐧𝐬𝐭𝐫𝐚𝐢𝐧𝐭).
𝑃
For this particular example, one can write 𝑦 = 2 − 𝑥 and express the area of the rectangle as
𝑃
( 2 − 𝑥 ) 𝑥 , a function of one variable, 𝑥 . We can then apply the usual single-variable calculus
technique.
In practice, however, it can be difficult or even impossible to express the function 𝑓 in terms of a
single variable only. This occurs when the constraint equation is complicated (e.g. 𝑥 3 + 𝑥𝑦 + 𝑦 3 =
100). The following method of Lagrange multipliers is an alternative approach to solving
constrained optimization problems.

Result 1.8A

The maximum/minimum value of 𝑓(𝑥, 𝑦) subject to the constraint 𝑔(𝑥, 𝑦) = 0 occurs at a


point (𝑥, 𝑦) that satisfies the following three equations
𝑓𝑥 = λ𝑔𝑥
𝑓𝑦 = λ𝑔𝑦
𝑔(𝑥, 𝑦) = 0
for some constant λ , called a Lagrange multiplier.

Dr NG Wee Seng
Page 22

MA1511

Remarks
Geometrically, the equations
𝑓𝑥 = λ𝑔𝑥 , 𝑓𝑦 = λ𝑔𝑦 ,

which can be expressed in vector form


𝑓𝑥 𝑔𝑥
( ) = λ (𝑔 )
𝑓𝑦 𝑦

indicate that the maximum or minimum occurs at a point where the gradient vector of 𝑓 is parallel to
the gradient vector of 𝑔, as depicted in the diagram below.

Dr NG Wee Seng
Page 23

MA1511

Video Example 1.8.1


Use the method of Lagrange multipliers to find the maximum and minimum values of
𝑓(𝑥, 𝑦) = 𝑥𝑦
where (𝑥, 𝑦) lies on the circle
𝑥 2 + 𝑦 2 = 2.
Answer: minimum value of -1 occurring at (-1, 1) and (1, -1) ; maximum value of 1 occurring at
(1,1) and (-1,-1)

Dr NG Wee Seng
Page 24

MA1511

Result 1.8A can be generalized to functions of three or more variables :


Result 1.8B

The maximum/minimum value of 𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) subject to the constraint 𝑔(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 0


occurs at a point (𝑥1 , 𝑥2 , … , 𝑥𝑛 ) that satisfies the following (𝑛 + 1) equations

𝑓𝑥𝑖 = λ𝑔𝑥𝑖 𝑖 = 1,2,3, … , 𝑛

𝑔(𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 0
for some constant λ , called the Lagrange multiplier

Video Example 1.8.2


Use the method of Lagrange multipliers to find the least distance between the origin and the plane
𝑥 − 2𝑦 − 2𝑧 = 3
1 2
Answer: 1 (occurring at 𝑥 = 3 , 𝑦 = 𝑧 = − 3 )

End of Chapter 1

“Mathematics is the art of giving the same name to different things.” – Henri Poincaré

Dr NG Wee Seng

You might also like