Differetial Calculus PDF
Differetial Calculus PDF
Chaman Kumar
2020-21
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.
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.
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 θ.
lim f (x1 , . . . , xn ) = L.
(x1 ,...,xn )→(x10 ,...xn0 )
(a) lim cf (x, y ) = cL1 , for any constant c. (constant multiple rule)
(x,y )→(x0 ,y0 )
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
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
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.
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
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
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
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.
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
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
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
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.
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)
∂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)
∂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}.
∂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 |.
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)
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
The derivatives fxy and fyx are called the second order mixed 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
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 ).
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
∂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.
∆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 ).
∂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
∆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 .
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).
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
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 ).
Consider
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 ).
f (λx, λy ) = λn f (x, y )
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
∂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
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.
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,
xfx + yfy = 2f ,
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.
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
∂(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
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.
∂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
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.
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.
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).
f (x, y , z) = x 2 + y 2 + z 2
l2 m2 n2
+ + = 0.
a4 − 1 b4 − 1 c4 − 1