MA2001 - Differential Calculus of Multivariable Functions 1314A
MA2001 - Differential Calculus of Multivariable Functions 1314A
1 Introduction
Quantities of interest in real problems usually depend on more than one variable.
Examples
(a) The height of the ground at map coordinates x, y might be expressed mathematically as
Height h x, y .
(b) The temperature in a lecture room varies with position and time, Temperature = T x, y, z, t .
(c) The volume of a rectangular box of length x, width y and height z is V x, y, z xyz .
(d) The magnitude of the electric potential u x, y, z due to a uniformly charged sphere with total
Q
charge Q is u x, y, z , x 2 y 2 z 2 a 2 , where a is the radius of the sphere.
4 0 x y z
2 2 2
where x1, x2 , , xn are the independent variables and z is the dependent variable. f x
T
is a scalar field.
It is possible to visualize a function of two variables (a surface in 3-D space) by drawing its graph. One
way is to draw a contour map. A level curve of f x, y is a set of points x, y for which f x, y c ,
where c is a constant.
A collection of level curves then forms a contour map (as in the familiar contour maps produced by map
makers).
Examples
(a)
1
Level curves of a function are defined in the same manner as one obtains contour lines for a topographical
map.
Contour map
(b)
Contour map
2
Level curves shown on the graph of f x, y x 2 y 2
(c)
3
Some level curves on the graph of f x, y x 2 y 2
Computer generated graphs usually show lines for which x is constant and lines for which y is constant in
order to give a picture of the surface.
Examples
4
Part (a) shows a computer-generated graph of z x 2 y 2 . Part (b) shows this graph with level curves
lifted to it.
lim f x, y f 0 .
x x0
y y0
Note that the limit exists only if, f x, y is approaching f 0 independently of the manner in which
5
x, y is approaching x0 , y0 .
Example
lim
( x , y )(1, 2 )
x 2
3 y 2 xy 12 3 2 2 1 2 15 .
Example
x2
Show that f x, y has no limit at the origin.
x2 y2
Solution:
x2
As x, y 0,0 along the line y 0 , f x, 0 2 1 and the limiting value is 1.
x
x2
Hence lim does not exist.
x , y 0,0 x 2 y 2
x2
z , 1 x 1, 1 y 1
x2 y 2
Example
x2
Show lim 0
x , y 0,0 1
x 2
y
2 2
Solution:
Now,
6
x2 y2
x 2 y 2 2 .
x2 1
0
x y 2 2 x y 2 2
1 1
2 2
1
x2
We observe that lim
x , y 0,0
x 2
y
2 2
0 . Therefore, lim
x , y 0,0 1
0
x 2
y
2 2
( x0 , y0 ) and lim f x, y f ( x0 , y0 ) .
x , y ( x0 , y0 )
Examples
Solution:
lim
x , y x0 , y0
f x, y lim
x , y x0 , y0
x 2
3 y 2 xy x0 2 3 y0 2 x0 y0 .
x2
(b) f x, y is continuous everywhere except at the origin where f x, y is not defined.
x2 y 2
Solution:
x0 2
If x0 , y0 0,0 then f x0 , y0 is defined at x0 , y0 and f x0 , y0 2 . In addition,
x0 y02
x2 x0 2
lim f x, y lim 2 f x0 , y0 .
x , y x0 , y0 x , y x0 , y0 x 2 y 2 x0 y02
x2
1 x, y 0,0
(c) f x, y x 2 y 2 2 is continuous everywhere iff A 0 .
A x, y 0,0
Solution:
x2
x2 1 x, y 0,0
Since lim 0 , f x, y x 2 y 2 2 is continuous everywhere iff
x , y 0,0 1
x 2
y
2 2
A x, y 0,0
A0.
7
Example
Give an example of a function f x, y such that f x, y has the same limit as f 0,0 when
x, y approaches 0,0 along any straight line passing through the origin, however, the function is not
continuous at 0,0 .
Solution:
Consider the function:
2 xy 2
if x, y 0, 0
f x, y x 2 y 4 .
0 if x, y 0, 0
Suppose x, y is approaching 0,0 along the line x t cos , y t sin where is an angle made
counterclockwise from the positive direction of x-axis to the line x t cos , y t sin and t is any real
number.
Then if cos 0
2t 3 cos sin 2
2t cos sin 3 2
lim f x, y lim f t cos , t sin lim 2 lim t2
( x , y ) (0,0) t 0 t 0 t cos 2 t 4 sin 4 t 0 t 2 cos 2 t 4 sin 4
x t cos
y t sin t2
2t cos sin 2 0
lim 0 f 0, 0
t 0 cos t sin cos 2
2 2 4
However, if x, y is approaching 0,0 along the curve x t 2 , y t where t is any real number, we
2t 4
have lim f x, y lim f t , t lim 4 4 1 0 f 0, 0 .
2
x , y (0,0) t 0 t 0 t t
x t 2
y t
3 Partial Differentiation
8
Recall that for a function f x of one variable
f ( x0 h ) f ( x0 ) f x f x0
df
x0 lim or
df
x0 lim
dx h0 h dx x x0 x x0
Now consider the function f x, y of two variables. If y is held constant, say y y 0 , then
f ( x, y0 ) becomes a function of one variable, x and we may define its derivative at x 0 , the partial
f f x0 h, y0 f x0 , y0 f f x, y0 f x0 , y0
x0 , y0 lim or x0 , y0 xlim
x h 0 h x x0 x x0
AB – curve of f x, y0
9
CD – curve of f x0 , y
Note:
(a) A partial derivative is just an ordinary derivative with respect to the variable which is not held
constant.
(b) For z f ( x, y ) , alternative notations are:
f z
x, y f x x , y x , y z x x , y
x x
f z
and similarly for x, y f y x, y x, y z y x, y .
y y
(c) The definition of a partial derivative only requires the idea of a limit of a function of a single
variable.
Example
Solution:
f f
f x, y x 2 y y 3 sin x 2 xy y 3 cos x, x 2 3 y 2 sin x
x y
Example
f
Evaluate 1, 2 for f x, y x2 y y3 sin x .
x
Solution:
Method 1:
f
1,2 2 x 2 8sin x
d
Consider f x,2 2 x 2 8sin x . Then x 1 4 x 8cos x x 1 4 8cos1 .
x dx
Method 2:
f f
f x, y x 2 y y 3 sin x 2 xy y 3 cos x . Then 1, 2 2 xy y 3 cos x x 1 4 8cos1 .
x x y 2
Example
Solution:
f f f
f x, y, z e2 z cos xy e2 z y sin xy, e 2 z x sin xy, 2e 2 z cos xy .
x y z
10
We may differentiate the first partial derivatives of a function again to obtain second partial derivatives.
2 f f 2 f f 2 f f 2 f f
f xx , f yy , f xy , f yx .
xx x x yy y y yx y x xy x y
Example
1
Let f x, y log x 2 y 2 2 , find its partial derivatives up to order two.
Solution:
1
f f
f ( x, y ) log x y x y
2 2 2
fx 2 , fy 2
x x y 2
y x y 2
2 f f x 1 2 x2 y2 x2
f xx 2 2
x x x x x y 2 x 2 y 2 x 2 y 2 2 x 2 y 2 2
2 f f x2 y2 f x 2 xy
, f yy , f xy 2 ,
y 2
y y x 2 y 2 2
y x y x y x 2 y 2 2
2
f y 2 xy
f yx 2 2
x y x x y x 2 y 2 2
Note that in the above example f xy f yx , which is the case for most functions that are useful in
Example
xy x 2 y 2
if x, y (0, 0)
f x, y x 2 y 2
0 if x, y (0, 0)
(c) Show that f xy 0,0 , f yx 0,0 exist but they are not equal.
Slolution:
(a)
11
There is a theorem saying that if f xy x, y & f yx x, y exist at x0 , y0 and nearby and
Now, if x, y 0,0
xy x y 4 x 2 y 3 x 4 y y 5 y 6 9 x 2 y 4 9 x 4 y 2 x 6
2 2
f xy x, y
y x x 2 y 2 y x 2 y 2 2 x2 y2
3
4 y 2 x 3 y 4 x x 5 y 6 9 x 2 y 4 9 x 4 y 2 x 6
f yx x, y
x
x 2
y
2 2
x 2
y
2 3
So f xy x, y f yx x, y
(b)
f x, 0 f 0, 0 00 f 0, y f 0, 0 00
f x 0, 0 lim lim 0 , f y 0, 0 lim lim 0
x 0 x x 0 x y 0 y y 0 y
(c)
xy x 2 y 2
0
f x, y f 0, y x2 y2 y x2 y 2
If y 0 , f x 0, y lim lim lim y
x 0 x x 0 x x 0 x2 y2
y if y 0
Thus, f x (0, y ) y, y
0 if y 0
f x 0, y f x 0, 0 y 0
f xy 0, 0 lim lim 1
y 0 y y 0 y
Similarly,
xy x 2 y 2
0
f x, y f x , 0 x2 y 2 x x2 y 2
If x 0 , f y x, 0 lim lim lim x
y 0 y y 0 y y 0 x2 y 2
Thus, f Y ( x,0) x
fY x, 0 fY 0, 0 x0
f yx 0, 0 lim lim 1
x 0 x x 0 x
12
y6 9 x2 y 4 9 x4 y 2 x6
if x, y 0, 0
For f xy x, y x2 y 2
3
1 if x, y 0, 0
Example
1
f f
If f f u log u and u x 2 y 2 2 , evaluate , .
x y
Solution:
f df u 1 1 2 1 1
x y 2x x y 2x 2
2 2 1 1 2 2 2 x
.
x du x u 2 1
2 x y2
(x y ) 2 2 2
f df u y
And 2 .
y du y x y 2
Theorem
dz f dx f dy
If z f x, y and x x t , y y t then .
dt x dt y dt
Proof:
13
z t t z t f x t t , y t t f x t , y t
lim
dz
lim .
dt t0 t t 0 t
f x t t , y t t f x t , y t f x x, y y f x, y
AC AR RC PB RC
f x x, y f x, y f x x, y y f x x , y
, and
14
z t t z t f x t t , y t t f x t , y t
lim
dz
lim
dt t 0 t t 0 t
f x x, y f x , y f x x , y y f x x , y
lim
t 0 t
f x x, y f x , y x f x x , y x f x x , y y
lim
t 0
x t y t
f x x, y f x , y x f x x, y x f x x , y y
lim lim lim lim
x 0 x t 0 t y 0 y t 0 t
f dx f dy
x dt y dt
Example
dz
Let z f x, y x 2 2 xy and x sin t and y cos t , find .
dt
Solution:
dz f dx f dy
2 x 2 y cos t 2 x sin t 2sin t 2cos t cos t 2sin t sin t
dt x dt y dt
sin 2t 2cos 2t
A special case is when z f x, y and y y x , that is, x x and hence z is a function of x only.
dz f dx f dy f f dy
Then .
dx x dx y dx x y dx
Example
x dz
z f x, y tan 1 , y sin x , find .
y dx
Solution:
dz f dx f dy f f dy y x sin x x cos x sin x x cos x
2 2 cos x 2 2 2 .
dx x dx y dx x y dx x y 2
x y 2
x sin x x sin x
2 2
x sin 2 x
15
d 2z
Let z = f x, y , x = x t , y = y t , evaluate .
dt 2
Solution:
dz f dx f dy
.
dt x dt y dt
d z d dz d f dx f dy f d x d f dx f d y d f dy .
2 2 2
dt
2
dt dt dt x dt y dt x dt 2 dt x dt y dt 2 dt y dt
f
We observe that is depending on x and y directly, depending indirectly on t through x and y
x
d f
respectively. To evaluate we need the Chain Rule and we have
dt x
d f f dx f dy 2 f dx 2 f dy
.
dt x x x dt y x dt x 2 dt yx dt
d f f dx f dy 2 f dx 2 f dy
dt y x y dt y y dt xy dt y 2 dt
For the same reason, .
d z f d x d f dx f d y d f dy
2 2 2
dt
2
x dt 2 dt x dt y dt 2 dt y dt
f d 2 x f dx f dy dx f d 2 y f dx f dy dy
x dt 2 x x dt y x dt dt y dt 2 x y dt y y dt dt
f d 2 x 2 f dx 2 f dy dx f d 2 y 2 f dx dy 2 f dy
2 2
x dt 2 x 2 dt yx dt dt y dt 2 xy dt dt y 2 dt
Example
z f x, y , x t 2 , y t . Suppose
f f
1,1 1,1 2 1,1 2 1,1 e, 1,1 1,1 2e . Evaluate d 2 for t 1
2 2 2 2 2
f f f f z
x y x y xy yx dt
Solution:
dx d 2x dy d2y
x t2 2t , 2 2 , y t 1, 2 0 . If t 1 , then x 1, y 1 .
dt dt dt dt
So
f 2 f 2 f
2
d z
2
d 2x dx dy dx
t 1 1,1 2 t 1 2
1,1 t 1 1,1 t 1 t 1
dt
2
x dt x dt yx dt dt
f 2 f 2 f
2
1,1 t 1 t 1 2 1,1
d2y dx dy dy
1,1 2 t 1 t 1
y dt xy dt dt y dt
e 2 e 4 2e 1 2 e 0 2e 2 1 e 1 15e
16
Theorem (Change of Variable)
z z
If z f x, y and x x s, t , y y s, t , find , .
s t
Solution:
z f x f y z f x f y
, .
s x s y s t x t y t
Example
z z
If z f x, y e2 xy and there is the change of variables x r cos , y r sin , find , .
r
Solution:
z f x f y
2 ye2 xy cos 2 xe2 xy sin 2rer sin 2 sin 2 and
2
r x r y r
z f x f y
2 ye2 xy r sin 2 xe2 xy r cos
x y
.
sin 2
2rer cos 2
2
x r cos
y r sin
Again these results may be checked by substitution and direct partial differentiation.
2 z z f x f y f x f y
t 2 t t t x t y t t x t t y t
f x f x f y f y
t x t x t t t y t y t t
f f
We observe that both , are depending on x and y directly, depending indirectly on t through x and
x y
f f
,
t x t y
y respectively. To evaluate we need the Chain Rule and we have
17
f f x f y 2 f x 2 f y
t x x x t y x t x 2 t yx t
f f x f y 2 f x 2 f y
t y x y t y y t xy t y 2 t
It follows that
z f x f x f y f y
2
t
2
t x t x t t t y t y t t
2 f x 2 f y x f 2 x 2 f x 2 f y y f 2 y
2 2
x t yx t t x t xy t y t t y t
2 2
2 f x 2 f y x f 2 x 2 f x y 2 f y f 2 y
2 2
2
x t yx t t x t 2 xy t t y 2 t y t 2
2 f x 2 f x y 2 f y f 2 x f 2 y
2 2
2 2
x t xy t t y 2 t x t 2 y t 2
Example
2 z 2 f 2 f 2 f
2
cos 2
2sin cos sin .
r 2 x 2 xy y 2
Solution:
z f x f y f f
cos sin .
r x r y r x y
2 z z f f f f
cos sin cos sin
r 2
r r r x y r x r y
2 f x 2 f y 2 f x 2 f y
cos 2 sin 2
x r yx r xy r y r
2 2 2
cos2 2 f ( x, y ) 2sin cos f ( x, y ) sin 2 2 f ( x, y )
x xy y
Example
2u 2u
Show that in polar coordinates r , in R 2 , Laplace's equation 2u 0 takes the
x 2 y 2
2u 1 2u 1 u
form 2 2 0.
r r 2 r r
Solution:
18
u u x u y
r x r y r
u u x u y
x y
x y x y
x r cos , y r sin cos , sin , r sin , r cos
r r
Thus,
u u u
cos sin
r x y
u u u
(r sin ) r cos
x y
Therefore,
u u u u
sin x x cos
1
r cos sin r
u r sin r cos u u r sin r cos u
y y
u sin u
x cos
r r
u sin cos u
y
r
u u sin u u u cos u
So cos (*), sin (**)
x r r y r r
f f cos f
From (**), we learn that sin . Notice that the f in the left side of (**) is a
y r r
function of x, y , however, the f in the right side of (**) after x, y being replaced by r cos and r sin ,
u
respectively, is a function of r, . Let f , therefore, we have
y
u u cos u
In addition, we notice that sin
y r r
Therefore,
2u u u cos u cos u cos u
sin sin sin
y 2
y y r r r r r r
2u cos 2 u cos u cos u 2 u sin u cos 2u
sin sin 2 2 cos sin
r r r r r r r r r r r
(1)
Similarly,
19
2u u u sin u
cos
x 2
x x r x r x
u sin u sin u sin u
cos cos cos
r r r r r r
2u sin u sin 2 u sin 2u u sin 2u cos u
cos cos 2 2 cos sin
r r r r r r r r 2 r
(2)
2u 2u 2u 1 2u 1 u
Finally, (1) (2) we have 0.
x 2 y 2 r 2 r 2 2 r r
x x0
f x, y f x0 , y0 T
T such that lim y y0 0 .
x , y x0 , y0
x x 0 y y0
2 2
x x0
f x, y f x0 , y0 T
y y0 0 lim f x, y f x0 , y0 a x x 0 b y y0
lim 0
x , y x0 , y0 x , y x0 , y0
x x 0 y y0 x x 0 y y0
2 2 2 2
Theorem
f f
Suppose f : R 2 R is differentiable at x0 , y0 , then the partial derivatives and exist at
x y
f f
x0 , y0 and the 1 2 matrix T is given by T , .
x y
Theorem
Example
xy 2
2 if x, y 0, 0
Consider the function f x, y x y
2
0 if x, y 0, 0
20
Show that
f f
(a) 0, 0 , 0, 0 exist .
x y
Proof:
f f x, 0 f 0, 0 00 f f 0, y f 0, 0 00
0, 0 lim lim 0 ; 0, 0 lim lim 0
x x 0 x0 x 0 x 0 y y 0 y 0 y 0 y 0
(b)
Proof:
f f
f x, y f 0, 0 0, 0 x 0 0, 0 y 0 t3
x y f t, t
t t
2 2 1 t
x 0 y 0 t2 t2 2 2 t
2 2
2t 2
1 t
Suppose now x, y approaches 0, 0 along the straight line y t , x t , lim
t 0
does not exist.
2 2 t
It follows that
f f
f x, y f x0 , y0 x0 , y0 x x 0 x0 , y0 y y0
x y
lim does not exist.
x , y x0 , y0
x x 0 y y0
2 2
So f ( x, y) is not differentiable at 0, 0 .
5 Implicit Functions
Let f x, y be a function of two independent variables and suppose f x x, y & f y x, y exist and are
y y x being differentiable at x 0 .
21
f1 x1 , , xn , y1 , , y m 0
The system of equations determine locally y1 , , ym as implicit functions
f x , , x , y , , y 0
m 1 n 1 m
Example
z
The equation x 3 xy 2 yz 2 z 3 5 determine z as a function of x, y. Find .
x
Solution:
Differentiating x 3 xy 2 yz 2 z 3 5 with respect to x gives
z z z y 2 3x 2
3x 2 y 2 2 zy 3z 2 0 and if 2 zy 3z 2 0 .
x x x 2 zy 3z 2
Example
dy
Find the gradient of the tangent at a point x, y of the conic
dx
f x, y ax 2 2hxy by 2 2 gx 2 fy c 0
Solution:
f
f f dy f
x whenever
dz dy
In this case 0 and we have 0;
dx x y dx dx f y
y
dy 2ax 2hy 2 g
whenever 2hx 2by 2 f 0 .
dx 2hx 2by 2 f
Example
If z e x cos y , while x and y are implicit functions of t defined by the equations
dz
x e t t 1, yt y t t y 0 then find
3 x 2 2 2
for t = 0 .
dt
Solution:
dz z dx z dy
Differentiate z = e x cos y with respect to t, we have
dt x dt y dt
22
Differentiate both sides of x3 e x t 2 t 1 with respect to t.
dx dx dx 2t 1
Then 3x 2 ex 2t 1 0 . And we have 2 , if 3x 2 e x 0 .
dt dt dt 3x e x
dx 2t 1
Therefore, t 0 t 0 1
dt 3x 2 e x x 0
dy dy dy dy 1 y 2 2 yt
2 yt t 2 2 yt y 2 1 0 . This implies .
dt dt dt dt 1 t 2 2 yt
dy 1 y 2 2 yt
For yt 2 y 2t t y 0 if t = 0 then y 0 . Therefore, t 0 t 0 1
dt 1 t 2 2 yt y 0
dz z dx z dy dx dy
Also, e x cos y e x sin y .
dt x dt y dt dt dt
dz dx dy
Finally, t 0 e x cos y x 0 t 0 e x sin y x 0 t 0 1
dt y 0
dt y 0
dt
Example
2 1
x y2 z2
Suppose we solve 2 uniquely for x, y as functions of z near x 1, y 1 . Find
x y z 2
dx dy d 2 x d 2 y
, , , when x 1, y 1, z 2 .
dz dz dz 2 dz 2
Solution:
dx dy dx 2 d 2x dy
2
d2y
2 1 (3)
dz
1 2 2 x 2 y z (1) 2 2 x 2 2 y
x y z dz
2
2
dz
dz 2 dz dz 2
x y z 2 dx dy 1 0 (2) d x d y
2 2
dz dz dz 2 dz 2 0 (4)
Put x 1, y 1, z 2 in (1) & (2), we have
dx dy
2 x 2 y z (1)
dz dz dx dy dx dy
4 0, 4 4 0, 1
dx
dy dz dz dz dz
1 0 (2)
dz dz
dx dy d 2x 1 d2y 1
Put x 1, y 1, z 2 and 0, 1 in (3) & (4) , we have , .
dz dz dz 2 4 dz 2 4
23
Example
xu yvu 2 2
Suppose that near the point x , y , u, v
1,1,1,1 we can solve 3 uniquely for u and v as
xu y 2 4
v 2
u
functions u x, y , v x, y of x and y. Compute 1,1 .
x
Solution:
xu yvu 2 2
Differentiate all equations with respect to x of 3 . We have
xu y 2 4
v 2
u u 2 v
u x yv 2u yu 0
x x x
u 3 x 3u 2 u y 2 4v 3 v 0
x x
Since x 1, y 1, u 1, v 1 , we have
u v u v
1 3 0 4 12 4 0
x x x x u u 1
9 3 1,1
1 3 u 4 v 0 1 3 u 4 v 0 x x 3
x x
x x
6 Taylor’s Theorem
h h2 h N 1
f a h f a f ' a f '' a f ( N 1) a RN h where
1! 2! N 1!
hN ( N )
RN h f a h for some 0 1 .
N!
OR
If a function f (x ) of one variable is differentiable through order n 1 in a l x a l where l 0 ,
then for any real number x such that a l x a l , we have
1! 2! N 1!
24
f ( N ) a x a
RN x x a for some 0 1 .
N
N!
h h2 h N 1 hN (N )
f h f 0 f ' 0 f '' 0 f ( N 1) 0 RN h with RN h f h for
1! 2! N 1! N!
some 0 1 .
OR
some 0 1 .
Example
1
Express the Maclaurin series of cos x (up to x 4 ) and , hence find the Maclaurin series of
1 y
1
(up to x 4 ).
cos x
Solution:
x2 x4 1
cos x 1 , 1 y y2 y3 y4 .
2! 4! 1 y
1 1 1
cos x x 2
x 4
x x42
1 1
2! 4! 2! 4!
2 3
x2 x4 x2 x4 x2 x4
1
2! 4! 2! 4! 2! 4!
x2 x4 x4 x 2 5x 4
1 1
2! 4! 4 2! 24
(up to x 4 ).
Taylor’s Theorem generalizes to a function of two variables f x, y which has continuous partial
a p, b q , a p, b q , where p, q 0 .
25
At the point a h, b k , where a p a h a p, b q b k b q , we have
1 1
f a h, b k f a , b hf x a , b kf y a , b h 2 f xx a , b 2hkf xy a , b k 2 f yy a , b
1! 2!
1 3
h f xxx a, b 3h 2kf xxy a, b 3hk 2 f xyy a, b k 3 f yyy a, b RN h, k
3!
i
1
N 1
h k f a, b RN h, k
i 0 i ! x y
where
1 N N i N i N f
N
1
RN h, k h k f a h, b k h k a h , b k
N ! x y N ! i 0 i x i y N i
1 N N N 1 N i 1 hi k N i N f
a h, b k
N ! i 0 i! xi y N i
N
h i k N i N f
a h, b k
i 0 i !( N i )! x i y N i
for some 0 1 .
OR
For the case of two variables:
1
f x, y f a , b ( x a ) f x a, b ( y b) f y a, b
1!
1
( x a) 2 f xx a, b 2( x a )( y b) f xy a, b ( y b) 2 f yy a, b RN x , y
2!
i
1
N 1
( x a) ( y b) f a, b RN x, y
i 0 i ! x y
Where
N
1
RN x, y x a y b f a x a , b y b
N! x y
1 N N N f
x a y b
N ! i 0 i
i N i
x i y N i
a x a , b y b
1 N N N 1 N i 1 x a y b
i N i
N f
N ! i 0 x i y N i
a x a , b y b
i!
x a y b
i N i
N
N f
i !( N i )! xi y N i
a x a , b y b
i 0
26
Successive terms given by Taylor’s Theorem give the tangent plane approximation to the surface
z f x, y (Taking the first two terms of the series) , a quadratic surface approximation (the first three
terms), a cubic surface (the first four terms) etc, all meeting z f x, y at the point a, b .
Example
Find the tangent plane and quadratic surface approximations given by Taylor’s Theorem at the point
1
1,0 for the cone f ( x, y ) x 2
y
2 2
. Hence estimate f 0.9,0.1 .
Solution:
x y
f x x, y 1
, f y x, y 1
,
x 2
y
2 2
x 2
y 2 2
y2 xy x2
f xx x, y 3
, f xy x, y 3
, f yy x, y 3
,
x 2
y
2 2
x 2
y 2 2
x 2
y
2 2
1
p1 x, y f 1, 0 x 1 f x 1, 0 y 0 f y 1, 0 p1 x, y x .
1!
2!
1
p2 x, y x y 2
2
Hence, using the tangent plane f 0.9,0.1 p1 0.9,0.1 0.9 . And, using the quadratic surface
f 0.9,0.1 p2 0.9,0.1 0.905 . The correct value is f 0.9,0.1 0.9055 (to 4 s.f)
27
Example
z 3 2 xz y 0 determines an implicit function z = z x, y of x and y about the point 1,1 . Use the
Taylor theorem to expand z = z x, y about the point 1,1 up to the linear terms.
Solution:
Note that from z 3 2 xz y 0 when x 1, y 1 we have z 1 .
z z z 2z z
z 3 2 xz y 0 3z 2 2z 2x 0 2 & x 1 2.
x x x 3z 2 x x y 1
z z z 1 z
z 3 2 xz y 0 3z 2 2x 1 0 2 & x 1 1
y y y 3z 2 x y y 1
z z
z x, y z 1,1 x 1 x 1 x 1 y 1
x y 1
y y 1
So z x, y 1 2 x 1 1 y 1
Example
Let f x be a smooth function, that is, f x has continuous derivatives up to any order.
f 'a f '' a
f x f a x a x a
2
1! 2!
Hence or otherwise, find the Taylor series of g x, y, z cos x y z cos x cos y cos z about the
point 0, , up to order 2.
2 2
Solution:
2
x2 1
Observe that cos x 1 , cos x x , sin x x , sin x 1 x
2 2 2 2
28
g x, y, z cos x y z cos x cos y cos z cos x sin y sin z sin x sin y cos z sin x cos y sin z
x2 1 1
2 2
1 1 y 1 z
2 2 2 2 2
1
2
1
2
x 1 y
z x y 1 2 z 2
2 2 2 2
x2 1 1
2 2
1 y z x z x y
2 2 2 2 2 2 2
1
2 2
x2 1
1 y z x z x y
2 2 2 2 2 2 2
A bound for the error involved in approximating a function near a point a, b may be obtained by
f x, y f a, b x a f x a, b y b f y a, b f x, y
29
Writing f x, y f a, b f , x a x, y b y
So from f x, y f a, b x a f x a, b y b f y a, b we have
f f
f x y , which gives the approximate change in f due to small changes x and y in x
x y
and y respectively.
Example
(a) Use Taylor’s formula to find a linear approximation of f x, y cos x cos y near the origin.
Solution:
(a)
By Taylor’s Theorem, we have
1
f x, y f 0,0 xf x 0,0 yf y 0,0 x 2 f xx x, y 2 xyf xy x, y y 2 f yy x, y , where
2
0 1.
And f 0,0 cos x cos y x 0 1, f x 0,0 sin x cos y x 0 0, f y 0,0 cos x sin y x 0 0.
y 0 y 0 y 0
(b)
The error in the approximation is
30
E x, y f x, y f 0,0 xf x 0,0 yf y 0,0
1 2
x f xx x, y 2 xyf xy x, y y 2 f yy x , y
2
1
x 2 f xx x, y 2 xyf xy x, y y 2 f yy x , y
2
E x, y
2
1 2
x f xx x, y 2 xyf xy x, y y 2 f yy x, y
1 2
2
x f xx x, y 2 x y f xy x, y y f yy x, y
2
1 2
2
x cos x cos y 2 x y cos x cos y y cos x cos y
2
1 2
2
x cos x cos y 2 x y cos x cos y y cos x cos y
2
1 2
cos x 1, 2
x 2 x y y
2
2 0.1 0.02
x 0.1,
2
cos y 1 y 0.1
Example
(a) Use Taylor’s formula to find a quadratic approximation of f x, y e x sin y at the origin.
(b) Show that in the approximation the error E x, y 1.474 103 if x 0.1 , y 0.1 and
e0.1 1.1052 .
(c) Find an approximation of e0.09 sin 0.06 with an error less than 1.474 103 .
Solution:
(a)
By Taylor’s Theorem, we have
1
f x, y f 0, 0 xf x 0, 0 yf y 0, 0 x 2 f xx 0, 0 2 xyf xy 0, 0 y 2 f yy 0, 0
2
, where 0 1 .
1 3
x f xxx x, y 3x yf xxy x, y 3xy f xyy x, y y f yyy x, y
2 2 3
1
p2 x, y f 0, 0 xf x 0, 0 yf y 0, 0 x 2 f xx 0, 0 2 xyf xy 0, 0 y 2 f yy 0, 0 ,
2
and
31
f 0, 0 e x sin y x 0 0, f x 0, 0 e x sin y x 0 0, f y 0, 0 e x cos y x 0 1
y 0 y 0 y 0
.
f xx 0, 0 e sin y
x
x 0 0, f xy 0, 0 e cos y
x
x 0 1, f yy 0, 0 e sin y
x
x 0 0
y 0 y 0 y 0
1
Hence, p2 x, y f 0, 0 xf x 0, 0 yf y 0, 0 x 2 f xx 0, 0 2 xyf xy 0, 0 y 2 f yy 0, 0 y xy .
2
(b)
The error in the approximation is
1 3
E x, y f x, y p2 x, y x f xxx x, y 3x 2 yf xxy x, y 3xy 2 f xyy x, y y 3 f yyy x, y .
6
Observe that
1 3
E x , y f x , y p2 x , y x f xxx x, y 3x 2 yf xxy x, y 3xy 2 f xyy x, y y 3 f yyy x, y
6
1 3
x f xxx x, y 3 x y f xxy x, y 3 x y f xyy x, y y f yyy x, y
2 2 3
6
1 3
x e x sin y 3 x y e x cos y 3 x y e x sin y y e x cos y
2 2 3
6
1 3 x
x e sin y 3 x y e x cos y 3 x y e x sin y y e x cos y
2 2 3
6
Thus,
1 3 x
E x, y x e sin y 3 x y e x cos y 3 x y e x sin y y e x cos y
2 2 3
6
1 0.008e0.1
0.1 e0.1 3 0.1 0.1 e0.1 3 0.1 0.1 e0.1 0.1 e0.1 1.474 10 3
3 2 2 3
sin y , cos y 1 6 6
x , y 0.1
e x e0.1
32
(c)
f 0.09, 0.06 e0.09 sin 0.06 p2 0.09, 0.06 y xy x 0.09 0.06 0.09 0.06
y 0.06 .
0.06 0.91 0.0546
7 Maxima ad Minima
In a region the global (absolute) maximum (minimum) of a function is either the greatest (least) of the
local maxima (minima) or occurs on the boundary of the region.
z f x, y x 2 3 y 2 e1 x y2
2
For a local maximum or minimum at a, b the curves lying in the two planes x a and y b must
f f
also have a maximum or minimum at a, b . Hence we must have a, b a, b 0
x y
33
It is possible to have a stationary point which is neither a local maximum nor a local minimum. If along
one path through a, b the point is a local minimum, whilst along a different path it is a local
maximum, we say that the point a, b is a saddle point. There is no equivalent point for functions of
one variable.
Theorem
Assume f x, y has the partial derivative up to the order we need and all partial derivatives are
Examples
Solution:
f x x, y 2 x
f x, y x 2 2 y 2
f y x, y 4 y
f 0,0 0 is a local minimum and 0,0 is a local minimum point and clearly f x, y 0 hence
34
(b) Determine the nature of the stationary points of f x, y 2 x x 2 2 y 2 .
Solution:
f x x, y 2 2 x, f y x, y 4 y
f x, y f 1,0 2 x x 2 2 y 2 1 x 1 2 y 2 0
2
35
(c) Determine the nature of the stationary points of f x, y x 2 2 y 2 .
Solution:
f x x, y 2 x, f y x, y 4 y .
f xx x, y 2, f yy x, y 4, f xy x, y 0
0, 0 being a saddle point can also be observed by noting that f x, y may be either positive or
36
Example
Solution:
f f
f x, y x 3 y 3 3 x y 3x 2 3, 3y2 3 .
x y
f
x 3x 3 0 x 1
2
f
3 y 2 3 0 y 1
y
Hence there are 4 stationary points 1,1 , 1, 1 , 1,1 , 1, 1 . In addition,
2 f 2 f 2 f
6 x , 6 y , 0
x 2 y 2 xy
2
2 f 2 f 2 f 2 f 2 f 2 f
Stationary Point Conclusion
x 2 xy y 2 x 2 y 2 xy
1,1 6 0 6 36 Local Minimum Point
1, 1 6 0 6 36 Local Maximum Point
1, 1 6 0 6 36 Saddle Point
1,1 6 0 6 36 Saddle Point
Example
Solution:
37
f
x 4 x
3
And 0,0 f xx 0,0 f yy 0,0 f xy2 0,0 0 the test inconclusive, but clearly 0, 0 is a local
minimum Point.
square of the vertical displacement of the data point P x0 , y0 from the line y ax b .
Determine the straight line y ax b such that the sum S of the squares of the vertical displacements
of the data points P1 1,3.1 , P2 2, 6.1 , P3 3,9.2 from the line y ax b is the smallest.
In other words, determine the values of a, b such that S is the smallest where
S
0 a 2 3.1 a b 2 6.1 2a b 3 9.2 3a b
0 S 2 3.1 a b 6.1 3a b 9.2 3a b
b
1 22 32 a 1 2 3 b 1 3.1 2 6.1 3 9.2
1 2 3 a 3b 3.1 6.1 9.2
6.1
a 3.05
14 a 6b 42.9 14 a 6b 42.9 2
6a 3b 18.4 12a 6b 36.8 b 18.4 18.3 0.1 1
3 3 30
a b2 ba
2S
Observe that 28 0 and
a 2
1 1 1 1
3.05, Saa 3.05, Sbb 3.05, Sab2 3.05, 28 6 144 168 144 24 0 .
30 30 30 30
38
1
It follows that S a, b has a local minimum value at a 3.05, b .
30
1
and 3.05, is the only local minimum point, S a, b actually has the global minimum value
30
1 1 1
S 3.05, at 3.05, and this fact can be shown as follows:
30 600 30
Due to Taylor’s expansion theorem and noticing that S a, b is a degree 2 polynomial in a, b , we have
1
S a, b S 3.05,
30
1 1
2
1 1 1 1
S aa 3.05, a 3.05 2 S ab 3.05, a 3.05 b Sbb 3.05, b
2
2 30 30 30 30 30
1 1
2
1
28 a 3.05 24 a 3.05 b 6 b
2
a 3.05
1 1 28 12
a 3.05 b 1
2 30 12 6 b
30
28 12
See that is a 2 2 real symmetric matrix which eigenvalues are 17 265 0 .
12 6
17 265 0
Then there exist a 2 2 orthogonal matrix P and the diagonal matrix D
17 265
0
a 3.05
y1 T
Let P 1 . Then
y2
b
30
39
a 3.05 T a 3.05
1 28 12 1 17 265 0
a 3.05 b 12 6 1 a 3.05 b P P 1
30 b 30 0
17 265 b
30 30
T
a 3.05 17 265 T a 3.05
0
PT P
b 1
17 265 b
1
30 0
30
17 265 y1
0
y1 y2 17 265 y12 17 265 y22 0
17 265 y2
0
a 3.05
1 1 1 28 12
It follows that S a, b S 3.05, a 3.05 b 1 0 .
30 2 30 12 6 b
30
1 1 1
Therefore, S a, b has the global minimum value S 3.05, at 3.05, .
30 600 30
Example
Find the global (absolute) maximum and global minimum values of the function
Solution:
x 2 y 2 1 , according to some theorems not mentioned f x, y can attain global maximum and global
minimum at stationary points or at those points where f x, y do not have partial derivatives or at the
5
Then g ' (t ) sin t cos t 0 sin t cos t t or
4 4
5 5
g '' t cos t sin t and g '' 0, g '' 0. g 0 g 2 1, g 2 2, g 2 2 .
4 4 4 4
5 5
It is obvious that g t attains the greatest value g 2 2 at t and the smallest value
4 4
40
g 2 2 at t
4 4
5 2 2
When t ,x ,y .
4 2 2
2 2
When t ,x ,y
4 2 2
Consider f ( x, y) x y x y 1 inside x 2 y 2 1.
2 2
f
2x 1 0
x x 1/ 2
f and f xx 2, f yy 2, f xy 0
2y 1 0 y 1/ 2
y
1 1 1 1 1 1 1 1 1 1
, f xx , f yy , f xy2 , 4 and f xx , 2 .
2 2 2 2 2 2 2 2 2 2
1 1 1 1 1
f ( x, y) x 2 y 2 x y 1 has a local minimum at , and f ,
2 2 2 2 2
1 1 1 1 1
Compare f , 2 2 and f , .
2 2 2 2 2
1 1
We conclude that f x, y x 2 y 2 x y 1 has a absolute minimum value at , and
2 2
1 1 1
f , .
2 2 2
2 2
Also f ( x, y) x 2 y 2 x y 1 has a absolute maximum value at , and
2 2
2 2
f , 2 2 .
2 2
Example
Solution:
f x ( x, y, z ) y z 0
x y 0
f x, y, z xy yz xz f y ( x, y, z ) x z 0 y 0 x y z 0
y x 0
f z ( x, y , z ) y x 0
41
1 1 1 1
However, consider the points , ,0 , , ,0 , we have
n n n n
1 1 1 1 1 1
f , ,0 2 0 f 0,0,0 f , ,0 2 .
n n n n n n
1 1 1 1
And observe that , ,0 , , ,0 can be as close to 0,0,0 as we want for sufficiently large
n n n n
For the scalar function z f x, y the partial derivatives f x x, y and f y x, y measure the rates of
change of z f x, y in the x and y directions respectively. We would like to know the rate of change in
any direction.
Consider a point P which lies on some level curve AB and a (variable) point Q on a nearby level curve
CD.
42
The rate of change of f in the direction PQ is known as the directional derivative of f x, y in the
df f f f P f Q
direction PQ and is lim where , PQ s
ds s0 s s PQ
df
Geometrically it is clear that will be a maximum in the direction normal to the level curve at P
ds
df
(since f P f Q is constant and PQ is least in that direction). is also denoted as Dn f where
ds
n is the unit vector in the direction PQ.
x s cos , y s sin
f f f f f
From Taylor’s Theorem f x y , thus cos sin
x y s x y
df f f
And as s 0 Du f cos sin (*) , where u i cos j sin
f f
f x y
x y
ds x y
df df
By considering as a function of it is easy to show that has a maximum value of
ds ds
1 f
f 2 f 2 2 y f f
when tan 1 . If we define a vector gradf f i j known as the
x y f x y
x
df df
gradient of f, its magnitude is that of the maximum value of and its direction is that in which
ds ds
its maximum value.
Hence f gives us the magnitude and direction (normal to the level curve at P) of the greatest rate of
change of f.
Also, from (*), if n is a unit vector in any other direction PQ, then n cos i sin j and
43
df
Dn f gradf n f n .
ds
Theorem
Let f : R n R and suppose f x1 x1 ,..., xn , , f xn x1 ,..., xn exist and continuous everywhere. Show
f x1 x1 ,..., xn x1
that the gradient gradf x1 ,..., xn f x1 ,..., xn 0 of f at points in the
f x ,..., x x
xn 1 n n
directions which f increases most rapidly and f x1 ,..., xn is the rate of change of f in that direction.
Proof:
v1 a1
Given v where v 1 , i.e. a unit vector and a , the straight line passing through a with
v a
n n
v1 x1 a1 v1
direction v is t , where t is any real number .
v x a v
n n n n
dg f dx1 f dxn
Dv f ... , where xi ai tvi , 1 i n .
dt x1 dt xn dt
dxi
Observe that vi , 1 i n
dt
44
dg f dx f dx
Dv f a1 ,..., an t 0 a1 ,..., an 1 t 0 ... a1 ,..., an n t 0
dt x1 dt xn dt
f f
Dv f a1 ,..., an a1 ,..., an v1 ... a1 ,..., an vn
x1 xn
f X1 a1 ,..., an v1
Dv f a1 ,..., an f a1 ,..., an v
f a ,..., a v
Xn 1 n n
1 f x a1 , a2 , a3 1
For example, if v 0 , then Dv f a1 , a2 , a3 f y a1 , a2 , a3 0 f x a1 , a2 , a3
0 f z a1 , a2 , a3 0
f x1 x1 ,..., xn x1
Now, we would to show that the gradient f x1 ,..., xn 0 of f at points in the
f x ,..., x x
xn 1 n n
v1
Let v be a unit vector i.e. v 1 . Then by Cauchy-Schawz inequality, we have
v
n
Dv f a1 , a2 , a3 f a1 , a2 , a3 v f a1 , a2 , a3 v f a1 , a2 , a3
f a1 ,..., an
In addition, let w .
f a1 ,..., an
Then,
f a1 ,..., an
Dw f a1 ,..., an f a1 ,..., an w f a1 ,..., an
f a1 ,..., an
f a1 ,..., an
2
f a1 ,..., an
f a1 ,..., an
Example
T
1 1
Let f x, y, z 10 xy xz yz and v , , 0 . Find Dv f 1,1,1 .
2 2
45
Solution:
1 1
g t f 1 t ,1 t ,1 . Then using chain rule, we have
2 2
dg f dx f dy f dz
t 0 1,1,1 0 1,1,1 0 1,1,1 0
dt x dt y dt z dt
f dx 1 1
x 1,1,1 dt 0 2 2
y z 2
f 1
1,1,1 0 x z
dy 1 4
2 2 2
y dt x 1 2 2 2
x y y 1 2
f 1,1,1 0
dz 0 0
z dt
z 1
Example
1
w f x, y , z 7400 4 x 9 y 0.03xy 2 z . Suppose a hawk hovering at the point
180
P 200,200,5 above the airport suddenly dives at a speed of 3 km/min in the direction specified by the
3,4, 12
T
vector . What instantaneous rate of change of temperature does the bird experience?
Solution:
3i 4 j 12k 3 4 12
u i j k
32 42 12 13 13 13
2
4 0.03 y 9 0.03x
The temperature gradient vector f x, y, z i j 2k has the value
180 180
4 0.03 200 9 0.03 200 10 15
f 200,200,5 i j 2k i j 2k at the initial position
180 180 180 180
P 200,200,5 of the hawk. Therefore the hawk’s initial rate of change of temperature with respect to
distance is:
10 3 12 0
15 4 C
Du f 200,200,5 f 200,200,5 u i j 2k i j k 1.808
180 180 13 13 13 km
46
ds km
Its speed is 3 , so the time rate of change of temperature experienced by the hawk is
dt min
dw dw ds ds 0
C km 0
C
Du w 1.808 3 5.424 .
dt ds dt dt km min mim
Thus the hawk initially gets warmer by almost 5.5 degrees per minute as it dives toward the ground.
Example
f
(a) Determine the value of a, b, c such that the value of the partial derivative at P 1, 2, 1 is the
z
(b) Let a, b, c be the values found in (i), find the directional derivative Dv f 1, 2, 1 with
v i 2 j 3k .
Solution:
(a)
f
In order the value of the partial derivative at P 1, 2, 1 is the greatest among all directional
z
4a
c
4a 3c 0 3
4a 16a
derivatives of f at P 1, 2, 1 we have 4a b 0 b 4a 4a 0 0a 0
2b 2c 0 b c 0 3 3
8a 32a
Then f 1, 2, 1 8a k k , a 0.
3 3
(b)
i 2 j 3k 32a i 2 j 3k 32a
Di 2 j 3k f 1, 2, 1 f 1, 2, 1 k , a 0.
i 2 j 3k 3 14 14
47
Example
xy 2
2 if x, y 0, 0
Consider the function f x, y x y
2
.
0 if x, y 0, 0
f v 0, 0 .
Solution:
(a)
ab 2
t if t 0 ab2
f at , bt a 2 b 2 f at , bt 2 t
0 a b 2
if t 0
ab 2
t
ab 2
Then f v 0, 0 lim
2 2
a b 2 .
t 0 t a b2
(b)
ab2
By (a), f v 0, 0 exists and f v 0, 0 0 where a 2 b 2 1 and a 0, b 0 .
a 2 b2
a f 0, 0 a 0 a ab2
However, f 0, 0 x
0 f 0, 0 .
b f y 0, 0 b 0 b
v
a 2 b2
Remark: This example shows the fact that the chain rule is not applicable if f is not differentiable.
48