functions of several variables
functions of several variables
CHAPTER THREE
Definitions:1) A rule that assigns to each element of a set D n , n 2 a unique real number
is called real valued function of several variables.
n
2) The largest possible set D in on which f is defined is called the domain of f.
Notation:
a . Let f : D 2 , defined by f x , y x 2 y 2 .
b. Let f : D 3 , defined by f x , y , z 9 x 2 y 2 .
y
c. Let f : D 2 , defined by f x , y
x y2
b. D x , y , z : 9 x 2 y 2 0 x , y , z : x 2 y 2 3 2
(The set of all points inside (and on) a circle of center at the
c. exercise.
The graph of z f x , y is the set x , y, z : z f x , y , ( x , y ) D f in 3
. So we see
3
that this graph is a surface in .
If we put z c , c the set x , y , c : ( x , y ) D f and c f x , y is called the level
curve for the graph of f.
The intersection of the horizontal plane z c , c with the surface z f x , y is
called the contour curve (trace) of height c on the surface.
The vertical projection of the contour curve in to the xy-plane is the level curve
f x , y c of the function f.
To get the graph of f, raise the level curves to the plane z c .
0 x x0 2 y y0 2 f x , y L .
Now , f x , y L 3x 2 y 5 3 x 3 2 y 2 3( x 1) 2( y 1) 3 x 1 2 y 1
xy 2
Example: 2. Show that lim 2 0 .
x y 0 , 0 x y 2
xy 2
Solution: Given 0 . Then we need to find 0 0 x2 y2 .
x2 y2
2
xy 2 xy
Now , 2
x y 2
2
x y2
….. x x2 x2 y2 & y2 x2 y2
Thus ,
xy 2
x2 y 2 x2 y 2 x2 y2 .
x2 y2 x y2 2
xy 2
Choose . lim 2 0
x y 0, 0 x y 2
5 xy 0
Then, lim 2 lim 2 0.
x y 0 , 0 x y 2
x y 0, 0 x
5 xy 0
Then, lim 2 lim 2 0.
x y 0 , 0 x y 2
x y 0, 0 y
5 xy 5x 2 5
Then, lim 2 lim 2 0.
x y 0 , 0 x y 2
x y 0, 0 2 x 2
5 xy 5m 5m
Then, lim 2 lim , which varies as m varies.
x y 0 , 0 x y 2 2 2
x y 0, 0 1 m 1 m
5 xy
Therefore, lim 2 doesn’t exist.
x y 0 , 0 x y 2
3x 2 y x2 y2
Exercises: 1. Show that a) lim 2 0. b) lim 4 doesn’t exist.
x y 0 , 0 x y 2 x y 0 , 0 x y 4
2. Evaluate: lim x
x y 0, 0
2
y 2 ln x 2 y 2 .
Continuity
Definition: 1. Let f x , y be a function of two variables and x 0 , y 0 D f . Then the first order
partial derivatives of f with respect to x and with respect to y respectively are defined as:
f f x0 h , y 0 f x0 , y 0
I)
x
x0 , y0 f x x0 , y 0 lim
h0 h
.
f f x 0 , y 0 h f x0 , y 0
II) x0 , y0 f y x0 , y 0 lim .
y h0 h
f f x 0 h , y 0 , z 0 f x 0 , y 0 , z 0
I)
x
x0 , y 0 , z 0 f x x0 , y 0 , z 0 lim
h 0 h
.
f f x 0 , y 0 h , z 0 f x0 , y 0 , z 0
II) x0 , y0 , z 0 f y x0 , y0 , z 0 lim .
y h0 h
f f x 0 , y 0 , z 0 h f x 0 , y 0 , z 0
III)
z
x0 , y 0 , z 0 f z x0 , y 0 , z 0 lim
h 0 h
.
xy 2
a) f x , y 2 x 2 y 2 2 y 4 x. b) f x , y e ln( x 2 y ).
Solution: a) By definition,
f x x, y lim
f x h , y f x, y
lim
2
2 x h y 2 2 y 4 x h 2 x 2 y 2 2 y 4 x
h 0 h h0 h
2 2 2
4 xhy y h 4h
lim lim (4 xy 2 y 2 h 4) 4 xy 2 4
h 0 h h 0
f x 1, 2 20.
And,
f y x, y lim
f x , y h f x, y
lim
2 x 2 ( y h) 2 2( y h) 4 x 2 x 2 y 2 2 y 4 x
h0 h h0 h
2 2 2
4 x yh 2 x h 2h
lim lim (4 x 2 y 2 x 2 h 2) 4 x 2 y 2
h 0 h h 0
f y 1, 2 10.
b) Exercise.
To calculate f x x , y , regard y as a constant and differentiate with respect to x.
To calculate f y x , y , regard x as a constant and differentiate with respect to y.
f f
Suppose that f is a function of two variables x and y . Since and are also functions of
x y
x and y , these functions may themselves have partial derivatives. This gives rise to four
possible second-order derivatives of f, which are defined by:
2 f f
2
f xx ( Differentiate twice with respect to x )
x x x
2 f f
2
f yy ( Differentiate twice with respect to y )
y y y
2 f f
f xy ( Differentiate first with respect to x & then with respect to y )
yx y x
2 f f
f yx ( Differentiate first with respect to y & then with respect to x)
xy x y
xy 2
Example: Let f x , y e ln( x 2 y ) . Find all the second order partial derivatives.
f
x , y f x x , y y 2 e xy 2 xy2 y 2 e xy 2 and f x , y f y x , y 2 xye xy 1 .
2 2 2
x xy x y y
2 f
x , y f y 2 e xy 2 y 4 e xy 22 .
2 2
Now , i) f xx x , y 2
x x x x x x
2 f
x , y f y 2 e xy 2 2 ye xy 2 xy 3 e xy 2 ye xy (1 xy 2 ).
2 2 2 2
ii ) f xy x , y
yx y x y x
2 f
x , y f 2 xye xy 1 2 xe xy 4 x 2 y 2 e xy 12 .
2 2 2
iii ) f yy x , y
2
y y y y y y
2 f
x , y f 2 xye xy 1 2 ye xy 2 xy 3 e xy 2 ye xy (1 xy 2 ).
2 2 2 2
iv ) f yx x , y
xy x y x y
Theorem: Let f be a function of two variables. If f xy x , y and f yx x , y are continuous on some
open disk, then f xy x , y f yx x , y on that disk.
a) f x , y x ln x y ; p 0 2 , 3
b ) f x , y , z ze x tan y ; p0 0 , , 2
x
Solution: a) f x , y x ln x y . f x x , y ln( x y ) ; f x 2 , 3 2
x y
x
and f y x , y ; f y 2 , 3 2
x y
f 2 , 3 f x 2 , 3i f y 2 , 3 j 2i 2 j
b) f x , y , z ze x tan y f x x , y , z ze x tan y ; f x 0 , , 2 0 ;
; f y x , y , z ze x sec 2 y ; f y 0 , , 2 2
and f z x , y , z e x tan y ; f z 0 , , 2 0
f 0 , , 2 f x 0 , , 2 i f y 0 , , 2 j f z 0 , , 2 2 j.
Definition: Let U be a unit vector and f be a function of several variables. Then the rate of
change of f with respect to U at a point p 0 is called the directional derivative of f at p 0 in the
direction of U denoted by D f p 0 and is defined as: D f p0 f p0 U
U U
a) f x , y x 2 x 2 y y 2 , p0 1, 2 &U 1,1.
2 1 2
b ) f x , y , z x 2 y yz 3 z , p 0 1, 2 , 0 & U , ,
3 2 3
U 1 1
But U i j is a unit vector.
2 2
Thus, D f p 0 f p 0 U 6 i 5 j 1 i 1 j 11 11 2 .
U U 2 2 2 2
f x x , y , z 2 xy ; f x 1, 2 , 0 4 , f y x , y , z x 2 z 3 ; f y 1, 2 , 0 1
and f z x , y , z 3 yz 2 1 ; f z 1, 2 , 0 1
f 1, 2 , 0 4i j k .
2 2 2
and U 2 1 2
1 . That is, u is a unit vector. Thus,
3 3 3
U 2 1 2
D f p0 f p0 4 i j k i j k 3 .
U U 3 3 3
Theorem: Let U be a unit vector and f is partially differentiable at a point p0 , then the maximum
value of D f p0 is f p0 .
U
Proof: D f p 0 f p 0 U f p 0 U cos , where is the angle between f p0 and U .
U
D f p0 max f p0 , when 0 0
U
D f p0 min f p0 , when
U
Tx x , y , z e x cos y e y cos x ; Tx 0 , 0 , 0 2
T y x , y , z e x sin y e y sin x ; T y 0 , 0 , 0 0 and
Tz x , y , z 1 ; T y 0 , 0 , 0 1
Thus, T 0 , 0 , 0 2i k .
Therefore, T decreases rapidly along u` 1 5 2i k because it decreases rapidly at
opposite to the gradient T 0 , 0 , 0 2i k and T increases rapidly when it is in the same
direction with the gradient.
f x , y f x0 , y0 f x x0 , y0 x x0 f y x0 , y0 y y0 1 x , y x x0
2 x , y y y 0 , for x , y in D where
lim 1 x , y 0 and lim 2 x , y 0
x , y x0 , y0 x , y x0 , y0
a) f x , y x 2 y 2 xy and x0 , y0 0 , 0 .
Compiled by: Amsalu W/Gebreal Page 8
Functions of Several Variables
b) f x , y x xy and x0 , y 0 0 , 0 .
Solution: a)
f x , y x 2 y 2 xy i ) f x x , y 2 x y ; f x 0 , 0 0 ii ) f y x , y 2 y x ; f y 0 , 0 0.
That is, both f x 0 , 0 and f y 0 , 0 exist and continuous. Therefore, f x , y x 2 y 2 xy is
differentiable at 0 , 0 .
z z
Solution: dz df f x x , y dx f y x , y dy dx dy 2 x 3 y dx 3x 2 y dy .
x y
Tangent plane
z f x0 , y0 f x x0 , y 0 x x0 f y x0 , y 0 y y 0 .
Note: The normal line of the plane can be expressed parametrically as:
x x0 f x x0 , y 0 t , y y 0 f y x0 , y0 t , z f x0 , y0 t , t .
Example: Find an equation for the tangent plane and parametric equation for the normal line to
the surface z f x , y x 2 y at the point 2 ,1, 4 .
f x x , y 2 xy ; f x 2 ,1 4 and f y x , y x 2 ; f y 2 ,1 4
x x0 f x x0 , y 0 t , y y 0 f y x0 , y 0 t , z f x0 , y0 t , t
x 2 4t , y 1 4t , z 4 t , t .
Theorem: Assume that F x , y , z has continuous first-order partial derivatives and let
c F x0 , y0 , z 0 . If F x0 , y 0 , z 0 0 , then F x0 , y0 , z0 is a normal vector to the surface
Fx x0 , y 0 , z 0 x x0 Fy x0 , y 0 , z 0 y y0 Fz x0 , y 0 , z 0 z z 0 0 .
Example: Find an equation of the plane tangent to the sphere x 2 y 2 z 2 4 at the point
1,1, 2 .
Solution: The sphere is the level surface F x , y , z 4 , where F x , y , z x 2 y 2 z 2 .
Now , Fx x , y , z 2 x ; Fx 1,1, 2 2 ; Fy x , y , z 2 y ; Fy 1,1, 2 2
Fz x , y , z 2 z ; Fz 1,1, 2 2 2
Therefore, an equation of the plane tangent at 1 , 1 , 2 is:
Fx x0 , y 0 , z 0 x x0 Fy x0 , y0 , z 0 y y0 Fz x0 , y0 , z 0 z z 0 0
2 x 1 2 y 1 2 2 z 2 0 x y 2 z 4.
Let f x , y is differentiable at the point x0 , y0 . Thus, the equation of the tangent plane to the
graph of f at x0 , y0 is z f x , y f x0 , y0 f x x0 , y 0 x x0 f y x0 , y 0 y y0
Now, if the point P x , y is very close to p0 x0 , y0 , then
f x , y f x0 , y 0 f x x0 , y0 x x0 f y x0 , y 0 y y 0 which can be written in the form:
Example: Approximate ln x 2 y 2 at 0.01, 0.98.
Solution: Let f x , y ln x 2 y 2 , P 0.01, 0.98 x , y , P0 0 ,1 x0 , y 0 . Then
2x 2y
f 0 ,1 ln 0 1 ln 1 0 . Now, f x x , y 2 2
; f x 0 ,1 0 & f y x , y 2 ; f y 0 ,1 2.
x y x y2
Thus , f x , y f x0 , y 0 f x x0 , y 0 x x0 f y x0 , y0 y y 0
f 0.01, 0.98 f 0 ,1 f x 0 ,10.01 0 f y 0 ,10.98 1 0.04
ln 0.01 0.98 0.04.
2 2
Example: Approximate e 0.2 ln 0.9.
ex
The first partial derivatives of f are: f x x , y e ln y ; f x 0 ,1 0 & f y x , y ; f y 0 ,1 1.
x
dy d dy dx dy dy dx
Now, fog t f ' g t g ' t f ' x g ' t .Thus, .
dt dx dx dt dt dx dt
We will now see the version of the chain rule for functions of several variables.
the ordinary derivatives are evaluated at t and the partial derivatives are evaluated at x, y .
Example: Let z f x , y 2 x 2 y 2 , x cos t , y sin t . Find dz dt .
dz z dx z dy
Solution: 4 x sin t 2 y cos t 4 cos t sin t 2 sin t cos t 2 cos t sin t
dt x dt y dt
dz
2 cos t sin t.
dt
dw w dx w dy w dz
dt x dt y dt z dt
where the ordinary derivatives are evaluated at t and the partial derivatives are evaluated at
x , y , z .
dw
Example: Given that w x 2 y 2 z 2 , x e t , y e t z 2t . Find .
dt
Solution:
dw w dx w dy w dz x y z
et e t 2
dt x dt y dt z dt 2
x y z 2 2 2
x y z 2 2
x y2 z2
2
e 2t e 2 t 4t e 2t e 2t 4t
.
e 2t e 2t 4t 2 e 2t e 2t 4t 2 e 2t e 2t 4t 2 e 2t e 2t 4t 2
If x xu , v and y y u , v have first order partial derivatives at the point u , v , and if
z f x , y is differentiable at xu , v , yu , v , then z f xu , v , yu , v has first partial
derivatives at u , v given by:
z z x z y z z x z y
and
u x u y u v x v y v
z z
Example: Let z x y and x e uv , y ln uv . Find and .
u v
Solution:
z z x z y z z x z y
;
u x u y u v x v y v
1 1 1 1
1 ve uv 1 ve uv
u u
1 ue uv 1 ve uv
v v
z 1 z 1
ve uv ; ue uv
u u v v
If the functions x xu , v , y y u , v and z zu , v have first order partial derivatives at the
point u , v , and if the function w f x , y , z is differentiable at x u , v , y u , v , z u , v , then
w f xu , v , yu , v , zu , v has first order partial derivatives at u , v given by:
w w x w y w z w w x w y w z
and
u x u y u z u v x v y v z v
w w
Example: Given that w y ln xz , x ve u , y u 2 v 4 , z ue v . Find and .
u v
Solution:
w w x w y w z y u y
ve ln xz 2uv 4 e v uv 4 u 2 ln uveu e v 1 .
u x u y u z u x z
w
Similarly, it can be shown that
u
u 2 v 3 v 4 ln uve u e v 1 (show!)
Exercise: If g u , v f u 2 v 2 , v 2 u 2 and f is differentiable, show that g satisfies the
g g
equation: v u 0.
u v
Implicit differentiation
z z
and (assume x and y are independent).
x y
z z
Example: Consider the equation: x 2 y 2 xyz z 2 10 . Find and .
x y
Solution:
x 2 y 2 xyz z 2 10 ; x 2 y 2 xyz z 2 10
2 2
x
x y 2 xyz z 2 10
y
x y 2 xyz z 2 10
z z z z
2 x 0 yz 0 xy 2 z 0 0 2 y xz xy 2 z 0
x x y y
z 2 x yz z 2 y xz
x xy 2 z y xy 2 z
z 2 x yz z 2 y xz
;
x xy 2 z y xy 2 z
f f
Solution: Let f x , y x 3 y 2 x 3 0 . Then 3 x 2 y 2 and 2 xy . Now,
x y
dy 3x 2 y 2 dy 3x 2 y 2
f x . Thus, .
dx f y 2 xy dx 2 xy
3. The local maximum and local minimum values together are called extreme values.
Note: In the inequalities in definitions 1 and 2 hold for all points x, y in the domain of f
2. Let f x , y x 2 y 2 1. Then f 0 , 0 1 f x , y x , y
Theorem: If f x , y has a local maximum value or local minimum value at x0 , y 0 and the
x 2 y 2 2 x 6 y 14 x 2 2 x 1 y 2 6 y 9 4
2 y
1
x 2 4 4 x , y
3
0 0
Suppose the second partial derivatives of f x , y are continuous on a disk with center x0 , y 0 ,
and suppose that f x x0 , y 0 0 and f y x0 , y 0 0 (i.e. x0 , y 0 is a critical Point of f x , y ).
Let D f xx x0 , y 0 f yy x0 , y 0 f xy x0 , y 0 .
2
Note: 1. If D=0, the test gives no information. f x , y could have a local maximum value or
f xx x0 , y 0 f xy x0 , y 0
D
f yx x0 , y 0 f yy x0 , y 0
f xx x0 , y0 f yy x0 , y0 f xy x0 , y 0
2
f x x , y 4 x 3 4 y ; f y x , y 4 y 3 4 x .
Now, f x x , y 4 x 3 4 y 0 & f y x , y 4 y 3 4 x 0
x 3 y 0 & y 3 x 0 x 9 x 0 x 0 ,1, 1.
f xx x , y 12 x 2 , f yy x , y 12 y 2 , f xy x , y 4
2
D x , y f xx x , y f yy x , y f xy x , y 144 x 2 y 2 16
iii) Since D 1,1 128 0 and f xx 1, 1 12 0 , f 1,1 1 is also local minimum.
2
Example: A rectangular box without a lid is to be made from 12m of
Solution: Let the length, width, and height of the box be x, y and z (in meters).
Then the volume, V of the box is: V xyz .The area of the four sides and the bottom is:
12 xy
2 xz 2 yz xy 12 z (2 x 2 y) 12 xy z .
2x 2 y
12 xy 12 xy x 2 y 2
Thus, the expression for V becomes V xyz xy .
2x 2 y 2x 2 y
V
y 2 12 x 2 2 xy ,
V
x 2 12 y 2 2 xy
2x y 2 x y
2 2
x y
y2 12 x 2
2 xy
0
Now ,
V
0
V
2
2 x y
2
y 2 12 x 2 2 xy 0
2
x y x
12 y 2 2 xy
0
x 12 y 2 2 xy 0
2 x y
2
2
y 0 or 12 x 2 xy y 0 or x 2 12 2 xy
0
x 0 or 12 y 2 2 xy
0 x 0 or y 2 12 2 xy
y 0 or x 2 y 2 y 0 or 12 3 x 2 0 y 0 or x 2
x 0 ( x y) x 0 x 0 or y 2
V
2
2
y 12 x 2 xy 2 xy 2
2 y 3 2 x y 4 x y 12 y 2 x 2 y 2 2 xy
2
x 2 x y 4 x y
2 4
x x
2V
2 2 , 2 2 ;
x
V 12 y 2 x 2 y 2 2 xy 3
24 y 2 x 2
y 6 xy 2 2 x y 4 x y 12 y 2 x 2 y 2 2 xy 3
2
y x y 2 x y
2
4 x y
4
2V 1
2 , 2 and
yx 2
V
24 x 2 4 x 3 y 2 x 2 y 2
4 x 3
2
4 x 2 y 4 x y 8 x y 24 x 2 4 x 3 y 2 x 2 y 2
y y y 2 x y
2
16 x y
4
2V
2 2 , 2 1
y
Next we calculate D2 , 2 :
D2 , 2 Vxx 2 , 2V yy 2 , 2 Vxy 2 , 2 7 4 0. Moreover, Vxx 2 , 2 2 0 .
2
12 xy
Therefore, by second derivative test V is maximum when x 2 , y 2 and z 1 .
2x 2 y
Exercises:1. Find the shortest distance from the point 1 , 0 , 2 to the plane x 2 y z 4 .
3
2. Find the minimum cost of a rectangular box with volume 48m if the front and back side cost
$1 , the top and bottom cost $ 2 2 , and the two ends cost $ 3 2 .
m2 m m
2
2. A bounded set in is one that is contained within some disk.
2
If f is continuous on a closed, bounded set D in , then f attains an absolute maximum value
f x1 , y1 and an absolute minimum value f x2 , y2 at some points x1 , y1 and x2 , y2 in D.
III. The largest of the values from steps I and II is the absolute maximum value;
and the smallest of these values is the absolute minimum value.
R x , y : 0 x 3 , 0 y 2.
Solution: Since f is continuous on a closed, bounded rectangle R, f has both absolute maximum
and absolute minimum.
f x x , y 2 x 2 y 0 , f y x , y 2 x 2 0 x y & x 1 .
- On L1 , y 0 and f x , 0 x 2 , 0 x 3 .
f 0 , 0 0 and f 3 , 0 9 are minimum and maximum values of f on L1 respectively.
- On L2 , x 3 and f 3, y 9 4 y , 0 y 2 .
f 3 , 2 1 and f 3 , 0 9 are minimum and maximum values of f on L2 respectively.
- On L3 , y 2 and f x , 2 x 2 4 x 4 , 0 x 3 .
f 2 , 2 0 and f 0 , 2 4 are minimum and maximum values of f on L3 respectively.
- On L4 , x 0 and f 0 , y 2 y , 0 y 2 .
f 0 , 0 0 and f 0 , 2 4 are minimum and maximum values of f on L4 respectively.
Hence, on the boundary, the maximum value of f is 9 and the minimum value is 0.
Step III) We compare the values from step I and step II.
Exercise: Find the maximum and minimum values attained by the function
f x , y xy x y 3 at points of the triangle region R in the xy-plane with vertices at 0 , 0 ,
2 , 0 and 0 , 4 .
In example (*), we maximized the volume function V xyz subject to the condition
2 xz 2 yz xy 12 . Such a condition on the values of x , y , and z is known as constraint (or
side condition).
Note:
f x x , y , z g x x , y , z , f y x , y, z g y x , y, z , f z x , y, z g z x , y , z , g x , y, z k
3. For functions of two variables the method of Lagrange multiplier is similar to the method
for functions of three variables. To find the extreme values of f x , y subject to the
constraint g x , y k , we look for values of x, y and such that f x , y g x , y
and g x , y k .
4. In the case of two constraints g x , y, z k and h x , y, z c ,we find the values of f
x , y , z , and ( and are called Lagrange multipliers) such that
f x , y, z g x , y, z h x , y, z . That is,
f x x , y , z g x x , y , z hx x , y , z
f y x , y, z g y x , y, z h y x , y, z
f z x , y , z g z x , y , z hz x , y , z
g x , y, z k
h x , y, z c
2
Example: A rectangular box without a lid is to be made from 12m of card board. Find the
maximum volume of such a box.
2 xz xy 2 yz xy xz yz But z 0 z 0 V 0 x y
2 yz xy 2 xz 2 yz xy 2 xz But x 0 x 0 V 0 y 2z
2 2 2
If we now put x y 2 z in 2 xz 2 yz xy 12 , we get 4 z 4 z 4 z 12
z 2 1 z 1(as z 0) . Since x , y , and z are all positive, we have z 1, x 2 , and y 2
as before.
to the constraint g x , y x 2 y 2 1 .
Now, 2 x 2 x x x x x 0 x1 0 x 0 or 1.
Thus, f has possible extreme values at the points 0 ,1 , 0 , 1 , 1, 0 and 1, 0 .
Exercise: Find the points on the sphere x 2 y 2 z 2 4 that are closest to and farthest from
the point 3 ,1 , 1 .
f x , y, z g x , y, z h x , y, z
i.e. f x x , y , z g x x , y, z hx x , y , z ; 1 2x
f y x , y , z g y x , y , z h y x , y, z ; 2 2 y
f z x , y, z g z x , y, z h z x , y , z ; 3
g x , y, z k ; x y z 1
h x , y, z c ; x2 y2 1
1 25 29 29
2
2
1 2 .
4 4 2
2 5 7
Then x ,y and from z 1 x y , z 1 .
29 29 29
Exercise: Use Lagrange multipliers to find the maximum and minimum values of the function
f x , y , z x 2 y subject to the constraints x y z 1and y 2 z 2 4 .