Functions of Several Variables
Functions of Several Variables
Functions of Several Variables
Suppose that D is a set of ordered pairs of real numbers (x, y). A real-valued
function f of two variables on D is a rule that assigns a unique real number
z = f (x, y) to each ordered pair (x, y) in D. The set D is the domain of f ,
and the set of z-values taken on by f is its range. The independent variables
x and y are the function’s input variables, and the dependent variable z is the
function’s output variable.
Example 1
Solution
Surfaces
Example 3
1
Hint
Exercise
1. f (x, y) = √ 1 2 2
16−x −y
p
2. f (x, y) = 9 − x2 − y 2 ,
3. f (x, y) = ln (x2 + y 2 ),
2
+y 2 )
4. f (x, y) = e−(x ,
5. f (x, y) = arcsin(y − x),
If the values of a real-valued function f (x, y) lie close to a fixed real num-
ber L for all points (x, y) sufficiently close to the point (x0 , y0 ) but not equal to
(x0 , y0 ), we say that L is the limit of f as (x, y) approaches (x0 , y0 ), written as
lim f (x, y) = L.
(x,y)→(x0 ,y0 )
In the (x, y) plane there are an infinite number of ways of approaching a point
(x0 , y0 ). If f (x, y) does not approach the same number L for two different paths
to (x0 , y0 ) then lim(x,y)→(x0 ,y0 ) f (x, y) does not exist.
Example 1
x−xy+3 0−(0)(1)+3
1. lim(x,y)→(0,1) x2 y+5xy−y 3 = (0)2 (1)+5(0)(1)−(1)3 = −3.
2
x2 −xy √ √
2. lim(x,y)→(0,0) √ Since the denominator ( x − y) approaches 0 as
√ .
x− y
√ √
(x, y) → (0, 0), we multiply numerator and denominator by ( x + y),
producing an equivalent fraction whose limit we can find:
√ √
x2 − xy (x2 − xy)( x + y)
lim √ √ = lim √ √ √ √
(x,y)→(0,0) x− y (x,y)→(0,0) ( x − y)( x + y)
√ √
(x2 − xy)( x + y)
= lim √ √ √ √
(x,y)→(0,0) ( x − y)( x + y)
√ √
x(x − y)( x + y)
= lim
(x,y)→(0,0) x−y
√ √
= lim x( x + y)
(x,y)→(0,0)
√ √
= 0( 0 + 0)
= 0.
Example 2
x2 −3y 2
Show that lim(x,y)→(0,0) x2 +2y 2 does not exist.
Solution
The function f (x, y) is defined everywhere except at (0, 0). Two ways of ap-
proaching (0, 0) are along the x-axis (y = 0) and along the y-axis (x = 0) we
have;
x2 −0
on y = 0 : lim(x,0)→(0,0) f (x, 0) = x2 +0 = 1,
−3y 2 −3
on x = 0 : lim(0,y)→(0,0) f (0, y) = lim(0,y)→(0,0) 2y 2 = 2 .
−3
Therefore the limit does not exist since 1 6= 2 .
Example 3
xy
Show that lim(x,y)→(0,0) x2 +y 2 does not exist.
Solution
However this does not mean lim(x,y)→(0,0) f (x, y) exists since we have examined
every path to (0, 0). We try any line through the origin given by y = mx.
3
x2 x2
e.g. on y = x, lim(x,y)→(0,0) f (x, y) = x2 +x2 = 2x2 = 12 .
2x2 2x2
on y = 2x, lim(x,y)→(0,0) f (x, y) = x2 +4x2 = 5x2 = 52 .
-δ definition of a limit
Example 4
Show that
xy
lim p =0
(x,y)→(0,0) x2 + y 2
Solution
p
We need to show that for > 0, there exist δ > 0 : if 0 < x2 + y 2 < δ,
then
xy
p < .
x2 + y 2
Since
(|x| − |y|)2 ≥ 0
|x|2 + |y|2 ≥ 2|x||y|
1 2
|x||y| ≤ (x + y 2 ),
2
thus p
xy xy x2 + y 2 1p 2 δ
p = 2 2
≤ x + y2 < .
x2 + y 2 x +y 2 2
Therefore, if we choose δ = 2, then
p for every > 0, there exist δ > 0 : if (x, y) is
in the domain and satisfies 0 < (x − a)2 + (y − b)2 < δ then |f (x, y) − L| < .
1.2 Continuity
Definition
4
2. lim(x,y)→(x0 ,y0 ) f (x, y) exists,
3. lim(x,y)→(x0 ,y0 ) f (x, y) = f (x0 , y0 ).
A function is continuous if it is continuous at every point of its domain.
Example 1
x+2y
Is the function f (x, y) = x2 +y continuous at (1, 4).
Solution
x+2y
lim(x,y)→(1,4) x2 +y = 59 . Therefore f (x, y) is continuous at (1, 4)
Example 2
x
The function f (x, y) = y+2x is continuous except at the points on the line
y = −2x.
Example 3
x2 −y 2
Evaluate lim(x,y)→(1,1) x−y
Solution
x2 −y 2 (x−y)(x+y)
lim(x,y)→(1,1) x−y = lim(x,y)→(1,1) x−y = lim(x,y)→(1,1) (x + y) = 2.
Example 4
Solution
The function f is continuous at any point (x, y) 6= (0, 0) because its values
are then given by a rational funtion of x and y. At (0, 0), the value of f is de-
fined , but f , has no limit as (x, y) → (0, 0) because different paths of approach
to the origin lead to different results.
2
Along a line y = mx, x 6= 0, f (x, mx) = x22mx 2m
+m2 x2 = 1+m2 . Therefore for
every value m, the funtion f has a constant value on the line y = mx. Thus f
has this number as its limit as (x, y) approaches (0, 0) along the line
2m
lim f (x, y) = lim f (x, mx) = .
(x,y)→(0,0) (x,y)→(0,0) 1 + m2
5
The limit changes with m. There is therefore no single number we may call the
limit of f as (x, y) approaches (0, 0). The limit fails to exist, and the function
is not continuous.
Exercise
1. Find the limits
(a) lim(x,y)→(0, π4 ) sec x tan y,
(b) lim(x,y)→(0,ln 2) ex−y
Solution
∂f
To find ∂x , treat y as a constant and differentiate with respect to x.
∂f ∂ 2
= (x + 3xy + y − 1),
∂x ∂x
= 2x + 3(1)(y) + 0 − 0,
= 2x + 3y,
∂f
= 2(4) + 3(−5)
∂x (4,−5)
= −7.
6
∂f
= 3(x) + 1,
∂y
∂f
= 3(4) + 1,
∂y (4,−5)
= 13.
Solution
Solution
∂ 2y
fy = ,
∂y y + cos x
∂ ∂
(y + cos x) ∂y (2y) − 2y ∂y (y + cos x)
= ,
(y + cos x)2
(y + cos x)(2) − 2y(1)
= ,
(y + cos x)2
2 cos x
= .
(y + cos x)2
7
Example: Implicit partial differentiation
∂z
Find ∂x if the equation yz − lnz = x + y defines z as a function of two in-
dependent variables x and y and the partial derivatives exist.
Solution
Differentiate both sides of the equation w.r.t x holding y constant and treating
z as a differentiable function of x i.e. z = z(x, y).
∂ ∂ ∂ ∂
(yz) − (ln z) = (x) + (y),
∂x ∂x ∂x ∂x
∂z 1 ∂z
y − = 1 + 0,
∂x z ∂x
1 ∂z
y− = 1,
z ∂x
∂z z
= .
∂x yz − 1
Example 5 : Finding the slope of a surface in the y-direction.
Solution
∂z ∂ 2
= (x + y 2 )
∂y (1,2) ∂x (1,2)
= 2y
(1,2)
= 2(2) = 4,
8
Example 1
∂2f ∂2f ∂2f ∂2f
If f (x, y) = x cos y + yex , find ∂x2 , ∂y∂x , ∂y 2 , and ∂x∂y .
Solution
∂f ∂
∂x = ∂x (x cos y + yex ) = cos y + yex .
∂f ∂
∂y = ∂y (x cos y + yex ) = −x sin y + ex .
∂2f ∂ ∂f ∂
∂y∂x = ∂y ∂x = ∂y (cos y + yex ) = − sin y + ex .
∂2f ∂ ∂f
∂x∂y = ∂x ∂y = − sin y + ex .
∂2f ∂ ∂f
∂x2 = ∂x ∂x = yex .
∂2f ∂ ∂f
∂y 2 = ∂y ∂y = −x cos y.
Example
W = xy
π
w.r.t t along the path x = cos t, y = sin t. What is the derivative’s value at t = 2?
Solution
dW ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt
∂(xy) d(cos t) ∂(xy) d(sin y)
= +
∂x dt ∂y dt
9
= (y)(− sin t) + (x)(cos t)
= (sin t)(− sin t) + (cos t)(cos t)
= − sin2 t + cos2 t
= cos(2t)
dW
dt = cos( 2π
2 ) = cos π = −1.
t= π
2
Example
df
Given f (x, y) = 2x − 3xy and x(θ) = 2 cos θ, y(θ) = sin θ. Find dθ .
Solution
df ∂f dx ∂f dy
= +
dθ ∂x dθ ∂y dθ
= (2 − 3y)(−2 sin θ) + (−3x) cos θ
= (6y − 4) sin θ − 3x cos θ
= 6 sin2 θ − 4 sin θ − 6 cos2 θ
Chain rule for two independent variables and two intermediate
variables
∂W ∂W ∂x ∂W dy ∂W ∂W ∂x ∂W dy
∂r = ∂x ∂r + ∂y dr and ∂s = ∂x ∂s + ∂y ds .
Example
∂W ∂W
Express ∂r and ∂s in terms of r and s if W = x2 + y 2 , x = r − s, y = r + s.
Solution
∂W ∂W ∂x ∂W dy
= +
∂r ∂x ∂r ∂y dr
= (2x)(1) + (2y)(1)
= 2(r − s) + 2(r + s)
= 4r.
And
∂W ∂W ∂x ∂W dy
= +
∂s ∂x ∂s ∂y ds
= (2x)(1) + (2y)(1)
= −2(r − s) + 2(r + s)
= 4s.
10
Implicit differentiation
Theorem
Suppose that F (x, y) is differentiable and that the equation F (x, y) = 0 de-
fines y as a differentiable funtion of x. Then at any point where Fy 6= 0,
dy Fx
=− .
dx Fy
Example
dy
Use theorem to find dx if y 2 − x2 − sin xy = 0.
Solution
Definition
If we move from (x0 , y0 ) to a point (x0 + dx, y0 + dy) nearby, the resulting
change
df = fx (x0 , y0 )dx + fy (x0 , y0 )dy
is called the total differential of f.
11
1. z = x2 sin 4y, [Ans. dz = 2x sin 4ydx + 4x2 cos 4ydy]
6y 2
p 2x
2. z = 2x2 − 4y 3 , [Ans. dz = √ dx −√ dy]
2x2 −4y 3 2x2 −4y 3
1 1
3. F (r, s, t) = r3 s−2 − 4t 2 , [Ans. dF = 3r2 dr − 2s−3 ds − 2t− 2 dt]
Types of change
Example
The pressure P of an enclosed ideal gas is given by P = K VT where V is
volume, T is temperature and K is a constant. Given that the percentage er-
rors in measuring T and V are at most 0.6% and 0.8% respectively, find the
approximate maximum percentage error in P .
Solution
dT dV
Given that T × 100 ≤ 0.6 and V × 100 ≤ 0.8
K KT
dP = dT − 2 dV
V V
Dividing throughout by P
dP K KT V
= dT − 2 dV ×
P V V KT
dT dV
= −
T V
≤ |0.006 − 0.008|
= | − 0.002|
= 0.002
= 0.2%
12
Therefore the maximum percentage error in P is 0.2%.
Example
√ √
4
Use the concept of the differential to find an approximation to 102 + 80.
Solution
√ √
Let f (x, y) = x+ 4 y, where x = 100, dx = 2, y = 81, dy = −1.
1 1
df = √ dx + √ dy
2 x 4( 4 y)3
1 1
= √ (2) + √ 4
(−1)
2 100 4( 81)3
1 1
= −
10 108
= 0.09074074
√ √
4
f (100, 81) = 100 + 81 = 10 + 3 = 13
Application
PV
P V = N RT where N R is a constant. We can write T = N R = KP V. Suppose
◦ 3
at 25 C, gas is expanding in a cylinder of 55cm at a pressure of 3atm. Also
suppose that the pressure is increased by 0.1 atm and the volume is decreased
by 0.05m3 . Find the approximate change in temperature.
Solution
dT = KP dV + KV dP
= K[3(−0.05) + 55(0.1)]
= 5.35K
5
= × 5.35
33
= 0.81060606.
13
Example
Suppose that a cylindrical can is designed to have a radius of 1in. and a height
of 5in., but the radius and height are off by the amounts dr = +0.03 and
dh = −0.1. estimate the resulting absolute, relative and percentage changes in
the volume of the can.
Solution
Solution
14
The approximate error ≈ ±5.0cm3 .
Find the critical points f (x, y) by solving the system fx = 0 and fy . Call each
such point (a, b). Apply the second derivative test. Let
2
D(x, y) = fxx fyy − fxy .
Then,
• If D(a, b) > 0 and fxx (a, b) < 0 then f has a local maximum at (a, b),
• If D(a, b) > 0 and fxx (a, b) > 0 then f has a local minimum at (a, b),
• If D(a, b) < 0 and fxx (a, b) < 0 then f has neither a local maximum or
minimum at (a, b), it has a saddle point,
• If D(a, b) = 0, then the test is inconclusive.
Example
Find the local extreme values of the function f (x, y) = xy −x2 −y 2 −2x−2y +4.
Solution
fx = y − 2x − 2 = 0,
fx = y − 2x − 2 = 0,
Solving gives x = y = −2. Therefore the point (−2, −2) is the only critial point.
2
D(−2, −2) = fxx fyy − fxy = (−2)(−2) − (1)2 = 4 − 1 = 3. The
2
combination fxx < 0 and fxx fyy − fxy > 0 tells us that f has a local maximum
15
at (−2, −2). The value of f at this point is f (−2, −2) = 8.
Example
Solution
2
fxx fyy − fxy = −1. Hence, the function has a saddle point at (0, 0).
Therefore f (x, y) = xy has no local extreme values.
Exerise
Find the local maximum, minimum values or saddle points of the given
functions.
1. f (x, y) = x2 + y 2 + 4x − 6y. [Ans. Min f (−2, 3) = −13].
2. f (x, y) = x3 − 3xy + y 3 . [Ans. Min f (1, 1) = −1, saddle point (0, 0)].
x2 y 2 −8x+y
3. f (x, y) = xy . [Ans. Max f (− 12 , 4) = −6].
The method
Suppose tha f (x, y, z) and g(x, y, z) are differentiable. To find the local maxi-
mum and minimum values of f subjet to the constraint g(x, y, z) = 0, find the
values of x, y, z and λ that simultaneously satisy the equations;
For the functions of two independent variables, the appropriate equations are,
∇f = λ∇g and g(x, y) = 0.
Example
Find the greatest and smallest values that the function f (x, y) = xy takes
2 2
on the ellipse x8 + y2 = 1.
16
Solution
NB
At (−2, 1)
Example
Solution
17
∇f = λ∇g; 3î + 4ĵ = 2xλî + 2yλĵ
g(x, y) = x2 + y 2 − 1 = 0.
The gradient equation implies that λ 6= 0 and gives
3
x= 2λ ; y = λ2 .
The equation g(x, y) = 0 gives,
3 2 2 2
+ − 1 = 0,
2λ λ
9 + 16 = 4λ2
5
λ = ± .
2
3
Thus x = 2λ = ± 35 , y = 2
λ = ± 45 ,
and f (x, y) = 3x + 4y has extreme values at (x, y) = ± 35 .
3 35 + 4 45 = 25 5 = 5 (max.)
3 −35 + 4 −4 5 = −25
5 = −5 (min.)
∂f ∂f
∇f = i+ j
∂x ∂y
obtained by evaluating the partial derivatives of f at P0 .
18