0% found this document useful (0 votes)
12 views93 pages

Differetial Calculus PDF

This document discusses key concepts in differential calculus of functions of two variables, including: 1. It defines functions of two variables and discusses their domains, ranges, and level sets. 2. It introduces limits of functions of two variables using δ-neighborhoods and explores properties like uniqueness, sum/difference/product/quotient rules, and examples of limits that do and do not exist. 3. The syllabus covers topics like partial derivatives, tangent planes, Jacobians, Taylor's theorem, extrema of functions, and Lagrange multipliers for optimization.

Uploaded by

Siddharth Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views93 pages

Differetial Calculus PDF

This document discusses key concepts in differential calculus of functions of two variables, including: 1. It defines functions of two variables and discusses their domains, ranges, and level sets. 2. It introduces limits of functions of two variables using δ-neighborhoods and explores properties like uniqueness, sum/difference/product/quotient rules, and examples of limits that do and do not exist. 3. The syllabus covers topics like partial derivatives, tangent planes, Jacobians, Taylor's theorem, extrema of functions, and Lagrange multipliers for optimization.

Uploaded by

Siddharth Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 93

Differential Calculus

Chaman Kumar

Indian Institute of Technology Roorkee

2020-21

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 1 / 93


Syllabus

Limit, Continuity and differentiability of functions of two variables


Euler’s theorem for homogeneous equations
Tangent plane and normal
Change of variables
chain rule
Jacobians
Taylor’s Theorem for two variables
Error approximations
Extrema of functions of two or more variables
Lagrange’s method of undetermined multipliers

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 2 / 93


Functions of Two Variables

Definition. A function f of two variables is a rule of correspondence that assigns to each


ordered pair (x, y ) of real numbers in a subset of R2 , one and only one number z in R.
We usually write z = f (x, y ) read as ”f of (x,y)”.
Let f : D ⊆ R2 → R be a function of two variables. The set D of the points (x, y )
for which f (x, y ) is defined, is called the domain of the function and collection of corre-
sponding values of z = f (x, y ) is called the range of the function.
p
z = f (x, y ) = 1 − x 2 − y 2 : domain is D = {(x, y ) : x 2 + y 2 ≤ 1} and range is
[0, 1]
z = f (x, y ) = 1/(x 2 − y 2 ) : domain is D = {(x, y ) : y 6= ±x} and range is R − {0}
z = log(x + y ) : domain is D = {(x, y ) : x + y > 0} and range is R
The variable x and y are called the independent variables and z is called the dependent
variable.
The locus of the points (x, y , z) satisfying z = f (x, y ) is called a surface. For example,
z = x 2 + y 2 , (x, y ) ∈ R2 is the paraboloid of revolution.
Similarly, we can define a function of three variables. For example, f (x, y , z) = xyz +
xy sin z.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 3 / 93


Limits

Let (x0 , y0 ) be a point in R2 .


Definition (δ-neighbourhood). The δ-neighbourhood of (x0 , y0 ) is defined as
p
Nδ (x0 , y0 ) := {(x, y ) : (x − x0 )2 + (y − y0 )2 < δ}.
It can also be defined as
Nδ (x0 , y0 ) := {(x, y ) : |x − x0 | < δ and |y − y0 | < δ}
= {(x, y ) : max(|x − x0 |, |y − y0 |) < δ}
or Nδ (x0 , y0 ) := {(x, y ) : |x − x0 | + |y − y0 | < δ}
Notice that (x0 , y0 ) ∈ Nδ (x0 , y0 ) in all the above definitions.

Definition (deleted δ-neighbourhood). If (x0 , y0 ) does not lie inside Nδ (x0 , y0 ), then it
is called the deleted δ-neighbourhood of the point (x0 , y0 ).
For example, Nδ (x0 , y0 ) − {(x0 , y0 )} is a deleted neighbourhood of (x0 , y0 ), i.e.,
p
{(x, y ) : 0 < (x − x0 )2 + (y − y0 )2 < δ},
{(x, y ) : 0 < |x − x0 | < δ and 0 < |y − y0 | < δ}={(x, y ) : 0 < max(|x − x0 |, |y − y0 |) < δ},
{(x, y ) : 0 < |x − x0 | + |y − y0 | < δ}
respectively.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 4 / 93
Limits

Exercise. Plot all the δ-neighbourhood and deleted δ-neighbourhoods defined above.

Definition (Limit). A real-valued function f (x, y ) is said to approach the limit L as


(x, y ) approaches (x0 , y0 ) if for every
pnumber  > 0, there exists a number δ > 0 such
that |f (x, y ) − L| <  whenever 0 < (x − x0 )2 + (y − y0 )2 < δ. In short hand notation,
we write,

lim f (x, y ) = L.
(x,y )→(x0 ,y0 )

The definition of limit applies to the interior points as well as the boundary points.
However, point (x, y ) always remain in the domain of the function f .
For the existence of limit, function f may or may not be defined at (x0 , y0 ).
In two-dimensional plane, (x, y ) → (x0 , y0 ) means that the point (x0 , y0 ) is ap-
proached from all possible directions i.e. there are infinite number of paths to
approach the point (x0 , y0 ). Due to the uniqueness of the limit, we approach the
same value L from all directions (paths). If the limit depends on a particular direction
(path), then we can say that the limit does not exist.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 5 / 93


Limits

Theorem. The limit of a function, if exits, is unique.


Proof. Let L1 and L2 be two limits i.e. lim(x,y )→(x0 ,y0 ) f (x, y ) = L1 and lim(x,y )→(x0 ,y0 ) f (x, y ) =
L2 . In other words, for every  > 0, there exist δ1 , δ2 > 0 such that
p
|f (x, y ) − L1 | < /2 whenever 0 < (x − x0 )2 + (y − y0 )2 < δ1
p
|f (x, y ) − L2 | < /2 whenever 0 < (x − x0 )2 + (y − y0 )2 < δ2 .

Then, using triangle inequality, one obtains

|L1 − L2 | ≤ |f (x, y ) − L1 | + |f (x, y ) − L2 | < /2 + /2 = 


p
whenever 0 < (x − x0 )2 + (y − y0 )2 < δ where δ = min(δ1 , δ2 ). Hence, L1 = L2 . 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 6 / 93


Limits

The limit can also be defined in polar coordinates. For this, let x −x0 = r cos θ and y −y0 =
r sin θ which means (x − x0 )2 + (y − y0 )2 = r 2 and θ = tan−1 ((y − y0 )/(x − x0 )). Then,
the following definition follows from the above definition. Also, lim(x,y )→(x0 ,y0 ) f (x, y ) =
limr →0 F (r , θ).

Definition. A real-valued function f is said to approach to the limit L if for every  > 0,
there exists a δ > 0 such that |f (r cos θ, r sin θ)−L| <  whenever r < δ, independent of θ.

The definition of limit can be generalized to functions of n variables.

Definition. Let f : D ⊆ Rn → R be a function of n variables. Let (x10 , . . . , xn0 ) ∈ D.


Then, the function f is said to approach to the limit L as (x1 , . . . , xn ) approaches to
(x10 , . . . , xn0 ) ifpfor every  > 0, there exists a δ > 0 such that |f (x1 . . . , xn ) − L| < 
whenever 0 < (x1 − x10 )2 + . . . + (xn − xn0 )2 < δ. In the short hand notation, we write,

lim f (x1 , . . . , xn ) = L.
(x1 ,...,xn )→(x10 ,...xn0 )

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 7 / 93


Limits

Theorem. Let f : D ⊆ R2 → R and g : D ⊆ R2 → R be two functions and

lim f (x, y ) = L1 and lim g (x, y ) = L2 .


(x,y )→(x0 ,y0 ) (x,y )→(x0 ,y0 )

Then, the following holds,

(a) lim cf (x, y ) = cL1 , for any constant c. (constant multiple rule)
(x,y )→(x0 ,y0 )

(b) lim [f (x, y ) ± g (x, y )] = L1 ± L2 . (sum and difference rule)


(x,y )→(x0 ,y0 )

(c) lim f (x, y )g (x, y ) = L1 L2 . (product rule)


(x,y )→(x0 ,y0 )

(d) lim f (x, y )/g (x, y ) = L1 /L2 when L2 6= 0. (quotient rule)


(x,y )→(x0 ,y0 )

Proof. Not required. 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 8 / 93


Limits

Example. Using δ −  approach, show that


xy
lim p = 0.
(x,y )→(0,0) x + y2
2

Solution. Notice that the function f is not defined at (0, 0). If (x, y ) → (0, 0) along
y = x, then f (x, y ) → 0. By using the well-known inequality |xy | ≤ (x 2 + y 2 )/2,
we have
xy x2 + y2 p
− 0 ≤ p = x 2 + y 2 /2 < 

p
x2 + y2 2 x2 + y2
p
=⇒ |f (x, y ) − 0| <  when 0 < x 2 + y 2 < 2.
Thus, we can choose a 0 < δ < 2 such that
p
0 < x 2 + y 2 < δ =⇒ |f (x, y ) − 0| < .
Hence, the limit of the given function f at (0, 0) exists and is equal to 0. 
This example illustrates that the limit of a function may exist at a point even if
the function is not defined at that point.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 9 / 93
Limits

Example. Using δ −  approach, show that

lim (3x + 4y ) = 10.


(x,y )→(2,1)

Solution. Notice that the function f (x, y ) = 3x + 4y is defined at (2, 1) and its
value is equal to 10 which is also the value of the limit. Consider

|3x + 4y − 10| ≤ |3(x − 2) + 4(y − 1)| ≤ 3|x − 2| + 4|y − 1|

Take |x − 2| < δ and |y − 1| < δ, then |3x + 4y − 10| < 7δ <  which is satisfied
if δ < /7.
This example illustrates that we can take neighbourhood Nδ (2, 1) = {(x, y ) :
|x − 2| < δ and |y − 1| < δ} instead of the conventional neighbourhood Nδ (2, 1) =
p
(x − 2)2 + (y − 1)2 . 
This example also illustrates that both the function and its limit at the point (2, 1)
are well-defined.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 10 / 93


Limits
Example. Show that the following limits do not exist.

xy x+ y
(a) lim . (b) lim . (c) lim tan−1 (y /x).
(x,y )→(0,0) x 2 + y 2 (x,y )→(0,0) x 2 + y (x,y )→(0,1)

Solution. (a) Take y = mx. As (x, y ) → (0, 0) along y = mx, then x → 0. Thus,
xy mx 2 m
lim 2 2
= lim 2 2
=
(x,y )→(0,0) x + y x→0 (1 + m )x 1 + m2
which depends on m and is different for different value of m. This means that the
limit is path dependent. Hence, the limit does not exist.
Alternatively, take x = r cos θ, x = r sin θ, then
xy r 2 sin θ cos θ
lim = lim = sin θ cos θ
(x,y )→(0,0) x 2 +y 2 r →0 r2
which depends on θ. This means that the limit depends on different radial paths
θ = c where c is a constant. Thus, the limit does not exist.
(b) Take y = mx 2 . As (x, y ) → 0, x → 0. The limit does not exist because
√ √
x+ y 1+ m
lim = lim = ±∞.
(x,y )→(0,0) x 2 + y x→0 (1 + m)x
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 11 / 93
Limits

(c) Take y = 1, then

lim tan−1 (y /x) = lim tan−1 (1/x) = tan−1 (±∞) = ±π/2.


(x,y )→(0,1) x→0

This means that the limit is π/2 if we approach to (0, 1) from right on the line
y = 1 and it is equal to −π/2 if we approach from left. 
Remark. If it is difficult to get the limit using the rectangular coordinates, the
polar coordinates may be useful. But the conversion to the polar coordinates should
be done with caution. We illustrate this with some examples. Consider,
x3 r 3 cos 3 θ
lim = lim = lim r cos3 θ = 0
(x,y )→(0,0) x 2 +y 2 r →0 r2 r →0

which indicates that the limit may be 0 and this can be verified with −δ approach,
x3

= |r cos3 θ| = r | cos3 θ| ≤ r < 


x2 + y2 − 0

whenever r < δ for any 0 < δ < . Thus, the limit in this case is 0.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 12 / 93
Limits

Let us now consider,


2x 2 y r cos θ sin 2θ
lim = lim 2 =0 (?)
(x,y )→(0,0) x 4 + y 2 r →0 r cos4 θ + sin2 θ

for every fixed value of θ. This indicates that the limit is 0, but this is not true.
Indeed, along the path y = mx 2 ,
2x 2 y 2mx 4 2m
lim = lim 4 =
(x,y )→(0,0) x 4 +y 2 2
x→0 x (1 + m ) 1 + m2
which is path dependent and thus the limit does not exist.

Home Assignment. p
Find a δ such that x 2 + y 2 < δ implies that |f (x, y )−f (0, 0)| <  in the following
cases:
y
(i) f (x, y ) = x 2 +1 ,  = 0.05.
x+y
(ii) f (x, y ) = 2+cos x ,  = 0.02.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 13 / 93
Continuity

Definition. A real-valued function f (x, y ) is said to be continuous at a point


(x0 , y0 ) if the following conditions are satisfied,
(a) f (x, y ) is defined at (x0 , y0 )
(b) lim(x,y )→(x0 ,y0 ) f (x, y ) exists, and
(c) lim(x,y )→(x0 ,y0 ) f (x, y ) = f (x0 , y0 ).
In other words, a real-valued function f (x, y ) is said to be continuous at a point
for every  > 0, there exists a δ > 0 such that |f (x, y ) − f (x0 , y0 )| < 
(x0 , y0 ) if p
whenever (x − x0 )2 + (y − y0 )2 < δ.

If any one of the above conditions does not hold, then the function is said to
be discontinuous at (x0 , y0 ). If lim(x,y )→(x0 ,y0 ) f (x, y ) = L 6= f (x0 , y0 ), then the
point (x0 , y0 ) is called a point of removable discontinuity. This type of discon-
tinuity can be removed by defining f (x0 , y0 ) = L.

