Chapter 4 Functions of Several Variables
Chapter 4 Functions of Several Variables
Partial Derivatives:
Partial derivatives are the derivatives we get when we hold constant all but one of
the independent variable in a function and differentiate with respect to that one.
𝝏𝒇 𝒇(𝒙𝒐 + 𝒉, 𝒚𝒐 ) − 𝒇(𝒙𝒐 , 𝒚𝒐 )
| = 𝐥𝐢𝐦
𝝏𝒙 (𝒙𝒐 ,𝒚𝒐 ) 𝒉→𝟎 𝒉
1
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
The slope of the curve 𝒛 = 𝒇(𝒙, 𝒚𝒐 ) at the point 𝑷(𝒙𝒐 , 𝒚𝒐 , 𝒇(𝒙𝒐 , 𝒚𝒐 )) in the plane
𝒚 = 𝒚𝒐 is the value of the partial derivative of f with respect to x at (𝒙𝒐 , 𝒚𝒐 ). The tangent
line to the curve at P is the line in the plane 𝒚 = 𝒚𝒐 that passes through P with this slope.
The partial derivative 𝝏𝒇⁄𝝏𝒙 at (𝒙𝒐 , 𝒚𝒐 ) gives the rate of change of f with respect to x when
y is held fixed at the value 𝒚𝒐 . This is the rate of change of f in the direction of i at (𝒙𝒐 , 𝒚𝒐 ).
The notation for a partial derivative depends on what we want to emphasize:
𝝏𝒇
(𝒙𝒐 , 𝒚𝒐 ) or 𝒇𝒙 (𝒙𝒐 , 𝒚𝒐 ) “Partial derivative of f with respect to x at (𝒙𝒐 , 𝒚𝒐 )” or “f
𝝏𝒙
sub x at (𝒙𝒐 , 𝒚𝒐 ) ”. Convenient for stressing the point
(𝒙𝒐 , 𝒚𝒐 ).
The definition of the partial derivative of 𝒇(𝒙, 𝒚) with respect to y at a point (𝒙𝒐 , 𝒚𝒐 )
is similar to the definition of the partial derivative of f with respect to x. We hold x fixed at
the value 𝒙𝒐 and take the ordinary derivative of 𝒇(𝒙𝒐 , 𝒚) with respect to y at 𝒚𝒐 .
𝝏𝒇 𝒅 𝒇(𝒙𝒐 , 𝒚𝒐 + 𝒉) − 𝒇(𝒙𝒐 , 𝒚𝒐 )
| = 𝒇(𝒙𝒐 , 𝒚)| = 𝐥𝐢𝐦
𝝏𝒚 (𝒙 𝒅𝒚 𝒉→𝟎 𝒉
𝒐 ,𝒚𝒐 ) 𝒚=𝒚 𝒐
2
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
The slope of the curve 𝒛 = 𝒇(𝒙𝒐 , 𝒚) at the point 𝑷(𝒙𝒐 , 𝒚𝒐 , 𝒇(𝒙𝒐 , 𝒚𝒐 )) in the vertical
plane 𝒙 = 𝒙𝒐 (Figure 4.1) is the partial derivative of f with respect to y at (𝒙𝒐 , 𝒚𝒐 ) . The
tangent line to the curve at P is the line in the plane 𝒙 = 𝒙𝒐 that passes through P with this
slope. The partial derivative gives the rate of change of f with respect to y at (𝒙𝒐 , 𝒚𝒐 ) when
x is held fixed at the value 𝒙𝒐 . This is the rate of change of f in the direction of j at (𝒙𝒐 , 𝒚𝒐 ).
Figure (4.1): The intersection of the plane 𝑥 = 𝑥𝑜 with the surface 𝑧 = 𝑓(𝑥, 𝑦), viewed from above
the first quadrant of the xy-plane.
3
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
The partial derivative with respect to y is denoted the same way as the partial
derivative with respect to x:
𝝏𝒇 𝝏𝒇
(𝒙 , 𝒚 ), 𝒇𝒚 (𝒙𝒐 , 𝒚𝒐 ) , , 𝒇𝒚
𝝏𝒚 𝒐 𝒐 𝝏𝒚
Notice that we now have two tangent lines associated with the surface 𝒛 = 𝒇(𝒙, 𝒚) at
the point 𝑷(𝒙𝒐 , 𝒚𝒐 , 𝒇(𝒙𝒐 , 𝒚𝒐 )) (Figure 4.2). Is the plane they determine tangent to the surface
at P? We will see that it is, but we have to learn more about partial derivatives before we can
find out why.
Figure (4.2): The intersection of the plane 𝑦 = 𝑦𝑜 with the surface 𝑧 = 𝑓(𝑥, 𝑦) and the intersection
of the plane 𝑥 = 𝑥𝑜 with the surface 𝑧 = 𝑓 (𝑥, 𝑦) combined. The tangent lines at the point
(𝑥𝑜 , 𝑦𝑜 , 𝑓 (𝑥𝑜 , 𝑦𝑜 )) determine a plane that, in this picture at least, appears to be tangent to the surface.
4
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝝏𝒇 𝝏𝒇
Sample Problem 4/1: Find the values of 𝝏𝒙 and 𝝏𝒚 at the point (4, −5) if:
𝑓(𝑥, 𝑦) = 𝑥 2 + 3𝑥𝑦 + 𝑦 − 1
Solution.
𝝏𝒇
To find , we treat y as a constant and differentiate with respect to x:
𝝏𝒙
𝜕𝑓 𝜕 2
= (𝑥 + 3𝑥𝑦 + 𝑦 − 1) = 2𝑥 + 3𝑦
𝜕𝑥 𝜕𝑥
𝝏𝒇
The value of at (4, −5) is:
𝝏𝒙
= 2(4) + 3(−5) = −7
𝝏𝒇
To find , we treat x as a constant and differentiate with respect to y:
𝝏𝒚
𝜕𝑓 𝜕 2
= (𝑥 + 3𝑥𝑦 + 𝑦 − 1) = 3𝑥 + 1
𝜕𝑦 𝜕𝑦
𝝏𝒇
The value of at (4, −5) is:
𝝏𝒚
= 3(4) + 1 = 13
𝝏𝒇
Sample Problem 4/2: Find the values of 𝝏𝒚 if 𝑓(𝑥, 𝑦) = 𝑦 sin 𝑥𝑦
Solution.
We treat x as a constant and f as a product of y and 𝐬𝐢𝐧 𝒙𝒚:
𝜕𝑓 𝜕 𝜕 𝜕
= (𝑦 sin 𝑥𝑦) = 𝑦 (sin 𝑥𝑦) + (sin 𝑥𝑦) (𝑦)
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕
= 𝑦 cos 𝑥𝑦 (𝑥𝑦) + (sin 𝑥𝑦)
𝜕𝑦
= 𝑥𝑦 cos 𝑥𝑦 + (sin 𝑥𝑦)
5
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
2𝑦
Sample Problem 4/3: Find 𝒇𝒙 and 𝒇𝒚 if 𝑓(𝑥, 𝑦) = 𝑦+cos 𝑥
Solution.
We treat f as a quotient. With y held constant, we get:
𝜕 𝜕
𝜕 2𝑦 (𝑦 + cos 𝑥 ) (2𝑦) − (2𝑦) (𝑦 + cos 𝑥 )
𝑓𝑥 = ( )= 𝜕𝑥 𝜕𝑥
𝜕𝑥 𝑦 + cos 𝑥 (𝑦 + cos 𝑥 ) 2
𝝏𝒇 𝝏𝒇
Sample Problem 4/4: Find 𝝏𝒙 and 𝝏𝒚 if 𝑓(𝑥, 𝑦) = (2𝑥 − 3𝑦)3
Solution.
𝜕𝑓 𝜕
= (2𝑥 − 3𝑦)3 = 3(2𝑥 − 3𝑦)2 (2) = 6(2𝑥 − 3𝑦)2
𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕
= (2𝑥 − 3𝑦)3 = 3(2𝑥 − 3𝑦)2 (−3) = −9(2𝑥 − 3𝑦)2
𝜕𝑦 𝜕𝑦
6
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝝏𝒇
Sample Problem 4/6: Find 𝝏𝒛 if 𝑓 (𝑥, 𝑦, 𝑧) = 𝑥 sin(𝑦 + 3𝑧)
Solution.
𝜕𝑓 𝜕 𝜕 𝜕
= [𝑥 sin(𝑦 + 3𝑧)] = 𝑥 sin(𝑦 + 3𝑧) = 𝑥 cos(𝑦 + 3𝑧) (𝑦 + 3𝑧)
𝜕𝑧 𝜕𝑧 𝜕𝑧 𝜕𝑧
= 𝑥 cos(𝑦 + 3𝑧) (3) = 3𝑥 cos(𝑦 + 3𝑧)
7
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Figure (4.3): The tangent to the curve of intersection of the plane 𝑥 = 1 and surface 𝑧 = 𝑥 2 + 𝑦 2
at the point (1,2,5).
Solution.
The slope is the value of the partial derivative 𝜕𝑧⁄𝜕𝑦 at (1, 2):
𝜕𝑧 𝜕 2
| = (𝑥 + 𝑦2 )| = 2𝑦|(1,2) = 2(2) = 4
𝜕𝑦 (1,2) 𝜕𝑦 (1,2)
As a check, we can treat the parabola as the graph of the single-variable function
𝑧 = (1)2 + 𝑦 2 = 1 + 𝑦 2 in the plane 𝑥 = 1 and ask for the slope at 𝑦 = 2. The slope,
calculated now as an ordinary derivative, is:
𝑑𝑧 𝑑
| = (1 + 𝑦2 )| = 2𝑦|𝑦=2 = 2(2) = 4
𝑑𝑦 𝑦=2 𝑑𝑦 𝑦=2
8
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝜕2𝑓 𝜕 𝜕𝑓 𝜕2𝑓 𝜕 𝜕𝑓
= ( ) = 𝑓𝑥𝑥 = ( ) = 𝑓𝑦𝑦
𝜕𝑥 2 𝜕𝑥 𝜕𝑥 𝜕𝑦 2 𝜕𝑦 𝜕𝑦
𝜕2𝑓 𝜕 𝜕𝑓 𝜕2𝑓 𝜕 𝜕𝑓
= ( ) = 𝑓𝑦𝑥 = ( ) = 𝑓𝑥𝑦
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥
𝝏𝟐 𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒇 𝝏𝟐 𝒇
Sample Problem 4/9: If 𝑓(𝑥, 𝑦) = 𝑥 2 𝑦 3 + 𝑥 4 𝑦 find 𝝏𝒙𝟐 , 𝝏𝒚𝟐 , 𝝏𝒙𝝏𝒚 and 𝝏𝒚𝝏𝒙
Solution.
𝜕𝑓 𝜕 2 3 𝜕𝑓 𝜕 2 3
= (𝑥 𝑦 + 𝑥 4 𝑦) = 2𝑥𝑦 3 + 4𝑥 3 𝑦 = (𝑥 𝑦 + 𝑥 4 𝑦) = 3𝑥 2 𝑦 2 + 𝑥 4
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
= ( ) = (2𝑥𝑦 3 + 4𝑥 3 𝑦) = 2𝑦 3 + 12𝑥 2 𝑦
𝜕𝑥 2 𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
2
= ( ) = (3𝑥 2 𝑦 2 + 𝑥 4 ) = 6𝑥 2 𝑦
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
= ( )= (3𝑥 2 𝑦 2 + 𝑥 4 ) = 6𝑥𝑦 2 + 4𝑥 3
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
= ( )= (2𝑥𝑦 3 + 4𝑥 3 𝑦) = 6𝑥𝑦 2 + 4𝑥 3
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
9
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Sample Problem 4/10: Find 𝒇𝒙𝒙 , 𝒇𝒚𝒚 , 𝒇𝒚𝒙 and 𝒇𝒙𝒚 if 𝑓(𝑥, 𝑦) = 𝑥 cos 𝑦 + 𝑦𝑒 𝑥
Solution.
𝜕𝑓 𝜕 𝜕𝑓 𝜕
= (𝑥 cos 𝑦 + 𝑦𝑒 𝑥 ) = cos 𝑦 + 𝑦𝑒 𝑥 = (𝑥 cos 𝑦 + 𝑦𝑒 𝑥 ) = −𝑥 sin 𝑦 + 𝑒 𝑥
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
𝑓𝑥𝑥 = 2 = ( )= (cos 𝑦 + 𝑦𝑒 𝑥 ) = 𝑦𝑒 𝑥
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
𝑓𝑦𝑦 = 2= ( )= (−𝑥 sin 𝑦 + 𝑒 𝑥 ) = −𝑥 cos 𝑦
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
𝑓𝑦𝑥 = = ( )= (−𝑥 sin 𝑦 + 𝑒 𝑥 ) = − sin 𝑦 + 𝑒 𝑥
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝜕2𝑓 𝜕 𝜕𝑓 𝜕
𝑓𝑥𝑦 = = ( )= (cos 𝑦 + 𝑦𝑒 𝑥 ) = − sin 𝑦 + 𝑒 𝑥
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
10
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝑒𝑦
Sample Problem 4/11: Find 𝝏𝟐 𝒘⁄𝝏𝒙𝝏𝒚 if 𝑤 = 𝑥𝑦 + 𝑦2+1
Solution.
The symbol 𝝏𝟐 𝒘⁄𝝏𝒙𝝏𝒚 tells us to differentiate first with respect to y and the with
respect to x. If we postpone the differentiation with respect to y and differentiate first with
respect to x, however, we get the answer more quickly. In two steps:
𝜕𝑤 𝜕2𝑤
=𝑦 𝑎𝑛𝑑 =1
𝜕𝑥 𝜕𝑥𝜕𝑦
If we differentiate first with respect to y, we obtain 𝝏𝟐 𝒘⁄𝝏𝒙𝝏𝒚 = 𝟏 as well.
11
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝒅𝒇
= 𝒇𝒙 (𝒙(𝒕), 𝒚(𝒕)). 𝒙′ (𝒕) + 𝒇𝒚 (𝒙(𝒕), 𝒚(𝒕)). 𝒚′ (𝒕)
𝒅𝒕
or
𝒅𝒘 𝝏𝒇 𝒅𝒙 𝝏𝒇 𝒅𝒚
= +
𝒅𝒕 𝝏𝒙 𝒅𝒕 𝝏𝒚 𝒅𝒕
12
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Sample Problem 4/13: Use the Chain Rule to find the derivation of 𝑤 = 𝑥𝑦 with respect
𝝅
to t along the path 𝑥 = cos 𝑡, 𝑦 = sin 𝑡. What is the derivative’s value at 𝒕 = ?
𝟐
Solution.
𝒅𝒘
We apply the Chain Rule to find as follows:
𝒅𝒕
𝑑𝑤 𝜕𝑤 𝑑𝑥 𝜕𝑤 𝑑𝑦 𝜕(𝑥𝑦) 𝑑 𝜕(𝑥𝑦) 𝑑
= + = . (cos 𝑡) + . (sin 𝑡)
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡
= (𝑦)(− sin 𝑡) + (𝑥 )(cos 𝑡) = (sin 𝑡)(− sin 𝑡) + (cos 𝑡)(cos 𝑡)
= − sin2 𝑡 + cos2 𝑡 = cos 2𝑡
In this example, we can check the result with a more direct calculation. As a function
of t:
1 𝑑𝑤 𝑑 1 1
𝑤 = 𝑥𝑦 = cos 𝑡 sin 𝑡 = sin 2𝑡 ⟹ = ( sin 2𝑡) = . 2 cos 2𝑡 = cos 2𝑡
2 𝑑𝑡 𝑑𝑡 2 2
At the given value of t:
𝑑𝑤 𝜋
( ) 𝜋 = cos (2. ) = cos 𝜋 = −1
𝑑𝑡 𝑡= 2
2
Sample Problem 4/14: Use the Chain Rule to find the derivation of 𝑤 = 𝑥 2 + 𝑦 2 with
respect to 𝒕 along the path 𝑥 = cos 𝑡, 𝑦 = sin 𝑡.
Solution.
𝒅𝒘
We apply the Chain Rule to find as follows:
𝒅𝒕
𝑑𝑤 𝜕𝑤 𝑑𝑥 𝜕𝑤 𝑑𝑦 𝜕 2 𝑑 𝜕 2 𝑑
= + = (𝑥 + 𝑦 2 ). (cos 𝑡) + (𝑥 + 𝑦 2 ). (sin 𝑡)
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡
= (2𝑥 )(− sin 𝑡) + (2𝑦)(cos 𝑡) = (2 cos 𝑡)(− sin 𝑡) + (2 sin 𝑡)(cos 𝑡)
= −2 cos 𝑡 sin 𝑡 + 2 sin 𝑡 cos 𝑡 = 0
For Check:
𝑑𝑤
𝑤 = 𝑥 2 + 𝑦 2 = cos2 𝑡 + sin2 𝑡 = 1 ⟹ =0
𝑑𝑡
13
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝒅𝒘
Sample Problem 4/15: Use the Chain Rule to find the derivate ( 𝒅𝒕 ) of 𝑤 = 𝑥𝑦 + 𝑧 with
𝒅𝒘
𝑥 = cos 𝑡, 𝑦 = sin 𝑡, 𝑧 = 𝑡, and determine the value of ( ) at 𝑡 = 0.
𝒅𝒕
Solution.
𝑑𝑤 𝜕𝑤 𝑑𝑥 𝜕𝑤 𝑑𝑦 𝜕𝑤 𝑑𝑧
= + +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑧 𝑑𝑡
𝜕 𝑑 𝜕 𝑑 𝜕 𝑑
= (𝑥𝑦 + 𝑧). (cos 𝑡) + (𝑥𝑦 + 𝑧). (sin 𝑡) + (𝑥𝑦 + 𝑧). (𝑡)
𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑧 𝑑𝑡
= (𝑦)(− sin 𝑡) + (𝑥 )(cos 𝑡) + (1)(1) = (sin 𝑡)(− sin 𝑡) + (cos 𝑡)(cos 𝑡) + 1
= − sin2 𝑡 + cos2 𝑡 + 1 = cos 2𝑡 + 1
At the given value of t:
𝑑𝑤
( ) = cos(0) + 1 = 2
𝑑𝑡 𝑡=0
14
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝝏𝒘 𝝏𝒘 𝝏𝒙 𝝏𝒘 𝝏𝒚 𝝏𝒘 𝝏𝒛
= + +
𝝏𝒓 𝝏𝒙 𝝏𝒓 𝝏𝒚 𝝏𝒓 𝝏𝒛 𝝏𝒓
𝝏𝒘 𝝏𝒘 𝝏𝒙 𝝏𝒘 𝝏𝒚 𝝏𝒘 𝝏𝒛
= + +
𝝏𝒔 𝝏𝒙 𝝏𝒔 𝝏𝒚 𝝏𝒔 𝝏𝒛 𝝏𝒔
15
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝝏𝒘 𝝏𝒘 𝝏𝒙 𝝏𝒘 𝝏𝒚 𝝏𝒘 𝝏𝒘 𝝏𝒙 𝝏𝒘 𝝏𝒚
= + and = +
𝝏𝒓 𝝏𝒙 𝝏𝒓 𝝏𝒚 𝝏𝒓 𝝏𝒔 𝝏𝒙 𝝏𝒔 𝝏𝒚 𝝏𝒔
𝝏𝒘 𝒅𝒘 𝝏𝒙 𝝏𝒘 𝒅𝒘 𝝏𝒙
= and =
𝝏𝒓 𝒅𝒙 𝝏𝒓 𝝏𝒔 𝒅𝒙 𝝏𝒔
16
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝝏𝒘 𝝏𝒘
Sample Problem 4/16: Find 𝝏𝒓 and 𝝏𝒓
in terms of r and s if:
𝑟
𝑤 = 𝑥 + 2𝑦 + 𝑧 2 , 𝑥= , 𝑦 = 𝑟 2 + ln 𝑠 , 𝑧 = 2𝑟
𝑠
Solution.
𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝜕𝑧
= + +
𝜕𝑟 𝜕𝑥 𝜕𝑟 𝜕𝑦 𝜕𝑟 𝜕𝑧 𝜕𝑟
1 1 1
= (1) ( ) + (2)(2𝑟) + (2𝑧)(2) = + 4𝑟 + (4𝑟)(2) = + 12𝑟
𝑠 𝑠 𝑠
𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦 𝜕𝑤 𝜕𝑧
= + +
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠 𝜕𝑧 𝜕𝑠
𝑟 1 𝑟 2 2 𝑟
= (1) (− ) + ( 2) ( ) + ( 2𝑧 )( 0) = − + + 0 = −
𝑠2 𝑠 𝑠2 𝑠 𝑠 𝑠2
𝝏𝒘 𝝏𝒘
Sample Problem 4/17: Find 𝝏𝒓 and 𝝏𝒓
in terms of r and s if:
𝑤 = 𝑥2 + 𝑦2 , 𝑥 =𝑟−𝑠, 𝑦 =𝑟+𝑠
Solution.
𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦
= +
𝜕𝑟 𝜕𝑥 𝜕𝑟 𝜕𝑦 𝜕𝑟
𝜕𝑤 𝜕𝑤 𝜕𝑥 𝜕𝑤 𝜕𝑦
= +
𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠
17
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
From the definition of the Chain Rule for functions of two variables with 𝒕 = 𝒙 and
𝒇 = 𝑭:
𝑑𝑤 𝑑𝑥 𝑑𝑦 𝑑𝑦
0= = 𝐹𝑥 + 𝐹𝑦 = 𝐹𝑥 . 1 + 𝐹𝑦 .
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑑𝑦 𝐹𝑥
=−
𝑑𝑥 𝐹𝑦
18
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Suppose that 𝑭(𝒙, 𝒚) is differentiable and that the equation 𝑭(𝒙, 𝒚) = 𝟎 defines y as a
differentiable function of x. Then at any point where 𝑭𝒚 ≠ 𝟎,
𝒅𝒚 𝑭𝒙
=−
𝒅𝒙 𝑭𝒚
Sample Problem 4/18: Use a formula for implicit differentiation to find 𝒅𝒚⁄𝒅𝒙 if:
𝑦 2 − 𝑥 2 − sin 𝑥𝑦 = 0
Solution.
Take 𝐹 (𝑥, 𝑦) = 𝑦 2 − 𝑥 2 − sin 𝑥𝑦 then:
𝑑𝑦 𝐹𝑥
=−
𝑑𝑥 𝐹𝑦
−2𝑥 − 𝑦 cos 𝑥𝑦
=−
2𝑦 − 𝑥 cos 𝑥𝑦
2𝑥 + 𝑦 cos 𝑥𝑦
=
2𝑦 − 𝑥 cos 𝑥𝑦
19
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Figure (4.4): The rate of change of ƒ in the direction of u at a point 𝑃𝑜 is the rate at which ƒ changes
along this line at 𝑃𝑜 .
20
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Solution.
𝑑𝑓 𝑓 (𝑥𝑜 + 𝑠𝑢1 , 𝑦𝑜 + 𝑠𝑢2 ) − 𝑓(𝑥𝑜 , 𝑦𝑜 )
( ) = lim
𝑑𝑠 u,𝑃𝑜 𝑠→0 𝑠
1 1
𝑓 (1 + 𝑠. , 2 + 𝑠. ) − 𝑓(1,2)
= lim √2 √2
𝑠→0 𝑠
𝑠 2 𝑠 𝑠
(1 + ) + (1 + ) (2 + ) − [(1)2 + (1)(2)]
= lim √2 √2 √2
𝑠→0 𝑠
2𝑠 𝑠 2 3𝑠 𝑠 2 5𝑠
(1 + + ) + (2 + + )−3 + 𝑠2
√2 2 √2 2 2 5 5
= lim = lim √ = lim ( + 𝑠) =
𝑠→0 𝑠 𝑠→0 𝑠 𝑠→0 √2 √2
The rate of change of 𝑓(𝑥, 𝑦) = 𝑥 2 + 𝑥𝑦 at 𝑃𝑜 (1,2) in the direction of the unit vector
1 1
u = ( ) i + ( ) j is 5⁄√2.
√2 √2
Gradient Vectors:
The gradient vector (gradient) of 𝒇(𝒙, 𝒚) at a point 𝑷𝒐 (𝒙𝒐 , 𝒚𝒐 ) is the vector
𝝏𝒇 𝝏𝒇
𝛁𝒇 = 𝐢+ 𝐣
𝝏𝒙 𝝏𝒚
The notation 𝛁𝒇 is read “grad f ” as well as “gradient of f ” and “del f ”. The symbol
𝛁 by itself is read “del”. Another notation for the gradient is grad f, read the way it is written.
𝒅𝒇
( ) = (𝛁𝒇)𝑷𝒐 . 𝐮
𝒅𝒔 𝐮,𝑷𝒐
21
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Sample Problem 4/20: Find the derivative of 𝑓(𝑥, 𝑦) = 𝑥𝑒 𝑦 + cos(𝑥𝑦) at the point
(2,0) in the direction of v = 3i − 4j.
Solution.
The direction of v is the unit vector obtained by dividing v by its length:
v 3 4
u= = i− j
|v| 5 5
The partial derivatives of ƒ are everywhere continuous and at (2, 0) are given by:
𝑓𝑥 (2,0) = [𝑒 𝑦 − 𝑦 sin(𝑥𝑦)](2,0) = 𝑒 0 − 0 = 1
𝑓𝑦 (2,0) = [𝑥𝑒 𝑦 − 𝑥 sin(𝑥𝑦)](2,0) = 2𝑒 0 − 0 = 2
The gradient of ƒ at (2, 0) is:
∇𝑓|(2,0) = 𝑓𝑥 (2,0)i + 𝑓𝑦 (2,0)j = i + 2j
(Figure 4.5). The derivative of ƒ at (2, 0) in the direction of v is therefore:
(𝐷u 𝑓)|(2,0) = ∇𝑓|(2,0) . u
3 4 3 8
= (i + 2j). ( i − j) = − = −1
5 5 5 5
Figure (4.5): Picture ∇𝑓 as a vector in the domain of f. In the case of 𝑓 (𝑥, 𝑦) = 𝑥𝑒 𝑦 + cos(𝑥𝑦), the
domain is the entire plane. The rate at which f changes at (2,0) in the direction u = (3⁄5)i − (4⁄5)j
is ∇𝑓. u = −1.
22
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
23
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
Figure (4.6): The direction in which 𝑓(𝑥, 𝑦) = (𝑥 2 ⁄2) + (𝑦 2 ⁄2) increases most rapidly at (1,1) is
the direction of ∇𝑓|(1,1) = i + j. It corresponds to the direction of steepest ascent on the surface at
(1,1,1).
Gradients and Tangents to Level Curves:
At every point (𝒙𝒐 , 𝒚𝒐 ) in the domain of a differentiable function 𝒇(𝒙, 𝒚), the gradient of
f is normal to the level curve through (𝒙𝒐 , 𝒚𝒐 ) (Figure 4.7).
Figure (4.7): The gradient of a differentiable function of two variables at a point is always normal
to the function’s level curve through that point.
The equations for tangent lines to level curves could be found. They are the lines
normal to the gradients. The line through a point 𝑷𝒐 (𝒙𝒐 , 𝒚𝒐 ) normal to a vector
𝐍 = 𝑨𝐢 + 𝑩𝐣 has the equation
𝐴(𝑥 − 𝑥𝑜 ) + 𝐵(𝑦 − 𝑦𝑜 ) = 0
If N is the gradient (𝛁𝒇)(𝒙𝒐 ,𝒚𝒐 ) = 𝒇𝒙 (𝒙𝒐 , 𝒚𝒐 )𝐢 + 𝒇𝒚 (𝒙𝒐 , 𝒚𝒐 )𝐣 , the equation is the
tangent line given by
𝑓𝑥 (𝑥𝑜 , 𝑦𝑜 )(𝑥 − 𝑥𝑜 ) + 𝑓𝑦 (𝑥𝑜 , 𝑦𝑜 )(𝑦 − 𝑦𝑜 ) = 0
24
Thi-Qar University / College of Engineering
Petroleum and Gas Engineering Department
Mathematics III / Second Class
𝑥2
Sample Problem 4/22: Find an equation for the tangent to the ellipse + 𝑦2 = 2
4
Figure (4.8): We can find the tangent to the ellipse (𝑥 2 ⁄4) + 𝑦 2 = 2 by treating the ellipse as a
level curve of the function 𝑓 (𝑥, 𝑦) = (𝑥 2 ⁄4) + 𝑦 2 .
Solution.
The ellipse is a level curve of the function:
𝑥2
𝑓 (𝑥, 𝑦) = + 𝑦2
4
𝑥 − 2𝑦 = −4
25