Unit 1: Partial Differentiation
Dr. Deepika
VIPS-TC, College of Engineering
1 / 42
Function of two variables
A function f of two independent variable, associates each ordered pair
in its domain one and only one real number. It can be denoted as a
symbol z = f (x, y ). Here z is dependent variable and x, y are
independent variables
Figure: Functions of two variables 2 / 42
First order partial derivative
The first order partial derivative of the function f (x, y ) with respect
to x at the point (x, y ) is defined by
∂f f (x+h,y )−f (x,y )
∂x = Limh→
−0 h , provided the limit exists.
∂f f (x,y +h)−f (x,y )
Similarly, ∂y = Limh→
−0 h
∂f ∂f
Symbols: ∂x = fx , ∂y = fy
3 / 42
Geometrical representation
Figure: Geometrical representation of partial derivatives
4 / 42
To get partial derivatives...
To get partial derivative fx of a function f (x, y ), we assume y as a
constant and differentiate with respect to x.
Similarly, to get partial derivative fy , we assume y as a constant and
differentiate with respect to y .
Examples: The first order partial derivatives of the following:
• f (x, y ) = x 3 + y 3 − 3axy ,
fx = 3x 2 − 3ay .1 = 3x 2 − 3ay ,
fy = 3y 2 − 3ax.1 = 3y 2 − 3ax.
2
• f (x, y ) = e xy +y ,
2 2
fx = e xy +y (1.y 2 + 0) = y 2 e xy +y ,
2 2
fy = e xy +y (x.2y + 1) = (2xy + 1)e xy +y .
5 / 42
Second order partial derivatives
Second order partial derivatives of the function f (x, y ) can be seen as:
∂2f ∂ ∂f
• fxx = ∂x 2
= ∂x ∂x
2
∂ f ∂ ∂f
• fyx = ∂y ∂x = ∂y ∂x
∂2f ∂ ∂f
• fxy = ∂x∂y = ∂x ∂y
∂2f ∂ ∂f
• fyy = ∂y 2
= ∂y ∂y .
Sometime we use the following notations:
∂f ∂f ∂2f ∂2f ∂2f
∂x = p, ∂y = q, ∂x 2
= r, ∂x∂y = s, ∂y 2
=t
6 / 42
Problems
Solve the following problems:
∂2f ∂2f
• If u = x 2 tan−1 ( yx ) − y 2 tan−1 ( yx ). Then prove that ∂x∂y = ∂y ∂x
r2
• If θ = t n e − 4t , For what value of n will make 1 ∂
r 2 ∂θ ∂θ
r 2 ∂r ∂r = ∂t ?
1
∂2v ∂2v ∂2v
• If v = (x 2 + y 2 + z 2 )− 2 , prove that ∂x 2
+ ∂y 2
+ ∂z 2
=0
• If u = log (x 3 + y 3 + z 3 − 3xyz), show that
2
∂
∂x + ∂
∂y + ∂
∂z u = (x+y−9+z)2
∂2z
• If x x y y z z = c, show that at x = y = z, ∂x∂y = −(x log ex)−1
7 / 42
Problems
8 / 42
Chain rule
• If u = f (x, y ) with x = φ(t) and y = ψ(t), then we can express u as a
function of t. The ordinary derivative du
dt , called total derivative can be
computed without putting the value of x and y in f (x, y ).
du ∂u dx ∂u dy
= + (1)
dt ∂x dt ∂y dt
• observation: If u = f (x, y , z), where x, y , z are the functions of t, then
du ∂u dx ∂u dy ∂u dz
= + + (2)
dt ∂x dt ∂y dt ∂z dt
9 / 42
Example
dz
• If z = u 2 + v 2 and u = at 2 , v = 2at, Find dt .
Solution: We can easily compute
∂z ∂z
∂u = 2u, ∂v = 2v ,
du dv
dt = 2at, dt = 2a,
Using equation 1, we can find
dz
dt = 2u(2at) + 2v (2a) = 2(at 2 )(2at) + 2(2at)(2a), implies
dz
dt = 4a2 t 3 + 8a2 t
10 / 42
Differentiation of Implicit function
• If f (x, y ) = c, is an implicit relation between x and y which defines as a
differentiable function of x, then
df ∂f ∂f dy
= + (3)
dx ∂x ∂y dx
which gives an important formula
∂f
dy
= − ∂x
∂f
(4)
dx ∂y
11 / 42
Example:
du
• If u = x log(xy ), where x 3 + y 3 + 3xy = 1, find dx .
Solution: We know
du ∂u ∂u dy
= + (5)
dx ∂x ∂y dx
From f (x, y ) = x 3 + y 3 + 3xy − 1, we can find
∂f
dy 3x 2 + 3y x2 + y
= − ∂x
∂f
= − = − (6)
dx ∂y
3y 2 + 3x y2 + x
2
Therefore, du
dx = (1. log(xy ) + x.1/x) + (x/y )(− yx 2 +y
+x
),
du x(x 2 +y )
gives dx = 1 + log(xy ) − y (y 2 +x)
.
12 / 42
Total differential
Let z = f (x, y ). If δx and δy are the small increments in x and y
respectively, let z be the corresponding increment in z, then
z + δz = f (x + δx, y + δy ) (7)
which gives
f (x + δx, y + δy ) − f (x, y + δy ) f (x, y + δy ) − f (x, y )
δz = δx + δy (8)
δx δy
On taking limit when δx → 0 and δy → 0, we get,
∂f ∂f
dz = dx + dy (9)
∂x ∂y
dz is called the total differential or exact differential of z.
13 / 42
Problems
• If u = f (x 2 + 2yz, y 2 + 2xz), prove that
(y 2 − xz) ∂u 2 ∂u 2 ∂u
∂x + (x − yz) ∂y + (z − xy ) ∂z = 0
14 / 42
Problems
15 / 42
Problems
• If u = f (e y −z , e z−x , e x−y ), then prove that
∂u ∂u ∂u
∂x + ∂y + ∂z =0
16 / 42
Change of variables
If u = f (x, y ), where x = φ(s, t) and y = ψ(s, t). The necessary formulae
to change the variables are easily obtained.
∂u ∂u ∂x ∂u ∂y
= + (10)
∂s ∂x ∂s ∂y ∂s
∂u ∂u ∂x ∂u ∂y
= + (11)
∂t ∂x ∂t ∂y ∂t
If s and t are given as a function of x and y , say: s = ξ(x, y ) and
t = η(x, y ), then it is easier to use the formula:
∂u ∂u ∂s ∂u ∂t
= + (12)
∂x ∂s ∂x ∂t ∂x
∂u ∂u ∂s ∂u ∂t
= + (13)
∂y ∂s ∂y ∂t ∂y
17 / 42
Problems
• Let w = 4x 2 + 4y 2 + z 2 whose x = ρsinφcosθ, y = ρsinφsinθ,
x = ρcosφ. Find ∂w
∂ρ using chain rule.
18 / 42
Problems
• If z = f (x, y ) where x = e u cos(v ) and y = e u sin(v ), show that
∂z ∂z ∂z
(i) y +x = e 2u (14)
∂x ∂y ∂y
2 2 " 2 #
∂z ∂z −2u ∂z 2 ∂z
(ii) + =e + (15)
∂x ∂y ∂u ∂v
19 / 42
Problems
20 / 42
Problems
∂2u ∂2u
• Transform the equation ∂x 2
+ ∂y 2
= 0 into polar coordinates.
21 / 42
Problems
22 / 42
Problems
• If u = f (r ) and x = r cos(θ), y = r sin(θ) prove that
∂2u ∂2u 00 0
∂x 2
+ ∂y 2
= f (r ) + 1r f (r ).
23 / 42
Problems
24 / 42
Maxima and Minima
Definition: The Maxima of a function is the highest value that it reaches
over a closed interval.
Similarly, The Minima of a function is the lowest value that it reaches over
a closed interval.
Figure: Maxima and Minima 25 / 42
Stationary points
Stationary points of a curve are the points of maxima, minima and point
of inflection. At the point of inflection, the curve changes its
concavity(sign of curvature).
26 / 42
Maxima and Minima for function of two variables
A function z = f (x, y ) is said to have a maximum or minimum at point
(a, b), according as f (a + h, b + k) > or < f (a, b), for all positive or
negative small values of h and k.
27 / 42
Saddle point
28 / 42
Working rule to find Maxima and Minima...
• Stationary points: A point (a, b) of a function z = f (x, y ) is said to be
stationary point if fx (a, b) = 0 and fy (a, b) = 0 i.e. the function is
stationary at (a, b).
• To find Maxima and Minima...
1. Find the pair values (a,b) by solving the simultaneous equations fx = 0
and fy = 0 for x and y .
2. Calculate the values of r = fxx , s = fxy and t = fyy for each pair of
values.
3. (i) If rt − s 2 > 0 and r < 0 at (a, b), then f (a, b) is a max. value.
(ii) If rt − s 2 > 0 and r > 0 at (a, b), then f (a, b) is a min. value.
(iii) If rt − s 2 < 0 at (a, b), then (a, b, f (a, b)) is a saddle point.
(iv) If rt − s 2 = 0 at (a, b), needs further investigation.
Have a look on the book:
MCC: MTH 212 CALCULUS III
29 / 42
Problems
Compute the extrema of
z = f (x, y ) = x 2 + y 2 .
We have, fx = 2x = 0 and
fy = 2y = 0.
(0, 0, 0) is the stationary point of
f (x, y ) ,
and fxx = fyy = 2 and fxy = 0, so
fxx fyy − fxy2 = 2 > 0, fxx > 0.
Therefore (0, 0, 0) is the point of
Minima for f (x, y ).
30 / 42
Problems
Compute the extrema
p of
z = g (x, y ) = 9 − x − y 2 .
2
−x
We have, gx = √ = 0 and
9−x 2 −y 2
−y
gy = √ = 0.
9−x 2 −y 2
The stationary point is (0, 0, 0),
and at this stationary point
−x 2 √ 1
r= 3 − 2 2
= − 31 ,
(9−x 2 −y 2 ) 2 9−x −y
−y 2 √ 1
t= 3 − = − 31
(9−x 2 −y 2 ) 2 9−x 2 −y 2
−xy
and s = 3 = 0, so
(9−x 2 −y 2 ) 2
rt − s = 19 > 0, r <
2 0.
Therefore (0, 0, 0) is the point of
Maxima for z = g (x, y ).
31 / 42
Problems
Compute the extrema of
z = h(x, y ) = x 2 − y 2 .
We have, hx = 2x = 0 and
hy = −2y = 0.
(0, 0, 0) is the stationary point of
z = h(x, y ), and at this point
r = hxx = 2, t = hyy = −2 and
s = hxy = 0, so
2 = −4 < 0.
hxx hyy − hxy
Therefore (0, 0, 0) is the saddle
point for z = x 2 − y 2 .
Figure: z = x 2 − y 2
32 / 42
Problems
• Discuss the maxima and minima of f (x, y ) = x 3 y 2 (1 − x − y ).
• In a plane triangle, find the maximum value of cos(A) cos(B) cos(C ).
a3 a3
• Find the maximum and minimum values of xy + x + y .
• Discuss the extreme values for the function:
f (x, y ) = x 4 + y 4 − 2x 2 + 4xy − 2y 2 .
• Discuss the maxima and minima of the function
f (x, y ) = x 3 + 3xy 2 − 15x 2 − 15y 2 + 72x
33 / 42
Lagrange’s Method of undetermined multipliers
• The method of Lagrange multipliers is the economist’s workhorse for
solving optimization problems and optimization is also critical step in
Machine Learning.
• Lagrange Multiplier is used to find the stationary values of a function of
several variables which are not all independent but are connected by some
constraints.
• Suppose we want to optimize the cost function or loss function f (x, y , z)
subject to the constraint φ(x, y , z) = 0.
∂f ∂f ∂f
Since, at the stationary on f (x, y , z), ∂x = 0, ∂y = 0, ∂z = 0, which gives
df = 0. Also, we have dφ = 0.
34 / 42
Lagrange’s Method of undetermined multipliers
Now we need to find the values of λ for which
d(f (x, y , z) + λφ(x, y , z)) = 0 i.e. df + λdφ = 0 implies,
∂f ∂f ∂f ∂φ ∂φ ∂φ
∂x dx + ∂y dy + ∂z dz + λ ∂x dx + ∂y dy + ∂z dz = 0,
implies
∂f
∂x + λ ∂φ
∂x dx + ∂f
∂y + λ ∂φ
∂y dy + ∂f
∂y + λ ∂φ
∂y dz = 0
which would be true if
∂f
∂x + λ ∂φ
∂x = 0,
∂f
∂y + λ ∂φ
∂y = 0,
∂f
∂y + λ ∂φ
∂y = 0
These three equations together with φ(x, y , z) = 0 will determine the
values of x, y , z and λ for which f (x, y , z) is stationary.
35 / 42
Working rule of Lagrange multiplier Method
1) L(x, y , z) = f (x, y , z) + λφ(x, y , z)
∂L ∂L ∂L
2) Obtain the equations ∂x = 0, ∂y = 0, ∂z = 0.
3) Solve the equations together with φ(x, y , z) = 0.
The values of x, y , z so obtained will give the stationary value of f (x, y , z).
36 / 42
Problems
Let’s maximize f (x, y , z) = x + y + z subject to the condition
x 2 + y 2 + z 2 = 12 (16)
L(x, y , z) = (x + y + z) + λ(x 2 + y 2 + z 2 − 12),
∂L ∂L ∂L
∂x = 1 + 2λx = 0, ∂y = 1 + 2λy = 0, ∂z = 1 + 2λz = 0, which gives
1
x =y =z =− (17)
2λ
Combining (16) and (17), we can find λ = ± 14 , gives x = y = z = ±2.
Therefore f (2, 2, 2, ) = 6 and f (−2, −2, −2) = −6, we realize the
maximum value of f (x, y , z) is 6 and minimum value is −6.
37 / 42
Problems
1. Find the area of the greatest rectangle that can be inscribed in an
2 2
ellipse xa2 + yb2 = 1.
2. Find the maximum and minimum distances of the point (3, 4, 12) from
the sphere x 2 + y 2 + z 2 = 12.
3. The sum of three numbers is constant. Prove that their product is
maximum if they are equal.
4. Find the dimensions of the rectangular box of maximum capacity whose
surface area is given when (a) box is open at the top (b) box is closed.
5. Show that the rectangular solid of the maximum volume that can be
inscribed in a sphere is a cube.
6. Find the volume of the greatest rectangular parallelopiped that can be
2 2 2
inscribed in the ellipsoid xa2 + yb2 + cz 2 = 1..
38 / 42
Differentiation under the integral sign
Rb
Let’s consider F (α) = a f (x, α)dx. To find the derivative of F (α),
sometime it is not possible to first evaluate the integral and then to find
derivative. Such problems are solved by Leibnitz’s Rule defined as:
∂f (x,α)
1. If f (x, α) and ∂α be continuous functions of x and α, then
hR i
d b ∂f (x,α)
dα a f (x, α)dx = ∂α dx.
where a, b are constants independent of α.
2. For the variable limits of integration,
hR i
d ψ(α) R ψ(α) ∂f (x,α) dψ dφ
dα φ(α) f (x, α)dx = φ(α) ∂α dx + dα f [ψ(α), α] − dα f [φ(α), α].
provided φ(α) and ψ(α) possesses continuous first order derivatives w .r .t.
α.
39 / 42
Problems
x α −1
R1
Evaluate 0 log x dx, α ≥ 0.
R1 α h α i
Solution: Let F (α) = 0 xlog−1 0 (α) = 1 ∂ x −1
R
x dx, then F 0 ∂α log x dx.
R1 α R1 α+1 1
So, F 0 (α) = 0 x loglogx x dx == 0 x α dx = xα+1 = 1+α
1
.
0
Now, integrating w .r .t. α, we get F (α) = log(1 + α) + c which gives
F (0) = log(1) + c = c.
Also, from given equation, we can find F (0) = 0, implies c = 0.
R1 α
Therefore, F (α) = 0 xlog−1
x dx = log(1 + α).
Remark: Leibnitz’s Rule enables us to derive the value of some definite
integrals which may otherwise be difficult, or even impossible to evaluate.
40 / 42
Problems
Rπ dx
Rπ
1. Given that = √ π , evaluate dx
0 a−cos x a2 −1 0 (a−cos x)2 .
R∞
e −ax . sin(x) −1 1 . Hence show that
2. Prove that 0 x dx = tan a
R ∞ sin(x) π
0 x dx = 2
h ax
i
Hint: e ax cos(bx)dx = a2e+b2 [a cos(bx) + b sin(bx)]
R
Rπ
3. Prove that 02 log(α2 cos 2 θ + β 2 sin2 θ)dθ = π log α+β2 .
Rα log(1+αx)
4. Evaluate 0 1+x 2
dx and hence show that
R1 log(1+x) π
0 1+x 2
dx = 8 log 2
41 / 42
Jocobian (Definition)
• If u and v are the functions of x and y , then the determinant
∂u ∂u
∂x ∂y
A = ∂v is called the Jacobian of of u and v with respect to x and
∂x ∂v∂y
∂(u,v )
y and is denoted by ∂(x,y ) or J(u, v ).
• If u, v , w are the
functions of x, y and z, then the determinant
∂u ∂u ∂u
∂x ∂y ∂z
∂v ∂v ∂v ∂(u,v ,z)
∂x ∂y ∂z = ∂(x,y ,z) = J(u, v , w )
∂w ∂w ∂w
∂x ∂y ∂z
• Observation: Similarly, J(u1 , u2 , ..., un ) can be defined for u1 , u2 , ..., un
as a functions of x1 , x2 , ..., xn .
42 / 42