If the function f (x, y ) is continuous at every point in the domain D of f , then


it is said to be a continuous function in D.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 14 / 93
Continuity

f (x, y ) moves between L +  and


L −  when (x, y ) moves in the
open disc (x−x0 )2 +(y −y0 )2 < δ 2 .

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 15 / 93


Continuity

A continuous function attains its maximum M and minimum m at some point


in a closed and bounded domain D.
For any µ satisfying m < µ < M, there is a point (x0 , y0 ) in D such that
f (x0 , y0 ) = µ.
If a continuous function takes both positive and negative values in a closed
and bounded domain D, then it also takes the value 0 at some point in D.
Example. Show that the following functions are continuous at the point (0, 0).
2x 4 +3y 4 sin−1 (x+2y )
( (
x 2 +y 2
, (x, y ) 6= (0, 0) tan−1 (2x+4y )
, (x, y ) 6= (0, 0)
(a) f (x, y ) = , (b) f (x, y ) =
0, (x, y ) = (0, 0) 1/2, (x, y ) = (0, 0)

Solution. (a) Take x = r cos θ, y = r sin θ, then


4 4
2x + 3y r 4 (2 cos4 θ + 3 sin4 θ)
|f (x, y ) − f (0, 0)| = 2 = = r 2 {2 cos4 θ + 3 sin4 θ} < 5r 2
x +y 2
r 2 (cos2 θ + sin2 θ)
p p
On choosing δ < /5, we have |f (x, y ) − f (0, 0)| <  whenever r < δ or x 2 + y 2 < δ.
Thus, f (x, y ) is continuous at (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 16 / 93
Continuity

(b) Take x + 2y = t. Clearly, t → 0 when (x, y ) → (0, 0). Now,


sin−1 (x + 2y ) sin−1 t (sin−1 t)/t 1
lim = lim = lim
(x,y )→(0,0) tan−1 (2x + 4y ) t→0 tan−1 2t t→0 (tan−1 2t)/(2t) 2
1
= = f (0, 0).
2
Thus, f (x, y ) is continuous at (0, 0). 
Example. Show that the following functions are discontinuous at the given points.
( 2 √
x −x y
(a) f (x, y ) = x 2 +y , (x, y ) 6= (0, 0). at the point(0, 0).
0, (x, y ) = (0, 0)
( 2
x +xy +x+y
x+y , (x, y ) 6= (2, 2)
(b) f (x, y ) = at the point (2, 2).
4, (x, y ) = (2, 2)
Solution. (a) Take y = m2 x 2 . Clearly, x → 0 when (x, y ) → (0, 0). Further,

x2 − x y (1 − m)x 2 1−m
lim 2
= lim =
(x,y )→(0,0) x + y x→0 (1 + m2 )x 2 1 + m2
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 17 / 93
Continuity

which depends on m, i.e., on the paths y = m2 x 2 and hence the limit of f (x, y ) does not
exist at (0, 0). Thus, the function is not continuous at (0, 0).

x 2 +xy +x+y
(b) Clearly, lim(x,y )→(2,2) x+y
= 3. Indeed,
2
x + xy + x + y (x + y )(x + 1)

− 3 = − 3 = |x − 2|.

x +y x +y

On choosing δ < , we have |f (x, y ) − 3| <  whenever |x − 2| + |y − 2| < δ that is,


lim(x,y )→(2,2) f (x, y ) = 3 6= f (2, 2). Thus, the function f (x, y ) has removable discontinuity
at (2, 2). 
H.W. Find the limit of the functions (0, 0).
(
y + x sin(1/y ), y 6= 0
(i) f (x, y ) =
0, y = 0.
(√ 2 2
x y +1−1
x 2 +y 2
, (x, y ) 6= (0, 0)
(ii) f (x, y ) =
0, (x, y ) = (0, 0).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 18 / 93


Repeated Limits

If f (x, y ) is defined in a neighbourhood of (x0 , y0 ), then we write limy →y0 f (x, y ) = g (x),
if exists, and limx→x0 g (x) = `, if exists. Then, we can write
lim lim f (x, y ) = `,
x→x0 y →y0

which is called repreated limit of f (x, y ) as x → x0 , y → y0 . Similarly, we have another


repeated limit, namely
lim lim f (x, y ) = `0 .
y →y0 x→x0

Note that ` = `0 is not always true.


xy xy xy
(i) lim p = 0 and lim lim p = lim lim p = 0.
(x,y )→(0,0) x2 + y2 x→0 y →0 x2 + y2 y →0 x→0 x2 + y2
y −x y −x y −x
(ii) lim does not exist and lim lim = −1, lim lim = 1.
(x,y )→(0,0) y + x x→0 y →0 y + x y →0 x→0 y + x
 1 xy   1 xy 
(iii) lim lim y sin + 2 2
= 0, lim lim y sin + 2
x→0 y →0 x x +y y →0 x→0 x x + y2
1  1 xy 
does not exist as lim y sin does not exist, and lim y sin + 2
x→0 x (x,y )→(0,0) x x + y2
does not exist.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 19 / 93


Repeated Limits

Result. In case the simultaneous limit: lim(x,y )→(x0 ,y0 ) f (x, y ) exists, the repeated limits,
if exist, are equal. But the converse does not hold. However, if repeated limits are not
equal, then simultaneous limit does not exist.
H.W. Find the following limits.
x +y −4
(i) lim √ , (x + y 6= 4).
(x,y )→(1,2) x +y −2
√ √
x − y +1
(ii) lim , (x 6= y + 1).
(x,y )→(4,3) x −y −1

H.W. Check the continuity of the following functions at (0, 0, 0)



 √xy +yz+zx , (x, y , z) 6= (0, 0, 0)
(i) f (x, y , z) = x 2 +y 2 +z 2
0, (x, y , x) = (0, 0, 0).
(
xyz
2 2 2, (x, y , z) 6= (0, 0, 0)
(ii) f (x, y , z) = x +y +z
0, (x, y , x) = (0, 0, 0).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 20 / 93


Partial Derivatives

Let (x0 , y0 ) be a point inside the domain of a function f (x, y ). The plane y = y0 cuts
the surface z = f (x, y ) in the curve z = f (x, y0 ). The slope of the curve z = f (x, y0 ) at
the point x = x0 that is, at the point (x0 , y0 , f (x0 , y0 )) in the plane y = y0 is known as
the partial derivative of f (x, y ) with respect to x at (x0 , y0 ). More formally, we define the
partial derivative of f (x, y ) with respect to x at (x0 , y0 ) as follows.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 21 / 93


Partial Derivatives

Definition. The partial derivative of f(x, y) with respect to x at a point (x0 , y0 ) is


defined as,

∂f df (x, y0 ) f (x0 + ∆x, y0 ) − f (x0 , y0 )
fx (x0 , y0 ) = = = lim
∂x (x0 ,y0 ) dx
x=x0
∆x→0 ∆x

provided the limit exists.


Similarly, the plane x = x0 cuts the surface z = f (x, y ) in the curve z = f (x0 , y ). The
slope of the curve z = f (x0 , y ) at point y = y0 , that is, at (x0 , y0 , f (x0 , y0 )) in the plane
x = x0 is known as the partial derivative of f (x, y ) with respect to y at (x0 , y0 ).
Definition. The partial derivative of f(x, y) with respect to y at a point (x0 , y0 ) is
defined as,

∂f df (x0 , y ) f (x0 , y0 + ∆y ) − f (x0 , y0 )
fy (x0 , y0 ) = = = lim
∂y (x0 ,y0 ) dy
y =y0
∆y →0 ∆y

provided the limit exists.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 22 / 93


Partial Derivatives

It is clear from the definition that the partial derivative of f with respect to the variable
∂f
x i.e., ∂x can be calculated by differentiating f with respect to x in the usual way by
treating y as a constant. Similarly, the partial derivative of f with respect to the variable
∂f
y , i.e. ∂y can be calculated by differentiating f with respect to y by treating x as a
constant. We illustrate this with the help of following examples.

∂f ∂f
Example. Obtain the partial derivatives ∂x and ∂y at the point (1, 2) where f (x, y ) =
2
x + 2xy + y − 1.
∂f
Solution. To obtain ∂x , y is regarded as a constant and thus we have,

∂f ∂f

= 2x + 2y =⇒ = 6.
∂x ∂x (1,2)

∂f
Similarly, to obtain ∂y
, x is regarded as a constant and thus we have,

∂f ∂f

= 2x + 1 =⇒ = 3. 
∂y ∂x (1,2)

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 23 / 93


Partial Derivatives

∂f ∂f
Example. Obtain ∂x and ∂y where f (x, y ) = 3y sin(xy /3).
∂f
Solution. For ∂x , we treat y as constant and obtain
∂f
= y 2 cos(xy /3)
∂x
∂f
and for ∂y
, we treat x as constant to obtain
∂f
= 3 sin(xy /3) + xy cos(xy /3). 
∂y
Example. The plane x = 2 intersects the paraboloid z = x 2 + y 2 in a parabola. Obtain
the slope of a tangent to the parabola at the point (2, 1, 5).
Solution. Notice that the point (2, 1, 5) lies on the paraboloid and on the parabola at the
intersection of the plane x = 2 and the paraboloid z = x 2 + y 2 . The required slope can
be obtained by differentiating z = x 2 + y 2 with respect to y treating x as constant. Thus,
∂z

= 2y = 2.

∂y (2,1)

(2,1)

Alternatively, if x = 2, then z = 4 + y 2 is the equation of the parabola in the yz plane


obtained by intersecting the plane x = 2 with the paraboloid z = x 2 + y 2 and thus we
have,
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 24 / 93
Partial Derivatives

∂z

= 2y = 2. 

∂y y =1

y =1

Definition. Let f (x1 , x2 , . . . , xn ) be a function of n variables and (x̃1 , x̃2 , . . . , x̃n ) be a point
inside its domain D. Then, the partial derivative of f (x1 , . . . , xi , . . . , xn ) with respect to
the variable xi at (x̃1 , x̃2 , . . . , x̃n ) is defined as
df (x̃1 , . . . , x̃i−1 , xi , x̃i+1 , . . . , x̃n )

fxi (x̃1 , x̃2 , . . . , x̃n ) =
dxi

xi =x̃i

f (x̃1 , . . . , x̃i−1 , x̃i + ∆xi , x̃i+1 , . . . , x̃n ) − f (x̃1 , . . . , x̃i−1 , x̃i , x̃i+1 , . . . , x̃n )
= lim
∆xi →0 ∆xi
provided the limit exists where i ∈ {1, 2, . . . , n}.

As before, the partial derivative of f (x1 , . . . , xi , . . . , xn ) with respect to the variable xi


i.e., ∂f (x1 ,...,x
∂xi
i ,...,xn )
can be calculated by differentiating f (x1 , . . . , xi , . . . , xn ) with respect
to the variable xi in the usual way by treating other variables x1 , . . . , xi−1 , xi+1 , . . . , xn as
constants.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 25 / 93
Partial Derivatives

∂f ∂f ∂f
Example. Find partial derivatives ∂x , ∂y and ∂z where f (x, y , z) = x sin(y + 2z).
∂f
Solution. To obtain ∂x , we differentiate f with respect to x in the usual way by treating
y and z as constants. Thus,
∂f
= sin(y + 2z).
∂x
∂f ∂f
Similarly, for ∂y (or ∂z ), we differentiate f with respect to y (or z) in the usual way by
treating x, z (or x, y ) as constants and thus we have,
∂f ∂f
= x cos(y + 2z), ( or = 2x cos(y + 2z)). 
∂y ∂z
p
H.W.: Find fx (0, 0) and fy (0, 0) for f (x, y ) = |xy |.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 26 / 93


Partial Derivatives

Continuity and Partial Derivatives.


Let us consider the following examples:
x2 − y2 2
1. If f (x, y ) = xy , x + y 2 6= 0, f (0, 0) = 0, then fx (x, 0) = 0 = fy (0, y ),
x2 + y2
fx (0, y ) = −y and fy (x, 0) = x. Also f is continuous at (0, 0).
xy
2. If f (x, y ) = 2 , (x, y ) 6= (0, 0) and f (0, 0) = 0, then fx (0, 0), fy (0, 0) exist, but
x + y2
f is not continuous at (0, 0).
1
3. If f (x, y ) = (x + y ) sin , x + y 6= 0, and f (x, y ) = 0, x + y = 0, then f is
x +y
continuous at (0, 0) but fx (0, 0), fy (0, 0) do not exist.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 27 / 93


Partial Derivatives

Remark. For a function of one variable, existence of its derivative implies continuity of
the function. But, for a function of two (or more variable) variables, existence of its partial
derivatives does not imply continuity of the function. For example, the function
(
0, xy 6= 0
f (x, y ) = .
1, xy = 0
∂f ∂f
is not continuous at (0, 0), but its partial derivatives ∂x and ∂y exist at (0, 0). Indeed,
when the point (0, 0) is approached from any point along the line y = mx where m 6= 0,
the limit of f is 0, but the value of the function is 1. Thus, f is not continuous at (0, 0).
But the partial derivatives,
∂f f (0 + ∆x, 0) − f (0, 0)

= lim =0
∂x (0,0) ∆x→0 ∆x

∂f f (0, 0 + ∆y ) − f (0, 0)

= lim =0
∂y (0,0) ∆y →0 ∆y

exist. On the other hand, f (x, y ) = |x| is a continuous function for all (x, y ) ∈ R2 , but its
∂f
partial derivative ∂x does not exist at (0, 0). Similarly, f (x, y ) = |x| + |y | is continuous
for all (x, y ) ∈ R2 , but both of its partial derivatives ∂x
∂f
and ∂y∂f
do not exist at (0, 0). 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 28 / 93
Partial Derivatives
Theorem (Sufficient condition for continuity). If one of the partial derivatives of f (x, y )
exists and is bounded in the neighbourhood of a point (x0 , y0 ) and the other partial
derivative exits at (x0 , y0 ), then f (x, y ) is continuous at (x0 , y0 ).
∂f
Proof. Without loss of generality, we can assume that the partial derivative ∂x exists and
∂f
is bounded in the neighbourhood of (x0 , y0 ) and the other partial derivative ∂y exists at
(x0 , y0 ).
∂f
Since ∂x exists in the neighbourhood of (x0 , y0 ), due to the mean value theorem,
∂f
f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 + ∆y ) = (x0 + θ∆x, y0 + ∆y )∆x (1)
∂x
∂f
for some θ ∈ (0, 1). Further, as ∂y
exists at (x0 , y0 ),
∂f
f (x0 , y0 + ∆y ) − f (x0 , y0 ) = (x0 , y0 )∆y + ∆y (2)
∂y
∂f
where  depends on ∆y and tends to 0 when ∆y → 0. Further, ∂x
is bounded in the
neighbourhood of (x0 , y0 ), equations (1) and (2) yield
f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 )
= f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 + ∆y ) + f (x0 , y0 + ∆y ) − f (x0 , y0 )
∂f ∂f
= (x0 + θ∆x, y0 + ∆y )∆x + (x0 , y0 )∆y + ∆y → 0 when (∆x, ∆y ) → (0, 0).
∂x ∂y
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 29 / 93
Partial Derivatives

Thus, we have
lim f (x, y ) = lim f (x0 + ∆x,y0 + ∆y ) = f (x0 , y0 )
(x,y )→(x0 ,y0 ) (∆x,∆y )→(0,0)

i.e., f is continuous at (x0 , y0 ). 

Example: Consider
xy 2

 , (x, y ) 6= (0, 0),
f (x, y ) = x2 + y2
0, (x, y ) = (0, 0).

(0 + ∆x)02 − 0 0(0 + ∆y )2 − 0
Here fx (0, 0) = lim = 0 and fy (0, 0) = lim = 0.
∆x→0 ∆x ∆y →0 ∆y
y 2 (y 2 − x 2 )
For (x, y ) 6= (0, 0), fx (x, y ) = , so that
(x 2 + y 2 )2
y2 y2 − x2

|fx (x, y )| = 2 2
· 2 ≤ 1.
x +y x + y2
⇒ fx (x, y ) is bounded in every neighbourhood of (0, 0), and fy (0, 0) exists.
⇒ f is continuous at (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 30 / 93
Partial Derivatives

Higher Order Partial Derivatives. If f (x, y ) is partially differentiable at every point


∂f ∂f
inside its domain, then the partial derivatives ∂x and ∂y are functions of x and y , which
can further be differentiated with respect to variables x and y . This leads to second order
∂2f ∂2f ∂2f ∂2f
partial derivatives ∂x 2 , ∂x∂y , ∂y ∂x and ∂y 2 . One can repeat the process to obtain other
higher order partial derivatives.
At a point (x0 , y0 ), we define
 
∂ ∂f fx (x0 + ∆x, y0 ) − fx (x0 , y0 )
fxx (x0 , y0 ) = = lim
∂x ∂x (x0 ,y0 ) ∆x→0 ∆x
 
∂ ∂f fx (x0 , y0 + ∆y ) − fx (x0 , y0 )
fxy (x0 , y0 ) = = lim
∂y ∂x (x0 ,y0 ) ∆y →0 ∆y
 
∂ ∂f fy (x0 , y0 + ∆y ) − fy (x0 , y0 )
fyy (x0 , y0 ) = = lim
∂y ∂y (x0 ,y0 ) ∆y →0 ∆y
 
∂ ∂f fy (x0 + ∆x, y0 ) − fy (x0 , y0 )
fyx (x0 , y0 ) = = lim
∂x ∂y (x0 ,y0 ) ∆x→0 ∆x

The derivatives fxy and fyx are called the second order mixed partial derivatives.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 31 / 93


Partial Derivatives
2 2 2
∂2f
Example. For a function f (x, y ) = x cos y + ye x , obtain ∂x∂ f ∂ f ∂ f
2 , ∂x∂y , ∂y ∂x and ∂y 2
.
∂f ∂f
Solution. First, we obtain first order partial derivatives ∂x and ∂y as
∂f ∂f
= cos y + ye x , = −x sin y + e x ,
∂x ∂y
and then the second order partial derives as
∂2f ∂  ∂f  ∂
2
= = (cos y + ye x ) = ye x
∂x ∂x ∂x ∂x
∂2f ∂  ∂f  ∂
= = (cos y + ye x ) = − sin y + e x
∂y ∂x ∂y ∂x ∂y
∂2f ∂  ∂f  ∂
= = (−x sin y + e x ) = − sin y + e x
∂x∂y ∂x ∂y ∂x
∂2f ∂  ∂f  ∂
= = (−x sin y + e x ) = −x cos y .
∂y 2 ∂y ∂y ∂y
Notice that
∂2f ∂2f
=
∂y ∂x ∂x∂y
but this may not always be true. The following theorem gives a sufficient condition for
this C.
equality.
Kumar (IIT Roorkee) Differential Calculus 2020-21 32 
/ 93
Partial Derivatives

Theorem (Equality of Mixed Partial Derivatives). If f (x, y ) and its partial derivatives
2
∂f ∂2f
, ∂f , ∂ f and ∂x∂y
∂x ∂y ∂y ∂x
are defined in an open disk containing point (x0 , y0 ) and they are
continuous at (x0 , y0 ), then
∂2f ∂2f
= .
∂x∂y ∂y ∂x
at each point of the open disk. Proof not required.
OR If fy exists in a neighbourhood of (x0 , y0 ) and fyx is continuous at (x0 , y0 ), then fxy
exists at (x0 , y0 ) and fxy (x0 , y0 ) = fyx (x0 , y0 ).
∂2f ∂2f
Example. Find ∂y ∂x
(0, 0) and ∂x∂y (0, 0) for a function f (x, y ) given by
( 3
xy
2, (x, y ) 6= (0, 0)
f (x, y ) = x+y .
0, (x, y ) = (0, 0)
2 2
∂ f ∂ f
Discuss the continuity of ∂y ∂x
and ∂x∂y at (0, 0).
Solution. We calculate the required derivatives as,
∂f f (0 + ∆x, 0) − f (0, 0)
(0, 0) = lim =0
∂x ∆x→0 ∆x
∂f f (0, 0 + ∆y ) − f (0, 0)
(0, 0) = lim =0
∂y ∆y →0 ∆y
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 33 / 93
Partial Derivatives

∂f f (0 + ∆x, y ) − f (0, y ) ∆xy 3 /(∆x + y 2 ) − 0


(0, y ) = lim = lim =y
∂x ∆x→0 ∆x ∆x→0 ∆x
∂f f (x, 0 + ∆y ) − f (x, 0) x∆y 3 /(x + ∆y 2 ) − 0
(x, 0) = lim = lim =0
∂y ∆y →0 ∆y ∆y →0 ∆y
∂f ∂f
∂2f ∂x
(0, 0 + ∆y ) − ∂x
(0, 0) ∆y
(0, 0) = lim = lim =1
∂y ∂x ∆y →0 ∆y ∆y →0 ∆y
∂f ∂f
∂2f ∂y
(∆x, 0) − ∂y
(0, 0)
(0, 0) = lim =0
∂x∂y ∆x→0 ∆x
which implies
∂2f ∂2f
(0, 0) 6= (0, 0).
∂y ∂x ∂x∂y
∂2f ∂2f
But ∂y ∂x
and ∂x∂y
are not continuous. Indeed, when (x, y ) 6= (0, 0), then

∂2f ∂2f y 6 + 5xy 4


(x, y ) = (x, y ) = ,
∂x∂y ∂y ∂x (x + y 2 )3

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 34 / 93


Partial Derivatives

which is not continuous at (0, 0) because along the path x = my 2 ,


∂2f y 6 (1 + 5m) 1 + 5m
lim = lim 6 =
(x,y )→(0,0) ∂y ∂x y →0 y (1 + m)3 (1 + m)3
i.e., the limit does not exist at (0, 0) and hence f is not continuous at (0, 0). 
H. W.
1. Check whether fxy (0, 0) = fyx (0, 0) for
(
(x 2 + y 2 )tan−1 ( yx ), x=6 (0, 0),
f (x, y ) =
0, x = 0.
2
2. f (x, y ) = x 3 y + e xy , then fxy = fyx .

Tangent Plane and Normal:



∂z ∂z
As discussed earlier, ∂x and are the slopes of the tangents to the curves of

(x ,y )0 0 ∂y
(x0 ,y0 )
intersection of z = f (x, y ) and the planes y = y0 and x = x0 , respectively. These tangent
lines lie in the tangent plane to the surface z = f (x, y ) at the point P(x0 , y0 , f (x0 , y0 )) =
P(x0 , y0 , z0 ).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 35 / 93
Partial Derivatives
The direction ratios of the tangent line to the surface z = f (x, y ) at P(x0 , y0 , z0 ) in the
∂z
plane y = y0 are: 1, 0, ∂x (x0 ,y
and the direction ratios of the tangent at P(x0 , y0 , z0 ) in
0)
∂z
the plane x = x0 are: 0, 1, ∂y . These two lines lie in the tangent plane to the surface
(x0 ,y0 )  

∂z
at P. The direction (vector) of the normal to the tangent plane at P is 1, 0, ∂x (x0 ,y0 )
×
   
∂z ∂z
∂z
0, 1, ∂y = − ∂x (x ,y )
, − ∂y , 1 . Therefore equation of the tangent
(x0 ,y0 ) 0 0 (x0 ,y0 )
plane to the surface z = f (x, y ) at P(x0 , y0 , z0 ) is

∂z ∂z
− (x − x0 ) − (y − y 0 ) + 1(z − z0 ) = 0
∂x (x0 ,y0 ) ∂y (x0 ,y0 )

∂z ∂z
or (x − x0 ) + (y − y0 ) − 1(z − z0 ) = 0,
∂x (x0 ,y0 ) ∂y (x0 ,y0 )
and equation of the normal is
x − x0 y − y0 z − z0

∂z
= = .
∂x (x0 ,y0 )
∂z −1
∂y
(x0 ,y0 )

H.W.: 1.Find the tangent plane and normal to x 2 + 2y 2 + 3z 2 = 12 at (1, 2, −1).


2. Find point(s) on the surface x 2 + y 2 + z 2 + 4x − 2z = 11 at which tangent plane is
horizontal.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 36 / 93
Differentiability

Let f (x, y ) be a function of two variables defined on some domain D in the xy -plane.
Assume that (x0 , y0 ) is a point inside D and (x0 + ∆x, y0 + ∆y ) is a point in the neigh-
bourhood of (x0 , y0 ) in D.
Definition (Total Increment). The expression,
∆f = f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 )
is called the total increment in f as (x0 , y0 ) changes to (x0 + ∆x, y0 + ∆y ).

For example: consider z = x 2 − xy = f (x, y ). Then


∆z = ∆f = (x + ∆x)2 − (x + ∆x)(y + ∆y ) − (x 2 − xy )
= x 2 + ∆x 2 + 2x∆x − xy − x∆y − y ∆x − ∆x∆y − x 2 + xy
= (2x − y )∆x + (−x)∆y + ∆x 2 − ∆x∆y
= fx (x, y )∆x + fy (x, y )∆y + F (∆x, ∆y ).
As (x, y ) changes from (1, 1) to (1.2, 0.7), x = 1, y = 1, ∆x = 0.2, ∆y = −0.3,
∴ ∆z = (2 − 1) × 0.2 − 1(−0.3) + (0.2)2 − 0.2(−0.3)
= 0.2 + 0.3 + 0.04 + 0.06 = 0.6.
Also note that F (∆x, ∆y ) → 0 as (∆x, ∆y ) → (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 37 / 93
Differentiability

Definition (Differentiable Function). The function f (x, y ) is said to be differentiable


at the point (x0 , y0 ) if the total increment ∆f at this point can be written as

∆f = a(x0 , y0 ) ∆x + b(x0 , y0 ) ∆y + 1 (∆x, ∆y ) ∆x + 2 (∆x, ∆y ) ∆y

where constants a(x0 , y0 ) and b(x0 , y0 ) depend on the point (x0 , y0 ), but are independent
of ∆x and ∆y , and 1 (∆x, ∆y ), 2 (∆x, ∆y ) are functions of ∆x and ∆y such that
1 (∆x, ∆y ) → 0 and 2 (∆x, ∆y ) → 0 when (∆x, ∆y ) → (0, 0). The first part

df = a(x0 , y0 ) ∆x + b(x0 , y0 ) ∆y or df = a(x0 , y0 ) dx + b(x0 , y0 ) dy .

is called the total differential or simply differential of z at the point (x0 , y0 ). If ∆y = 0


and ∆x → 0, then
∆f f (x0 + ∆x, y0 ) − f (x0 , y0 ) a(x0 , y0 )∆x + 1 (∆x, 0)∆x
lim = lim = lim
∆x→0 ∆x ∆x→0 ∆x ∆x→0 ∆x
= a(x0 , y0 )

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 38 / 93


Differentiability

∂f
a(x0 , y0 ) = (x0 , y0 ).
∂x
Similarly, if ∆x = 0 and ∆y → 0, then one can show that
∂f
b(x0 , y0 ) = (x0 , y0 ).
∂y
∂f ∂f
Thus, the existence of partial derivatives ∂x (x0 , y0 ) and ∂y (x0 , y0 ) are the necessary con-
ditions for differentiability of the function f at (x0 , y0 ). Substituting the values of a(x0 , y0 )
and b(x0 , y0 ) in ∆f , we can re-write the definition of differentiability as below.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 39 / 93


Differentiability

Definition (Differentiability). A function f (x, y ) is said to be differentiable at the


∂f ∂f
point (x0 , y0 ) if the partial derivatives ∂x (x0 , y0 ) and ∂y (x0 , y0 ) exist and

∆f = f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 )


∂f ∂f
= (x0 , y0 )∆x + (x0 , y0 )∆y + 1 (∆x, ∆y ) ∆x + 2 (∆x, ∆y ) ∆y
∂x ∂y
where 1 (∆x, ∆y ), 2 (∆x, ∆y ) are functions of ∆x and ∆y such that 1 (∆x, ∆y ) → 0
and 2 (∆x, ∆y ) → 0 when (∆x, ∆y ) → (0, 0). We call f differentiable if it is differen-
tiable at every point in its domain.
Theorem. If a function f (x, y ) is differentiable at (x0 , y0 ), then it is continuous at (x0 , y0 ).
Proof. As f is differentiable,

∆f = f (x0 + ∆x, y0 + ∆y )
∂f ∂f
= (x0 , y0 )∆x + (x0 , y0 )∆y + 1 (∆x, ∆y ) ∆x + 2 (∆x, ∆y ) ∆y
∂x ∂y
which tends to 0 when (∆x, ∆y ) → (0, 0). Hence lim(∆x,∆y )→0 (f (x0 +∆x, y0 +∆y )) = 0.
Thus, f is continuous at (x0 , y0 ). 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 40 / 93


Differentiability

∂f ∂f
The existence of partial derivatives ∂x (x0 , y0 ) and ∂y (x0 , y0 ) is only a necessary condition,
i.e. the function may not be differential even if its partial derivatives exist. The following
example illustrates this.
Example. For the function,
(
1, if x > 0 and y > 0
f (x, y ) =
0, otherwise,
∂f ∂f
show that the partial derivatives ∂x
and ∂y
exist at (0, 0), but f is not differentiable at
(0, 0).
Solution. The partial derivatives
∂f f (0 + ∆x, 0) − f (0, 0)
= lim =0
∂x ∆x→0 ∆x
∂f f (0, 0 + ∆y ) − f (0, 0)
= lim = 0,
∂y ∆y →0 ∆y
i.e. both partial derivatives exist at (0, 0). Now, lim(x,y )→(0,0) f (x, y ) along the line
y = x in the first quadrant is 1, but is 0 if approached along the x-axis. Hence,
lim(x,y )→(0,0) f (x, y ) does not exist. Thus f is not continuous which in turn implies that
f is not differentiable. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 41 / 93
Differentiability

Example: Consider
 3 3
 x + 2y , (x, y ) 6= (0, 0),
f (x, y ) = 2
x +y 2

0, (x, y ) = (0, 0).


Here f is continuous at (0, 0), fx (0, 0) = 1 and fy (0, 0) = 2. Now

∆z = ∆f = f (0 + ∆x, 0 + ∆y ) − f (0, 0)
∆x 3 + 2∆y 3
= .
∆x 2 + ∆y 2
If possible, let

∆x 3 + 2∆y 3
∆z =
∆x 2 + ∆y 2
= fx (0, 0)∆x + fy (0, 0)∆y + 1 ∆x + 2 ∆y
= ∆x + 2∆y + 1 ∆x + 2 ∆y .

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 42 / 93


Differentiability

In polar coordinates

r 3 (cos3 θ + 2 sin3 θ)
= r cos θ + 2r sin θ + 1 r cos θ + 2 r sin θ
r2
⇒ cos3 θ + 2 sin3 θ = cos θ + 2 sin θ + 1 cos θ + 2 sin θ
As (∆x, ∆y ) → (0, 0), r → 0 for all θ
⇒ cos3 θ + 2 sin3 θ = cos θ + 2 sin θ
⇒ sin θ cos θ(cos θ + sin θ) = 0,

which is not true for all θ. Hence f is not differentiable at (0, 0).

Example 1. Show that the function


( p
(x 2 + y 2 ) sin(1/ x 2 + y 2 ), if (x, y ) 6= (0, 0)
f (x, y ) =
0 if (x, y ) = (0, 0).

is differentiable at (0, 0).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 43 / 93


Differentiability

Solution. The partial derivatives


∂f f (0 + ∆x, 0) − f (0, 0) p
(0, 0) = lim = lim (∆x)2 sin(1/ (∆x)2 )/∆x = 0
∂x ∆x→0 ∆x ∆x→0
∂f f (0, 0 + ∆y ) − f (0, 0) p
(0, 0) = lim = lim (∆y )2 sin(1/ (∆y )2 )/∆y = 0
∂y ∆y →0 ∆y ∆y →0

and also
p
df = f (0 + ∆x, 0 + ∆y ) − f (0, 0) = (∆x)2 + (∆y )2 sin(1/ (∆x)2 + (∆y )2 )
 

∂f ∂f
= (0, 0)∆x + (0, 0)∆y + 1 ∆x + 2 ∆y
∂x ∂y
where
p
1 = ∆x sin(1/ (∆x)2 + (∆y )2 )
p
2 = ∆y sin(1/ (∆x)2 + (∆y )2 )

which clearly gives 1 → 0 and 2 → 0 when (∆x, ∆y ) → (0, 0). Thus, f is differentiable
at (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 44 / 93
Differentiability

Theorem (Sufficient condition for differentiability). If the function f and its partial
∂f ∂f
derivatives ∂x and ∂y are continuous in the disk centred at (x0 , y0 ), then f is differentiable
at (x0 , y0 ).
Proof. Since fx and fy are continuous at (x0 , y0 ), fx (x0 + ∆x, y0 + ∆y ) = fx (x0 , y0 ) +
1 (∆x, ∆y ) and fy (x0 + ∆x, y0 + ∆y ) = fy (x0 , y0 ) + 2 (∆x, ∆y ), where 1 , 2 → 0 when
∂f
(∆x, ∆y ) → (0, 0) . By mean value theorem in x and continuity of ∂x , we have
∂f h ∂f i
f (x0 + ∆x, y0 ) − f (x0 , y0 ) = (x0 + θ1 ∆x, y0 )∆x = (x0 , y0 ) + 1 ∆x
∂x ∂x
∂f
= (x0 , y0 )∆x + 1 ∆x (3)
∂x
for some 0 < θ1 < 1 where 1 → 0 when (∆x, ∆y ) → (0, 0). Similarly, the mean value
∂f
theorem in y and the continuity of ∂y yields, for some 0 < θ2 < 1,

∂f
f (x0 + ∆x,y0 + ∆y ) − f (x0 + ∆x, y0 ) = (x0 + ∆x, y0 + θ2 ∆y )∆y
∂y
h ∂f i ∂f
= (x0 , y0 ) + 2 ∆y = (x0 , y0 )∆y + 2 ∆y (4)
∂y ∂y
where 2 → 0 when (∆x, ∆y ) → (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 45 / 93
Differentiability
On adding equations (3) and (4), we have,

∆f = f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 )


= f (x0 + ∆x, y0 + ∆y ) − f (x0 + ∆x, y0 ) + f (x0 + ∆x, y0 ) − f (x0 , y0 )
∂f ∂f
= (x0 , y0 )∆x + (x0 , y0 )∆y + 1 ∆x + 2 ∆y
∂x ∂y
where 1 , 2 → 0 when (∆x, ∆y ) → (0, 0). Hence, f is differentiable at (x0 , y0 ). 
Example. Prove that f (x, y ) = x 2 y + xy 3 is differentiable for all (x, y ).
Solution. The partial derivatives
∂f ∂ 2
= (x y + xy 3 ) = 2xy + y 3
∂x ∂x
∂f ∂ 2
= (x y + xy 3 ) = x 2 + 3xy 2
∂y ∂y
which (being polynomials) are continuous for all (x, y ). Thus, f is differentiable. 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 46 / 93


Differentiability

∂f ∂f
The continuity conditions on the partial derivatives ∂x and ∂y are only sufficient conditions
for the differentiability of f , i.e., there can be a function which is differentiable, but its
partial derivatives may not be continuous.
Refer to Example 1 on slide 42, when (x, y ) 6= (0, 0), we can find the partial derivatives
by using the standard differentiation as follows,
p
∂f ∂f  2 p  p x cos(1/ x 2 + y 2 )
= (x + y 2 ) sin(1/ x 2 + y 2 ) = 2x sin(1/ x 2 + y 2 ) − p
∂x ∂x x2 + y2
p
∂f ∂f 
2 2
p  p y cos(1/ x 2 + y 2 )
= (x + y ) sin(1/ x + y ) = 2y sin(1/ x + y ) −
2 2 2 2 p .
∂y ∂y x2 + y2
Both of these derivatives oscillates widely near (0, 0). For example, along the x− axis,
for x 6= 0
∂f
(x, 0) = 2x sin(1/|x|) − sign(x) cos(1/|x|)
∂x
where sign(x) = ±1 depending upon the sign of x and thus the term sign(x) cos(1/|x|)
oscillates rapidly between 1 and −1 even if the term 2x sin(1/|x|) → 0 when x → 0, i.e.,
∂f ∂f
∂x
oscillates between −1 and +1. In the same way, ∂y oscillates between −1 and +1
∂f ∂f
when (x, y ) → (0, 0). Thus, ∂x and ∂y are discontinuous at (0, 0). But f is differentiable
at (0, 0).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 47 / 93
Differentiability
Another relaxed sufficient condition for differentiability:
If one of the derivatives fx or fy is continuous at (x0 , y0 ) and other exists at (x0 , y0 ), then
f is differentiable at (x0 , y0 ).

Another method for testing the differentiability:


If z = f (x, y ) is differentiable at (x0 , y0 ), then
f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 ) − fx (x0 , y0 )∆x − fy (x0 , y0 )∆y = 1 ∆x + 2 ∆y
∆z − dz ∆x ∆y
⇒p = p 1 + p 2 .
∆x 2 + ∆y 2 ∆x 2 + ∆y 2 ∆x 2 + ∆y 2
∆x ∆y
As (∆x, ∆y ) → (0, 0), 1 → 0, 2 → 0; and p ,p are bounded.
∆x 2 + ∆y 2 ∆x 2 + ∆y 2
Therefore
∆z − dz
lim p =0
(∆x,∆y )→(0,0) ∆x 2 + ∆y 2
ensures the differentiability of f at (x0 , y0 ).  2 2
xy x − y , (x, y ) 6= (0, 0),
Home Assignment. Discuss the differentiability of f (x, y ) = 2
x +y 2

0, (x, y ) = (0, 0),



at (0, 0) by using all the methods which you know.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 48 / 93
Euler’s theorem for homogeneous functions

Consider

f (x, y ) = a0 x n + a1 x n−1 y + . . . + an−1 xy n−1 + an y n , (5)

in which every term has the same degree n. Such type of functions are called homogeneous
function of degree of n. From (5), we can write
  y n 
y  y n−1
f (x, y ) = x n a0 + a1 + . . . + an−1 + an
x x x
= x n g1 (y /x)
= y n g2 (x/y ).

Definition. A function f (x, y ) is called a homogeneous function of degree n in x and


y if it can be written as,

f (λx, λy ) = λn f (x, y )

for all real number λ 6= 0 and (x, y ) ∈ R2 .

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 49 / 93


Euler’s theorem for homogeneous functions

Remark. If we take λ = 1/x, then we get f (1, y /x) = x −n f (x, y ) =⇒ f (x, y ) =


x n f (1, y /x) = x n g (y /x) for some function g of y /x. Thus, the condition f (λx, λy ) =
λn f (x, y ) in the above definition can be replaced by f (x, y ) = x n g (y /x) or f (x, y ) =
y n g (x/y ).
For example,
f (x, y ) = x 2 + 2xy , f (x, y ) = tan−1 (y /x)

1 xy
f (x, y ) = 2 , f (x, y ) =
x + y2
p
x + y2
2

are homogeneous functions of degree 2, 0, −2 and 0. But, the function


x + y2
f (x, y ) =
y + x2
is not a homogeneous function.
C. W. Determine whether
x 1/4 + y 1/4
f (x, y ) =
x 1/5 + y 1/5
is homogeneous or not.
In case of three variables, f (x, y , z) is homogeneous if f (x, y , z) = x n φ(y /x, z/x) or
f (λx, λy , λz) = λn f (x, y , z).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 50 / 93
Euler’s theorem for homogeneous functions

Theorem (Euler’s Theorem). If f (x, y ) is a homogeneous function of degree n in x


and y with continuous first and second order partial derivatives, then
∂f ∂f
x +y = nf (x, y ) (6)
∂x ∂y
and hence
∂2f ∂2f 2
2∂ f
x2 + 2xy + y = n(n − 1)f (x, y ) (7)
∂x 2 ∂x∂y ∂y 2
Proof. As f (x, y ) is a homogeneous function of degree n in x and y , we have f (x, y ) =
x n g (y /x) which on differentiating partially with respect to x and y yields,
∂f  −y 
= nx n−1 g (y /x) + x n g 0 (y /x) = nx n−1 g (y /x) − yx n−2 g 0 (y /x)
∂x x2
∂f 1
= x n g 0 (y /x) = x n−1 g 0 (y /x).
∂y x
Thus, we have,
∂f ∂f
x +y = nx n g (y /x) − yx n−1 g 0 (y /x) + yx n−1 g 0 (y /x) = nx n g (y /x) = nf (x, y ),
∂x ∂y
which proves equation (6).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 51 / 93
Euler’s theorem for homogeneous functions
By differentiating equation (6) partially with respect to x and y , we have
∂2f ∂f ∂2f ∂f
x + +y =n , (8)
∂x 2 ∂x ∂x∂y ∂x
∂2f ∂f ∂2f ∂f
x + +y 2 =n . (9)
∂y ∂x ∂y ∂y ∂y
On multiplying equation (8) by x and equation (9) by y and then adding yields,
∂2f ∂f ∂2f ∂2f ∂f ∂2f ∂f ∂f
x2 2
+x + xy + xy +y + y 2 2 = nx + ny
∂x ∂x ∂x∂y ∂y ∂x ∂y ∂y ∂x ∂y
∂2f ∂2f ∂2f ∂f ∂f n ∂f ∂f o
=⇒ x 2 2 + 2xy + y2 2 + x +y =n x +y
∂x ∂x∂y ∂y ∂x ∂y ∂x ∂y
which on using equation (6) and fxy = fyx , we get
∂2f ∂2f 2
2∂ f
x2 + 2xy + y + nf = n2 f (x, y )
∂x 2 ∂x∂y ∂y 2
∂2f ∂2f ∂2f
⇒x 2 2
+ 2xy + y 2 2 = n(n − 1)f (x, y )
∂x ∂x∂y ∂y
and thus one obtains equation (7).
∂f ∂f ∂f
In general, x1 ∂x1
+ x2 ∂x2
+ . . . + xn ∂x n
= nf (x1 , x2 , . . . , xn ).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 52 / 93
Euler’s theorem for homogeneous functions

y 3 −x 3
Example. If f (x, y ) = y 2 +x 2
in R2 − {(0, 0)}, then verify the following

∂f ∂f
x +y = f (x, y )
∂x ∂y
∂2f ∂2f ∂2f
x2 2
+ 2xy + x 2 2 = 0 = 1(1 − 1)f (x, y )
∂x ∂x∂y ∂y
Solution. We verify the conditions of the Euler’s theorem. For any λ 6= 0, we have,
λ3 y 3 − λ3 x 3 y3 − x3
f (λx, λy ) = = λ
λ2 x 2 + λ2 x 2 x2 + y2
which means that f (x, y ) is a homogeneous function of degree n = 1. Further, first order
partial derivatives are
∂f −3x 2 (y 2 + x 2 ) − 2x(y 3 − x 3 ) −x(x 3 + 3xy 2 + 2y 3 )
= =
∂x (y 2 + x 2 )2 (y 2 + x 2 )2
∂f 3y 2 (y 2 + x 2 ) − 2y (y 3 − x 3 ) y (2x 3 + 3x 2 y + y 3 )
= 2 2 2
= .
∂y (y + x ) (y 2 + x 2 )2
One can verify that these partial derivatives are continuous.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 53 / 93
Euler’s theorem for homogeneous functions

Similarly, the second-order partial derivatives are


∂2f (−4x 3 − 6xy 2 − 2y 3 )(x 2 + y 2 )2 − 2(x 2 + y 2 )2x(−x 4 − 3x 2 y 2 − 2xy 3 )
=
∂x 2 (y 2 + x 2 )4
(−4x 3 − 6xy 2 − 2y 3 )(x 2 + y 2 ) + 4x(x 4 + 3x 2 y 2 + 2xy 3 )
=
(x 2 + y 2 )3
−4x 5 − 6x 3 y 2 − 2x 2 y 3 − 4x 3 y 2 − 6xy 4 − 2y 5 + 4x 5 + 12x 3 y 2 + 8x 2 y 3
=
(x 2 + y 2 )3
−6xy 4 − 2y 5 + 2x 3 y 2 + 6x 2 y 3
=
(x 2 + y 2 )3
∂2f (2x 3 + 6x 2 y + 4y 3 )(x 2 + y 2 )2 − 2(x 2 + y 2 )2y 2 (2x 3 + 3x 2 y + y 3 )
=
∂y 2 (y 2 + x 2 )4
(2x 3 + 6x 2 y + 4y 3 )(x 2 + y 2 ) − 4y 2 (2x 3 + 3x 2 y + y 3 )
=
(y 2 + x 2 )3
2x 5 + 6x 4 y + 4x 2 y 3 + 2x 3 y 2 + 6x 2 y 3 + 4y 5 − 8x 3 y 2 − 12x 2 y 3 − 4y 5
=
(y 2 + x 2 )3
2x 5 + 6x 4 y − 6x 3 y 2 − 2x 2 y 3
=
(y 2 + x 2 )3
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 54 / 93
Euler’s theorem for homogeneous functions

∂2f ∂  −x 4 − 3x 2 y 2 − 2xy 3 
=
∂y ∂x ∂y (y 2 + x 2 )2
(−6x 2 y − 6xy 2 )(x 2 + y 2 )2 − (−x 4 − 3x 2 y 2 − 2xy 3 )2(x 2 + y 2 )2y
=
(x 2 + y 2 )4
(−6x 2 y − 6xy 2 )(x 2 + y 2 ) − (−x 4 − 3x 2 y 2 − 2xy 3 )4y
=
(x 2 + y 2 )3
−6x 4 y − 6x 3 y 2 − 6x 2 y 3 − 6xy 4 + 4x 4 y + 12x 2 y 3 + 8xy 4
=
(x 2 + y 2 )3
−2x 4 y − 6x 3 y 2 + 6x 2 y 3 + 2xy 4
=
(x 2 + y 2 )3
∂2f ∂ 2x y + 3x 2 y 2 + y 4 
 3
=
∂x∂y ∂y (y 2 + x 2 )2
(6x y + 6xy 2 )(x 2 + y 2 )2 − (2x 3 y + 3x 2 y 2 + y 4 )2(x 2 + y 2 )2x
2
=
(x 2 + y 2 )4
(6x 2 y + 6xy 2 )(x 2 + y 2 ) − (2x 3 y + 3x 2 y 2 + y 4 )4x
=
(x 2 + y 2 )3
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 55 / 93
Euler’s theorem for homogeneous functions

∂2f 6x 4 y + 6x 3 y 2 + 6x 2 y 3 + 6xy 4 − 8x 4 y − 12x 3 y 2 − 4xy 4


=
∂x∂y (x 2 + y 2 )3
6x 2 y 3 + 2xy 4 − 2x 4 y − 6x 3 y 2
= .
(x 2 + y 2 )3
2 2 2 2
∂ f ∂ f ∂ f ∂ f
It is easy to verify that the second order partial derivatives ∂x 2 , ∂y 2 , ∂x∂y and ∂y ∂x

are continuous. Thus, by applying the Euler’s theorem with n = 1 (which degree of
homogeneity), we completethe proof.  
−1 x +y
Example 2: If u = sin √ √ , then show that
x+ y
sin u cos 2u
x 2 uxx + 2xyuxy + y 2 uyy = − .
4 cos3 u
x +y
Solution: We can write f (x, y ) = sin u = √ √ , (homo. function of degree 21 ).
x+ y
By Euler’s theorem
∂f ∂f 1
x +y = f (x, y )
∂x ∂y 2
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 56 / 93
Euler’s theorem for homogeneous functions
   
∂f ∂u ∂f ∂u 1
or x +y = f (x, y )
∂u ∂x ∂u ∂y 2
∂u ∂u 1
or x cos u + y cos u = sin u
∂x ∂y 2
∂u ∂u 1
or x +y = tan u (10)
∂x ∂y 2
Differentiating (10) w.r.t. x and w.r.t. y , we have
∂2u ∂u ∂2u 1 ∂u
x + +y = sec2 (u) (11)
∂x 2 ∂x ∂x∂y 2 ∂x
and
∂2u ∂u ∂2u 1 ∂u
x
+ + y 2 = sec2 (u) (12)
∂y ∂x ∂y ∂y 2 ∂y
Multiplying (11) by x and (12) by y , then adding
∂2u ∂2u 2
 
2∂ u ∂u ∂u 1 ∂u ∂u
x2 + 2xy + y + x + y = sec2
u x + y
∂x 2 ∂y ∂x ∂y 2 ∂x ∂y 2 ∂x ∂y
 
1 1 1 sin u cos 2u
⇒x 2 uxx + 2xyuxy + y 2 uyy = sec2 u tan u − tan u = − .
2 2 2 4 cos3 u
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 57 / 93
Euler’s theorem for homogeneous functions

H.W.

1. Verify the Euler’s theorem for

f (x, y , z) = 3x 2 yz + 5xy 2 z + 4z 4 .

2. If
(
y

xy tan x
, x=6 0,
f (x, y ) =
0, x = 0,

then show that

xfx + yfy = 2f ,

for all (x, y ) ∈ R2 .

C.W. Let f (x, y ) = x 2 tan−1 (y /x) − y tan−1 (y /x). If xfx + yfy = 2x 2 tan−1 (y /x) + A,
then what is A.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 58 / 93


Chain Rule: Total Derivative

Theorem. Let z = f (x, y ) be a function of two independent variables x and y which


are themselves functions of some independent variable t, say x = φ(t) and y = ψ(t), i.e.
z = f (φ(t), ψ(t)) is a composite function of the independent variable t. Assume that the
∂f ∂f
partial derivatives ∂x and ∂y are continuous functions of x and y and that φ and ψ are
differentiable functions of t. Then,
dz ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
Proof. For an increment ∆t in t, assume that ∆x, ∆y and ∆z are increments in x, y
∂f ∂f
and z respectively. As ∂x and ∂y are continuous, f is differentiable, i.e.,
∂f ∂f
∆z = ∆f = ∆x + ∆y + 1 ∆x + 2 ∆y
∂x ∂y
where 1 → 0 and 2 → 0 when ∆x → 0, ∆y → 0. On diving both sides by ∆t and
taking limit ∆t → 0 yields,
∆z ∂f ∆x ∂f ∆y ∆x ∆y
lim = lim + lim + lim 1 + lim 2 .
∆t→0 ∆t ∂x ∆t→0 ∆t ∂y ∆t→0 ∆t ∆t→0 ∆t ∆t→0 ∆t
When ∆t → 0, ∆x → 0 and ∆y → 0 due to the continuity of x = φ and y = ψ. Also,
∆x
∆t
→ dx
dt
and ∆y
∆t
→ dy
dt
when ∆t → 0 due to the differentiability of x = φ and y = ψ. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 59 / 93
Chain Rule: Total Derivative

Hence
dz ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
dz
dt
is called the total derivative of z with respect to t.
Remark. The chain rules discussed above can be generalized to functions of more than
two variables, i.e,
dz ∂z dx1 ∂z dx2 ∂z dxn
= + + ... +
dt ∂x1 dt ∂x2 dt ∂xn dt
for z = f (x1 , x2 , ..., xn ), where xi = xi (t).
Example. By chain rule, find the derivative of f (x, y ) = xy with respect to t along the
path x = cos t and y = sin t. Also, find the value of the derivative at t = π/2.
∂f ∂f
Solution. Clearly, partial derivatives ∂x = y and ∂y = x are continuous functions of x and
y and x = cos t and y = sin t are differentiable functions. Also, z = f (x, y ) = cos t sin t
is a composite function of t. Thus, by Chain Rule,
dz ∂f dx ∂f dy
= + = −y sin t + x cos t = cos2 t − sin2 t = cos 2t
dt ∂x dt ∂y dt

which gives dz
dt t=π/2
= cos π = −1. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 60 / 93
Chain Rule

Example. Obtain the derivative of f (x, y , z) = xy +z along the curve x = cos t, y = sin t
and z = t.
∂f ∂f ∂f
Solution. Clearly, the partial derivatives ∂x = y , ∂y = x and ∂z = 1 are continuous and
x = cos t, y = sin t and z = t are all differentiable functions of t. Also, w = f (x, y , z) =
cos t sin t + t is a composite function of t. Thus, by Chain Rule,
dw ∂f dx ∂f dy ∂f dz
= + + = −y sin t + x cos t + 1
dt ∂x dt ∂y dt ∂z dt
= − sin2 t + cos2 t + 1 = 1 + cos 2t 

H.W. 1. If z = x 3 y − y 4 , where x = 2t 2 , y = 5t 2 − 6t, then calculate dz dt


at t = 1 by
substituting in z as well as using total derivative formula.
2
2. If z = e xy , where x = t cos t, y = t sin t, then compute dzdt
at t = π/2.
3. If w = x 3 + xz 2 + y 3 + xyz, where x = e t , y = cos t, z = t 3 , then find dw
dt
at t = 0.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 61 / 93


Chain Rule For Partial Derivatives

Theorem. Let z = f (x, y ) be a function of two independent variables x and y which


are themselves functions of some independent variables u and v , say x = φ(u, v ) and
y = ψ(u, v ), i.e. z(u, v ) = f (φ(u, v ), ψ(u, v )) is a composite function of u and v . Assume
that f , φ and ψ have continuous partial derivatives with respect to their arguments. Then,
∂z ∂f ∂x ∂f ∂y ∂z ∂f ∂x ∂f ∂y
= + and = + .
∂u ∂x ∂u ∂y ∂u ∂v ∂x ∂v ∂y ∂v
Proof. Clearly, f , φ and ψ are differentiable and hence continuous functions. For a fixed
v and an increment ∆u in u, assume that ∆xu , ∆u y and ∆u z are increments in x, y and
z respectively. Further, due to differentiability of f ,
∂f ∂f
∆u z = ∆ u f = ∆u x + ∆u y + 1 ∆u x + 2 ∆u y
∂x ∂y
where 1 → 0 and 2 → 0 when ∆u x → 0 and ∆u y → 0. On diving both sides by ∆u
and taking limit ∆u → 0,
∆u z ∂f ∆u x ∂f ∆u y ∆u x ∆u y
lim = lim + lim + lim 1 + lim 2
∆u→0 ∆u ∂x ∆u→0 ∆u ∂y ∆u→0 ∆u ∆u→0 ∆u ∆u→0 ∆u
When ∆u → 0, ∆xu → 0 and ∆u y → 0 due to the continuity of φ and ψ. Also, ∆∆u
ux ∂x
→ ∂u
∆u y ∂y
and ∆u → ∂u when ∆u → 0. This proves the first part of the theorem. By interchanging
the roles of u and v , the second part follows. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 62 / 93
Chain Rule
Example. Obtain ∂u ∂z
and ∂v∂z
where z = f (x, y ) = 4x 2 − y 2 , x = uv 2 and y = u 3 v .
Solution. First, we calculate the partial derivatives,
∂f ∂ ∂f ∂
= (4x − y 2 ) = 4, = (4x − y 2 ) = −2y ,
∂x ∂x ∂y ∂y
∂x ∂ ∂y ∂ 3
= (uv 2 ) = v 2 , = (u v ) = 3u 2 v
∂u ∂u ∂u ∂u
∂x ∂ ∂y ∂ 3
= (uv 2 ) = 2uv , = (u v ) = u 3
∂v ∂v ∂v ∂v
and thus by Chain Rule,
∂z ∂f ∂x ∂f ∂y ∂z ∂f ∂x ∂f ∂y
= + = 4v 2 − 6u 5 v 2 , = + = 8uv − 2u 6 v 
∂u ∂x ∂u ∂y ∂u ∂v ∂x ∂v ∂y ∂v
Note: After solving x = φ(u, v ) and y = ψ(u, v ), we can write u = p(x, y ) and v =
q(x, y ). Therefore,
∂z ∂z ∂u ∂z ∂v ∂z ∂z ∂u ∂z ∂v
= + , = +
∂x ∂u ∂x ∂v ∂x ∂y ∂u ∂y ∂v ∂y
In case of three variables, if w = f (x, y , z), where x = φ(u, v ), y = ψ(u, v ), z = ξ(u, v ),
∂f ∂y ∂f ∂y
then ∂w
∂u
∂f ∂x
= ∂x ∂u
+ ∂y ∂u
+ ∂z∂f ∂z
∂u
and ∂w
∂v
∂f ∂x
= ∂x ∂v
+ ∂y ∂v
∂f ∂z
+ ∂z ∂v
.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 63 / 93
Chain Rule: Problems
1. If z = f (x, y ), where x = e 2u + e −2v and y = e −2u + e 2v , then show that
∂f ∂f ∂f ∂f
∂u
− ∂v = 2(x ∂x − y ∂y ). (H.W.)
2. If u = f (y − z, z − x, x − y ), then
√ x + uy + uz =
u (C.W.)
2 2 2
3. If f (x, y , z) = (x 2 + y 2 + z 2 )e − x +y +z , then evaluate ∂x ∂f ∂f ∂f
, ∂y and ∂z by using the
2 2 2 2
substitution x + y + z = r . (H.W)
4. If F and G have second order partial derivatives show that u(x, t) = F (x+at)+G (x−at)
2 2
satisfies the equation a2 ∂∂ 2 ux = ∂∂ 2ut . Also show that for η = x +at, ψ = x −at, this equation
∂2u
reduces to ∂η∂ξ
= 0. (H.W.)
x2 y2 z2
5. If u = u(x, y , z) satisfies a2 +u
+ b 2 +u
+ c 2 +u
= 1, then show that ux2 + uy2 + uz2 =
2(xux + yuy + zuz ) (H. W.)

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 64 / 93


Chain Rule: Implicit Functions
Derivative of Implicit Functions. The Chain Rule can be used to differentiate an im-
plicitly defined function. Let z = f (x, y ) be a differentiable function and the equation
f (x, y ) = 0 defines variable y implicitly as a differentiable function y = φ(x) of the
dz
variable x. As z = f (x, y ) = 0, we have dx = 0 which due to the Chain Rule yields,
dz ∂f dx ∂f dy ∂f ∂f dy
0= = + = +
dx ∂x dx ∂y dx ∂x ∂y dx
dy
and then solving for dx
, one obtains
∂f
dy
= − ∂x
∂f
(13)
dx ∂y
∂f
provided ∂y 6= 0.
Example. If x 2 + sin y − 2y = 0, then find dydx
.
Solution. Take f (x, y ) = x 2 + sin y − 2y and calculate
∂f ∂f
= 2x, = cos y − 2
∂x ∂y
and then use equation (13) to obtain
dy 2x
=
dx cos y − 2
which is the required result. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 65 / 93
Chain Rule: Implicit Functions
∂z
H.W. If z = f (x, y ) is implicitly defined by F (x, y , z) = 0, then show that ∂x
=
∂z
−Fx (x, y , z)/Fz (x, y , z) and ∂y = −Fy (x, y , z)/Fz (x, y , z).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 66 / 93


Jacobian
If u1 , u2 , ..., un are n functions of n variables x1 , x2 , ..., xn having first order partial deriva-
tives, then the determinant
∂u
1 ∂u1 ... ∂u1
∂x1 ∂x2 ∂xn

∂u2 ∂u2 ... ∂u2
∂x1 ∂x2 ∂xn

. .. .. ..
.
. . . .

∂un ∂un ∂un
∂x
1 ∂x 2
... ∂xn

is called the Jacobian of the functions u1 , u2 , ..., un with respect to x1 , x2 , ..., xn . It is


usually denoted by ∂(u 1 ,u2 ,...,un )
∂(x1 ,x2 ,...,xn )
or J( ux11 ,u 2 ,...,un
,x2 ,...,xn
).
For example, if x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ, then

∂x ∂x ∂x
∂r ∂θ ∂φ sin θ cos φ cos θ cos φ −r sin θ sin φ
∂(x, y , z)
= ∂r ∂θ ∂φ = sin θ sin φ r cos θ sin φ r sin θ cos φ = r 2 sin θ.
∂y ∂y ∂y
∂(r , θ φ) ∂z ∂z ∂z
∂r ∂θ ∂φ cos θ −r sin θ 0

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 67 / 93


Jacobian: Properties

1. Let f = f (x, y ), g = g (x, y ), where x = x(u, v ), y = y (u, v ). Then,


∂(f ,g )
∂(u,v )
= ∂(f ,g ) ∂(x,y )
.
∂(x,y ) ∂(u,v )
.
Proof:
∂f ∂y ∂f ∂y
∂f ∂f ∂x
∂f ∂x
∂x ∂f ∂x

∂(f , g ) ∂(x, y ) ∂u ∂v ∂x ∂u + ∂y ∂u ∂x ∂v +
∂x ∂y
∂y ∂v
. = ∂g ∂g = ∂g

∂(x, y ) ∂(u, v )

∂y ∂y ∂x + ∂g ∂y ∂g ∂x + ∂g ∂y
∂x ∂y ∂u ∂v ∂x ∂u ∂y ∂u ∂x ∂v ∂y ∂v
∂f ∂f

∂(f , g )

∂u ∂v
= = .
∂g ∂g ∂(u, v )
∂u ∂v

∂(f ,g ) ∂(x,y )
2. .
∂(x,y ) ∂(f ,g )
= 1. (H.W.)
3. Functional Dependence: Let u and v be two functions of x and y . The functions u
and v are said to be functionally dependent if, there is a function F such that F (u, v ) = 0
or v = f (u). [u and v are functionally dependent if and only if ∂(u,v )
∂(x,y )
= 0 for all x, y ].
∂v df ∂u ∂v df ∂u
Proof: If v = f (u), then we can write ∂x = du ∂x and ∂y = du ∂y which gives
∂u ∂u

vy ∂x ∂y
df
du
= ux = uy or ∂x ∂y − ∂x ∂y = 0 or ∂v ∂v = 0 = ∂(u,v
vx ∂v ∂u ∂u ∂v )
∂(x,y )
.

∂x ∂y

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 68 / 93


Jacobian
∂u ∂u


∂x ∂y ∂v ∂u ∂u ∂v
Conversely suppose that ∂v ∂v
= ∂x ∂y
− ∂x ∂y
= 0. (A)

∂x ∂y
Since u and v are functions of x and y , we can write v = G (u, x). We wish to show that
G (u, x) is free from x. Now ∂v
∂x
= ∂G ∂u
∂u ∂x
+ ∂G
∂x
and ∂v
∂y
= ∂G ∂u
∂u ∂y
.
Using it in (A), we have [ ∂G ∂u
∂u ∂x
+ ∂G ] ∂u − ∂G
∂x ∂y
∂u ∂u
∂u ∂y ∂x
∂u ∂G
= 0 or ∂y ∂x
= 0.
∂u
If ∂y = 0, then u is a function of x only. Therefore, v is a function of u only.
If ∂G
∂x
= 0, then G is a function of u only, that is, v is a function of u only.
4. If f1 (u1 , u2 , u3 , x1 , x2 , x3 ) = 0, f2 (u1 , u2 , u3 , x1 , x2 , x3 ) = 0, f3 (u1 , u2 , u3 , x1 , x2 , x3 ) = 0,
∂(u1 ,u2 ,u3 ) ∂(f1 ,f2 ,f3 )
then ∂(x1 ,x2 ,x3 ) ∂(u1 ,u2 ,u3 )
= (−1)3 ∂(f 1 ,f2 ,f3 )
∂x1 ,x2 ,x3
.(H.W.)
∂(u,v )
Example: 1. If x = u 2 /v , y = v 2 /u, then find ∂(x,y )
.
∂(x,y )
Here we can find easily.
∂(u,v )
−v 2

∂x ∂x 2u
∂(x,y ) ∂u ∂v v u2 ∂(u,v ) 1
∂(u,v )
= ∂y ∂y = 2 = 4 − 1 = 3. Hence, ∂(x,y )
= ∂(x,y ) = 1/3.
∂u ∂v −v2 2v ∂(u,v )
u u
2. Check whether u = xe y sin z, v = xe y cos z, w = x 2 e 2y are functionally dependent. If
yes, find a relation among them.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 69 / 93
Jacobians
We have

∂u ∂u ∂u y
xe y sin z xe y cos z

∂x ∂y ∂z e sin z
∂(u, v , w )
= ∂v ∂v ∂v y
= e cos z xe y cos z −xe y sin z = 0.

∂x ∂y ∂z
∂(x, y , z)
2xe 2y 2x 2 e 2y
∂w ∂w ∂w
0

∂x ∂y ∂z

Hence, u, v , w are functionally dependent. Also u 2 + v 2 = x 2 e 2y (sin2 z + cos 2 z) = w .


H.W.: If possible, find a relation among the functions: u = 3x +2y −z, v = x −2y +z, w =
x 2 + 2xy − xz.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 70 / 93


Taylor’s Theorem

Theorem (Lagrange Mean Value Theorem). Assume that a real valued function f (x)
is continuous on a closed interval [a, b] and is differentiable on the open interval (a, b).
Then, there exists a c ∈ (a, b) such that

df f (b) − f (a)
(c) = .
dx b−a

From the above Lagrange mean value theorem, for any x ∈ [a, b], for some c ∈ (a, x) (or
some θ ∈ (0, 1)), we have,
df df
f (x) = f (a) + (c)(x − a) = f (a) + (a + θ(x − a))(x − a) = f (a) + R1 (x)
dx dx
where
df df
R1 (x) = (c)(x − a) = (a + θ(x − a))(x − a)
dx dx
is called the remainder term. This result can be generalized for smooth functions to get
the following theorem.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 71 / 93


Taylor’s Theorem
Theorem (Taylor’s Theorem). Suppose that the function f : D ⊆ R → R has
2 n+1
df
continuous derivatives dx , ddx 2f , . . ., ddx n+1f for some n ∈ N in some neighbourhood U of a
point a ∈ D. Then, for any x ∈ U, we have
(x − a) df (x − a)2 d 2 f (x − a)n d n f
f (x) = f (a) + (a) + 2
(a) + · · · + (a) + Rn+1 (x)
1! dx 2! dx n! dx n
where the remainder (or error) term Rn+1 (x) is given by
(x − a)n+1 d n+1 f
Rn+1 (x) = (c), c ∈ (a, x)
(n + 1)! dx n+1
(x − a)n+1 d n+1 f
= (a + θ(x − a)), 0 < θ < 1.
(n + 1)! dx n+1
Proof. Not required. 
Note. If we replace x by a + h in the above theorem, then we have
h df h2 d 2 f hn d n f
f (a + h) = f (a) + (a) + 2
(a) + · · · + (a) + Rn+1 (h)
1! dx 2! dx n! dx n
with the remainder Rn+1 (h) given by,
hn+1 d n+1 f
Rn+1 (h) = (a + θh), 0 < θ < 1.
(n + 1)! dx n+1

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 72 / 93


Taylor’s Theorem

Below, we extend this theorem for functions of two variables.


Theorem (Taylor’s Theorem). Suppose that the function f : D ⊆ R2 → R has
continuous partial derivatives up to order n + 1 in some neighbourhood U of a point
(x0 , y0 ) ∈ D. Then, for any (x0 + h, y0 + k) ∈ U, we have,
 ∂ ∂  1 ∂ ∂ 2
f (x0 + h, y0 + k) =f (x0 , y0 ) + h +k f (x0 , y0 ) + h +k f (x0 , y0 )
∂x ∂y 2! ∂x ∂y
1 ∂ ∂ n
+ ··· + h +k f (x0 , y0 ) + Rn+1 (h, k)
n! ∂x ∂y
where the remainder term Rn+1 (h, k) is given by
1  ∂ ∂ n+1
Rn+1 (h, k) = h +k f (x0 + θh, y0 + θk), 0 < θ < 1.
(n + 1)! ∂x ∂y

Proof. Not required. 


The absolute maximum error of the approximation is |Rn+1 (h, k)| in the neighbourhood
of the point (x0 , y0 ).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 73 / 93


Taylor’s Theorem

If we take x = x0 + h and y = y0 + k, then


 ∂ ∂ 
f (x, y ) =f (x0 , y0 ) + (x − x0 ) + (y − y0 ) f (x0 , y0 )
∂x ∂y
1  ∂ ∂ 2
+ (x − x0 ) + (y − y0 ) f (x0 , y0 )
2! ∂x ∂y
1  ∂ ∂ n
+ ··· + (x − x0 ) + (y − y0 ) f (x0 , y0 ) + Rn+1 (x, y )
n! ∂x ∂y
with the remainder term Rn+1 (x, y ) is given by, for a 0 < θ < 1,
1  ∂ ∂ n+1
Rn+1 (x, y ) = (x − x0 ) + (y − y0 ) f (x0 + θ(x − x0 ), y0 + θ(y − y0 )).
(n + 1)! ∂x ∂y
If we take n = 1, then
∂f ∂f
f (x, y ) = f (x0 , y0 ) + (x − x0 ) (x0 , y0 ) + (y − y0 ) (x0 , y0 ) + R2 (x, y )
∂x ∂y

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 74 / 93


Taylor’s Theorem
where the remainder term R2 (x, y ) is given by,
1n ∂2f
R2 (x, y ) = (x − x0 )2 2 (x0 + θ(x − x0 ), y0 + θ(y − y0 ))
2 ∂x
∂2f
+ 2(x − x0 )(y − y0 ) (x0 + θ(x − x0 ), y0 + θ(y − y0 ))
∂x∂y
∂2f o
+ (y − y0 )2 2 (x0 + θ(x − x0 ), y0 + θ(y − y0 )) .
∂y
Linear Approximation. The linear approximation of f in the neighbourhood of the point
(x0 , y0 ) is given
∂f ∂f
f (x, y ) ≈ f (x0 , y0 ) + (x − x0 )(x0 , y0 ) + (y − y0 ) (x0 , y0 )
∂x ∂y
and the associated maximum absolute value of the error is given by
1n ∂2f
|R2 (x, y )| ≤ (x − x0 )2 2 (x0 + θ(x − x0 ), y0 + θ(y − y0 ))

2 ∂x
2
2 ∂ f

+ (y − y0 ) 2
(x0 + θ(x − x0 ), y0 + θ(y − y0 ))
∂y
∂2f o
+ 2|x − x0 ||y − y0 | (x0 + θ(x − x0 ), y0 + θ(y − y0 ))
∂x∂y
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 75 / 93
Taylor’s Theorem
B B 2
(x − x0 )2 + 2|x − x0 ||y − y0 | + (y − y0 )2 ≤

≤ |x − x0 | + |y − y0 |
2 2
∂ 2 f ∂ 2 f ∂ 2 f 
where B := max ∂x 2 , ∂x∂y , ∂x∂y
in the neighbourhood of the point (x0 , y0 ).
For n = 2, we have,
 ∂ ∂ 
f (x, y ) =f (x0 , y0 ) + (x − x0 ) + (y − y0 ) f (x0 , y0 )
∂x ∂y
1  ∂ ∂ 2
+ (x − x0 ) + (y − y0 ) f (x0 , y0 ) + R3 (x, y )
2! ∂x ∂y
∂f ∂f 1n ∂2f
=f (x0 , y0 ) + (x − x0 ) (x0 , y0 ) + (y − y0 ) (x0 , y0 ) + (x − x0 )2 2 (x0 , y0 )
∂x ∂y 2! ∂x
2 2
∂ f ∂ f o
+ 2(x − x0 )(y − y0 ) (x0 , y0 ) + (y − y0 )2 2 (x0 , y0 ) + R3 (x, y )
∂x∂y ∂y
with the remainder term R3 (x, y ) is given by, for a 0 < θ < 1,
1 ∂ ∂ 3
R3 (x,y ) = (x − x0 ) + (y − y0 ) f (x0 + θh, y0 + θk)
3! ∂x ∂y
1n ∂3f ∂3f
= (x − x0 )3 3 (x0 + θh, y0 + θk) + 3(x − x0 )2 (y − y0 ) 2 (x0 + θh, y0 + θk)
3! ∂x ∂x ∂y
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 76 / 93
Taylor’s Theorem
∂3f ∂3f o
+3(x − x0 )(y − y0 )2 2
(x0 + θh, y0 + θk) + (y − y0 )3 3 (x0 + θh, y0 + θk) .
∂x∂y ∂y
Quadratic (second degree) polynomial approximation. The quadratic (second degree)
polynomial approximation of the function f (x, y ) in the neighbourhood of a point (x0 , y0 )
is given by,
∂f ∂f 1 ∂2f
f (x, y ) ≈ f (x0 , y0 ) + (x − x0 ) (x0 , y0 ) + (y − y0 ) (x0 , y0 ) + (x − x0 )2 2 (x0 , y0 )
∂x ∂y 2 ∂x
∂2f 1 ∂2f
+ (x − x0 )(y − y0 ) (x0 , y0 ) + (y − y0 )2 2 (x0 , y0 )
∂x∂y 2 ∂y
with the associated maximum absolute error is given by,
1n ∂3f
|x − x0 |3 3 (x0 + θh, y0 + θk)

|R3 (x, y )| ≤
3! ∂x
∂3f
+ 3|x − x0 |2 |y − y0 | 2 (x0 + θh, y0 + θk)

∂x ∂y
∂3f
+ 3|x − x0 ||y − y0 |2

(x0 + θh, y0 + θk)
∂x∂y 2
∂3f o
+ |y − y0 |3 3 (x0 + θh, y0 + θk)
∂y
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 77 / 93
Taylor’s Theorem
B
|x − x0 |3 + +3|x − x0 |2 |y − y0 | + 3|x − x0 ||y − y0 |2 + |y − y0 |3

|R3 (x, y )| ≤
6
B 3
= |x − x0 | + |y − y0 |
6
∂ 3 f ∂ 3 f ∂ 3 f ∂ 3 f 
where B := max ∂x 3 , ∂x 2 ∂y , ∂x∂y 2 , ∂y 3
in the neighbourhood of the point (x0 , y0 ).
Example. Find the linear approximation of the function f (x, y ) = x 2 − xy + y 2 /2 + 3 at
a point (3, 2) and the associated maximum absolute error in the neighbourhood {(x, y ) :
|x − 3| < 0.1, |y − 2| < 0.2} of (3, 2).
Solution. Let us calculate,
f (3, 2) = 32 − 3 × 2 + 22 /2 + 3 = 8
∂f ∂f
(3, 2) = (2x − y )(3,2) = 4, (3, 2) = (−x + y )(3,2) = −1
∂x ∂y
which yields the linear approximation of f (x, y ) at (3, 2),
∂f ∂f
f (x, y ) ≈ f (x0 , y0 ) + (x0 , y0 )(x − x0 ) + (x0 , y0 )(y − y0 )
∂x ∂y
∂f ∂f
= f (3, 2) + (3, 2)(x − 3) + (3, 2)(y − 2)
∂x ∂y
= 8 + (4)(x − 3) + (−1)(y − 2) = 4x − y − 2.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 78 / 93


Taylor’s Theorem

Thus, the linearization of f at (3, 2) is f (x, y ) ≈ 4x − y − 2.


For maximum absolute error of this approximation, we obtain the partial derivatives,
∂2f ∂2f ∂2f ∂2f
2
= 2, 2
= 1, and = −1 =
∂x ∂y ∂x∂y ∂y ∂x
∂2f ∂2f ∂2f
which gives B = max{ ∂x 2 , ∂x∂y , ∂y 2 } = 2 and thus the maximum absolute error in
2
the given neighbourhood is B2 |x − x0 | + |y − y0 | < (0.1 + 0.2)2 = .09. 

Example. Find the quadratic approximation of the function f (x, y ) = x + y about the
point (1, 3). Also, estimate the maximum absolute error in the region {(x, y ) : |x − 1| <
0.2, |y − 3| < 0.1}.
Solution. We obtain,

f (1, 3) = 4 = 2,
∂f  1  1 ∂f 1
(1, 3) = √ = , (1, 3) =
∂x 2 x + y (1,3) 4 ∂y 4
∂2f 1 1
(1, 3) = − (x + y )−3/2 (1,3) = − 5 ,

∂x 2 4 2
∂2f 1 ∂2f 1
(1, 3) = − 5 , (1, 3) = − 5 .
∂x∂y 2 ∂y 2 2
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 79 / 93
Taylor’s Theorem

Thus, the quadratic approximation of f (x, y ) around the point (1, 3) is

∂f ∂f 1 ∂2f
f (x, y ) ≈ f (1, 3) + (x − 1) (1, 3) + (y − 3) (1, 3) + (x − 1)2 2 (1, 3)
∂x ∂y 2 ∂x
∂2f 1 ∂2f
+ (x − 1)(y − 3) + (y − 3)2 2 (1, 3)
∂x∂y 2 ∂y
1 1 1 1 1
=2 + (x − 1) + (y − 3) − 6 (x − 1)2 − 5 (x − 1)(y − 3) − 6 (y − 3)3 .
4 4 2 2 2
For the maximum absolute error associated with this approximation, we obtain,
∂3f 3 −5/2 ∂3f 3
= (x + y ) , = (x + y )−5/2 ,
∂x 3 8 ∂x∂y 2 8
∂3f 3 ∂3f 3
2
= (x + y )−5/2 , 3 = (x + y )−5/2 .
∂x ∂y 8 ∂y 8
Notice that in the given region 0.8 < x < 1.2 and 2.9 < y < 3.1, thus 3.7 < x + y < 4.3
∂ 3 f ∂ 3 f ∂ 3 f ∂ 3 f 
which gives B = max ∂x 3 , ∂x 2 ∂y , ∂x∂y 2 , ∂y 3
≤ 3 1 5/2 = 0.0142. Hence, the
8 (3.7)
3
maximum absolute error is R2 (x, y ) ≤ B6 |x − x0 | + |y − y0 | ≤ 0.0142 6
(0.1 + 0.2)3 =
0.0000639.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 80 / 93
Taylor’s Theorem

Theorem (Taylor’s Series). Suppose that a function f : D ⊆ R2 → R has continuous


partial derivatives of all orders in some neighbourhood U of a point (x0 , y0 ) ∈ D and that
Rn (h, k) → 0 as n → ∞. Then, for any (x0 + h, y0 + k) ∈ U, we have,
 ∂ ∂  1 ∂ ∂ 2
f (x0 + h, y0 + k) =f (x0 , y0 ) + h +k f (x0 , y0 ) + h +k f (x0 , y0 )
∂x ∂y 2! ∂x ∂y
1  ∂ ∂ n

+ ··· + h +k f (x0 , y0 ) + · · ·
n! ∂x ∂y

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 81 / 93


Maxima and Minima
To find the local maxima or minima of a function of one variable, we search for the points
where the graph has a horizontal tangent line. Then, we look for local maxima or local
minima or point of inflexion at such points. Similarly, for a function of two variables, we
search for points where the surface has a horizontal tangent plane and then we look for
local maxima or local minima or point of inflexion at these points.

Definition. A function f : D ⊆ R2 → R is said to have a local maximum (or minima)


value f (x0 , y0 ) at a point (x0 , y0 ) if f (x0 , y0 ) ≥ f (x, y ) (or f (x0 , y0 ) ≤ f (x, y )) holds for all
(x, y ) in an open disk centered at (x0 , y0 ). If f (x0 , y0 ) ≥ f (x, y ) (or f (x0 , y0 ) ≤ f (x, y ))
holds for all (x, y ) ∈ D, then (x0 , y0 ) is called the point of absolute maxima (or minima).

The mountain peaks and valley bottoms on a surface z = f (x, y ) are local maxima
and local minima respectively. At such points, tangent planes, if exist, are horizontal to
the surface. Local extrema are also known as relative extrema.

If f (x, y ) has maxima or minima at (x0 , y0 ), then the sign of f (x, y ) − f (x0 , y0 ) is in-
dependent of the choice of (x, y ) in a neighbourhood of (x0 , y0 ). This does not always
hold true.
Definition. The point (x0 , y0 ) is called a saddle point if the sign of f (x, y ) − f (x0 , y0 )
depends on the choice of (x, y ) in a neighbourhood of (x0 , y0 ). At a saddle point, the
function has neither maxima nor minima.
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 82 / 93
Maxima and Minima
Theorem (Necessary condition for f (x, y ) to have an extremum). If f (x, y ) has
∂f
relative extremum (maximum or minimum) at a point (x0 , y0 ) and partial derivatives ∂x
∂f
and ∂y exist at (x0 , y0 ), then
∂f ∂f
(x0 , y0 ) = (x0 , y0 ) = 0.
∂x ∂y
Proof. Assume g (x) = f (x, y0 ), then g (x) must have a relative extremum at x = x0 and
thus dg
dx
∂f
(x0 ) = 0, i.e., ∂x (x0 , y0 ) = 0. Similarly, h(y ) = f (x0 , y ) has relative extremum at
dh ∂f
y = y0 and thus dy (y0 ) = 0, i.e., ∂y (x0 , y0 ) = 0. 
∂f ∂f
Definition. A point (x0 , y0 ) where ∂x (x0 , y0 ) = 0 and ∂y (x0 , y0 ) = 0 is called a critical
point or a stationary point.
Theorem (Sufficient conditions for extrema). Let a function f (x, y ) and its first and
second order partial derivatives be continuous in a disk centered at (x0 , y0 ). Also, assume
∂f ∂f
that ∂x (x0 , y0 ) = ∂y (x0 , y0 ) = 0. Then,
(x0 , y0 ) is a point of relative maximum if rt − s 2 > 0 and r > 0,
(x0 , y0 ) is a point of relative minimum if rt − s 2 > 0 and r < 0,
no maximum or minimum of f can occur at (x0 , y0 ) i.e., (x0 , y0 ) is a saddle point,
further investigation is needed (using second order partial derivatives) if rt − s 2 = 0.
∂2f ∂2f ∂2f
where r = ∂x 2
(x0 , y0 ), s= ∂x∂y
(x0 , y0 ) and t = ∂y 2
(x0 , y0 ).
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 83 / 93
Maxima and Minima
∂f ∂f
Proof. As (x0 , y0 ) is a critical point, thus ∂x (x0 , y0 ) = ∂y
(x0 , y0 ) = 0. By ignoring the
higher order terns in Taylor series expansion, we have,

∆f = f (x0 + h, y0 + k) − f (x0 , y0 )
1  2 ∂2f ∂2f 2
2∂ f

= h (x0 , y0 ) + 2hk (x0 , y0 ) + k (x0 , y0 )
2 ∂x 2 ∂x∂y ∂y 2
1 2 2  1 2 2
h r + 2hkrs + k 2 rt

= h r + 2hks + k t =
2 2r
1
(hr + ks)2 + k 2 (rt − s 2 ) .

=
2r
Clearly, a sufficient condition for (hr + ks)2 + k 2 (rt − s 2 ) > 0 is rt − s 2 > 0. Thus,
if rt − s 2 > 0 and r > 0, then ∆f > 0 which gives relative minimum of f in the
neighbourhood of (x0 , y0 ). Similarly, when rt − s 2 > 0 and r < 0, then ∆f < 0 which
gives relative maximum of f in the neighbourhood of (x0 , y0 ).
If rt − s 2 < 0, then the sign of ∆f depends on h and k which means that no maximum
or minimum of f can occur at (x0 , y0 ).
Furthermore, if rt − s 2 = 0 i.e. r = t = s = 0, then no conclusion can be drawn and
further investigation is needed. 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 84 / 93


Maxima and Minima
Remark. In the above proof, we can also write
1
(hs + kt)2 + h2 (rt − s 2 ) .

∆f =
2t
Thus, a sufficient condition for a critical point (x0 , y0 )
to be a point of relative maximum is rt − s 2 > 0 and t < 0, and
to be a point of relative minimum is rt − s 2 > 0 and t > 0.
Hence, when an extremum exists, then rt − s 2 > 0 and r and t have same signs.
Example. Find the relative extrema and saddle points of f (x, y ) = 2x 2 + 2xy + y 2 − 2x −
2y + 5.
Solution. For critical points,
∂f ∂f
= 4x + 2y − 2 = 0, and = 2x + 2y − 2 = 0
∂x ∂y
which gives x = 0, y = 1. Thus (0, 1) is the only critical point. Further,

∂2f ∂2f ∂2f


r= (0, 1) = 4, t = (0, 1) = 2, s = (0, 1) = 2
∂x 2 ∂y 2 ∂x∂y

and rt − s 2 = 4. Hence, (0, 1) is a point of relative minimum as rt − s 2 > 0 and r > 0. 


C. Kumar (IIT Roorkee) Differential Calculus 2020-21 85 / 93
Maxima and Minima
Example. Find the local extrema and saddle points of the function f (x, y ) = x 4 + y 4 −
4xy + 1.
Solution. For critical points,
∂f ∂f
= 4x 3 − 4y = 0 and = 4y 3 − 4x = 0
∂x ∂y
which yields (x, y ) = (0, 0), (1, 1), (−1, −1). Further,

∂2f ∂2f ∂2f ∂2f


2
= 12x 2 , 2 = 12y 2 , and = −4 =
∂x ∂y ∂x∂y ∂y ∂x
and
∂2f ∂2f ∂2f
r= 2
(0, 0) = 0, t = 2
(0, 0) = 0, s = (0, 0) = −4, rt − s 2 = −16 < 0
∂x ∂y ∂x∂y
∂2f ∂2f
r= 2
(±1, ±1) = 12 > 0, t = (±1, ±1) = 12,
∂x ∂y 2
∂2f
s= (±1, ±1) = −4, rt − s 2 = 128 > 0.
∂x∂y
Thus, (0, 0) is a saddle point and (±1, ±1) are the points of minima and minimum value
of f is fmin = −1. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 86 / 93
Maxima and Minima
Example. Find the local extrema and saddle points of the function f (x, y ) = x 4 +y 2 +x 2 y .
Solution. For critical points,
∂f ∂f
= 4x 3 + 2xy = 0 and = 2y + x 2 = 0
∂x ∂y
which on solving gives (0, 0) as the critical point. Further,

∂2f ∂2f ∂2f


r= 2
(0, 0) = (12x 2 + 2y )(0,0) = 0, t = 2
(0, 0) = 2, s = (0, 0) = (2x)(0,0) = 0
∂x ∂y ∂x∂y

and thus rt − s 2 = 0. Thus, further investigation is needed to identify the nature of the
point (0, 0). Now, consider,

x4 x2 3 x2 2 3
f (x, y ) − f (0, 0) = + y2 + 2 y + x4 = + y + x4 > 0
4 2 4 2 4
for all (x, y ) in the neighbourhood of (0, 0). Thus, f has minima at (0, 0). 
Exercise. Show that f (x, y ) = x 4 + y 4 − 2x 2 + 4xy − 2y 2 has saddle point at (0, 0).
Exercise. Find the points on the surface z 2 = xy + 1 which is nearest to the origin.
Theorem (Extreme Value Theorem). A function f (x, y ) attains its absolute maximum
and absolute minimum on any closed and bounded set where it is continuous.
Proof. Proof not required. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 87 / 93
Maxima and Minima
Procedure for finding absolute extrema. Let f (x, y ) be a continuous function on closed
and bounded set S.
Identify all critical points of f on S.
Identify all boundary points of S where f can have extrema.
Calculate the values of f at all points identified in the above two steps. The largest
value of f gives the point of absolute maximum and the smallest value of f gives
the point of absolute minimum.
Example. Discuss the absolute extrema of f (x, y ) = 6x 2 − 8x + 2y 2 − 5 on the closed
and bounded region S := {(x, y ) : x 2 + y 2 ≤ 1}.
Solution. For the critical points in the interior {(x, y ) : x 2 + y 2 < 1} of the region S, we
calculate
∂f ∂f
= 12x − 8 = 0, = 4y = 0
∂x ∂y
which gives (x, y ) = (2/3, 0). Clearly, (2/3, 0) lies inside S. On the boundary x 2 + y 2 = 1
of S, we have f (x, y ) = 6x 2 − 8x + 2(1 − x 2 ) − 5 = 4x 2 − 8x − 3 = g (x). For extrema
2
of g , we calculate, dg
dx
= 8x − 8 = 0, i.e. x = 1 and ddx g2 = 8 > 0. Thus, at x = 1,
g attains its minimum which implies f (x, y ) attains its minimum at (1, 0). Further,
f (2/3, 0) = −23/2, f (1, 0) = −7 and f (−1, 0) = 9. Thus, absolute maximum is 9 at
(−1, 0) and absolute minimum is −23/2 at (2/3, 0). 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 88 / 93
Maxima and Minima
Exercise. Find the absolute maximum and minimum values of f (x, y ) = 4x 2 + 9y 2 −
8x − 12y + 4 on the rectangular region bounded by lines x = 2, y = 3 and the coordinate
axis.
Theorem (Lagrange’s Theorem). Let us assume that the functions f (x, y ) and g (x, y )
have continuous first order partial derivatives and (x0 , y0 ) is an extremum of f (x, y )
on the curve g (x, y ) = c. If ∇g (x0 , y0 ) 6= 0, then there is a number λ such that
∇f (x0 , y0 ) = λg (x0 , y0 ).
Proof. Not required. 
Procedure for the method of Lagrange’s multipliers. To find the extreme value of
z = f (x, y ) given the constraint g (x, y ) = c, we adopt the following steps,
solve the following three equations for x, y and λ,
∂f ∂g ∂f ∂g
(x, y ) = λ (x, y ), (x, y ) = λ (x, y ), g (x, y ) = c,
∂x ∂x ∂y ∂y

find the values of f at all points obtained above and on the boundary of the constraint
and hence identify the extremum.
Example. Using the method of Lagrange multiplier, find the extreme values of the
function f (x, y ) = 1 − x 2 − y 2 subject to a constraint x + y = 1 with x ≥ 0 and
y ≥ 0.

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 89 / 93


Maxima and Minima
Solution. Let g (x, y ) = x + y and calculate,
∂f ∂f ∂g ∂g
= −2x, = −2y , = 1, =1
∂x ∂y ∂x ∂y
which yields the following system,
∂f ∂g
(x, y ) = λ (x, y ) =⇒ −2x = λ
∂x ∂x
∂f ∂g
(x, y ) = λ (x, y ) =⇒ −2xy = λ
∂x ∂x
g (x, y ) = c =⇒ x + y = 1.

The solution of the above system is x = 1/2, y = 1/2. Further, the endpoints of the line
segment x + y = 1 with x ≥ 0 and y ≥ 0 are (1, 0) and (0, 1). Also, f (1/2, 1/2) = 1/2,
f (1, 0) = 0 and f (0, 1) = 0. Thus, the maximum value is 1/2 which occurs at (1/2, 1/2)
and minimum value is 0 which occurs at (1, 0) and (0, 1). 

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 90 / 93


Maxima and Minima
Example. Find the maximum value of a rectangular box with sides parallel to the coor-
2 2 2
dinate planes that can be inscribed in the ellipsoid xa2 + yb2 + cz 2 = 1, a > 0, b > 0 and
c > 0.
Solution. Let the sides of rectangular box be 2x, 2y and 2z so that its volume is
V (x, y , z) = 8xyz. We want to find the maximum value of
V (x, y , z) = 8xyz
subject to the constraint
x2 y2 z2
g (x, y , z) = 2
+ 2 + 2 − 1.
a b c
For this, we find,
∂V ∂g 2λx
=λ =⇒ 8yz =
∂x ∂x a2
∂V ∂g 2λy
=λ =⇒ 8xz =
∂y ∂y b2
∂V ∂g 2λz
=λ =⇒ 8xy =
∂z ∂z c2
2 2 2 √
which implies 24xyz = 2λ xa2 + yb2 + cz 2 =⇒ λ = 3V
. This also gives x = ±a/ 3,
√ √ 2
y = ±b/ 3, and z = ±c/ 3. 
C. Kumar (IIT Roorkee) Differential Calculus 2020-21 91 / 93
Maxima and Minima
Example. Find the points on the curve of intersection of x 2 − xy + y 2 − z 2 = 1 and
x 2 + y 2 = 1 which are nearest to and farthest from the origin.
Solution.
p Let P(x, y , z) be a point on the curve, then its distance from the origin, i.e.
OP= x 2 + y 2 + z 2 is maximum or minimum according as x 2 + y 2 + z 2 is maximum or
minimum. Thus, we want to find the maximum or minimum of the function

f (x, y , z) = x 2 + y 2 + z 2

subject to the constraints g (x, y , z) = x 2 + y 2 + z 2 = 1 and h(x, y , z) = x 2 + y 2 = 1. By


using Lagrange’s multiplier method,
∂f ∂g ∂h
= λ1 + λ2 =⇒ 2x = λ1 (2x − y ) + 2xλ2 (14)
∂x ∂x ∂x
∂f ∂g ∂h
= λ1 + λ2 =⇒ 2y = λ1 (2y − x) + 2y λ2 (15)
∂y ∂y ∂y
∂f ∂g ∂h
= λ1 + λ2 =⇒ 2z = λ1 (−2z) + 0.λ2 . (16)
∂z ∂z ∂z
Equation (16) gives z = 0 and λ1 = −1. For z = 0, x 2 + y 2 = 1 and x 2 + y 2 − xy =
1 =⇒ xy = 0 =⇒ x = 0 or y = 0. If x = 0 and z = 0, then y = ±1.If z = 0 and
y = 0, then x = ±1. Thus, points are (0, 1, 0), (0, −1, 0), (1, 0, 0) and (−1, 0, 0).

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 92 / 93


Maxima and Minima
For λ1 = −1, equations (14), (15) and (16) give 2(x 2 + y 2 + z 2 ) = 2λ1 (x 2 + y 2 − z 2 ) −
2λ1 (xy ) + 2λ2 (x 2 + y 2 ) =⇒ 2f = −2(xy + 1) + 2xy + 2λ2 =⇒ f = −1 + λ2 =⇒
λ2 = 1 + f . Further, from equations (15) and (16), 2(x 2 + y 2 ) = −2(x 2 + y 2 ) + 2xy +
2λ2 (x 2 + y 2 ) =⇒ 2 = −2 + 2xy + 2λ2 =⇒ 2 = xy + f + 1 =⇒ xy = 1 − f . Also,
equations (15) and (16), 2x = −(2x − y ) + 2x(1 + f ) =⇒ 2xf − 2x + y = 0 and
2y = −(2y − x) + 2y (1 + f ) =⇒ 2yf − 2y + x = 0. This yields 2(x + y )f − (x + y ) =
2
0 =⇒ √ (x + y )(2f − 1)√= 0 =⇒ 2 f = 1/2 or x = −y . Thus, 2x√ = 1 =⇒ x =
±1/ 2 √ =⇒ y √ = ∓1/ √ 2 =⇒ √ z = −xy √ = 1/2 √ =⇒ z √ = ±1/ √ 2. Thus,
√ points
are (±1/ 2, ∓1/ 2, ±1/ 2), (1/ 2, −1/ 2, ±1/ 2), (−1/ 2, 1/ 2, ±1/ 2). Now,
f (x, y , z) = OP 2 = x 2 + y 2 + z 2 = 1/2 + 1/2 + 1/2 = 3/2 (maximum). At (0, ±1, 0) and
(±1, 0, 0), f (x, y , z) = 1 (minimum).
√ nearest points are (0, ±1, 0) and (±1, 0, 0)
√Hence, √
and farthest points are (±1/ 2, ∓1/ 2, ±1/ 2).
Exercise. Find maximum or minimum of x 2 +y 2 +z 2 subject to the condition ax+by +cz =
p.
Exercise. Find extrema of u = 2x + 3y + z subject to x 2 + y 2 = 5, and x + z = 1.
Exercise. Show that extreme values of u = x 2 + y 2 + z 2 subject to ax 2 + by 2 + cz 2 = 1
and lx + my + nz = 0 are given by

l2 m2 n2
+ + = 0.
a4 − 1 b4 − 1 c4 − 1

C. Kumar (IIT Roorkee) Differential Calculus 2020-21 93 / 93

You might also like