Académique Documents
Professionnel Documents
Culture Documents
Real -valued functions of several independent real variables are defined much
the same way one would imagine from the single variable case. The domains
are sets of ordered n-tuples of real numbers. Let
Rn = {(x1 , . . . , xn ) | xi R, i = 1, . . . , n}.
We will mostly work on the spaces of n = 2, or 3.
Definition 8.1.1 A real-valued function of n-variables is a function f
on a subset D Rn into R:
f : D R,
f (x1 , . . . , xn ) = w.
238
Chapter 8.
XX0
if, for every number > 0, there exists a corresponding number > 0
such that
|f (X) L| < , for all points X = (x, y) D with 0 < |X X0 | < .
(2) z = f (x, y) is said to be continuous at X0 , if
lim f (X) = f (X0 ) :
XX0
239
2
2
Example 8.1.1 Consider f (x, y) = x4xy
2 +y 2 on D = R {(0, 0)}. For X =
(0, y) or X = (x, 0) D, f (X) = 0. Thus we choose L = 0. To show
limXX0 f (X) = 0: For > 0 given, we want to find a > 0 such that
2
p
4xy 2
0
x2 + y 2
x2 + y 2
However, since y 2 x2 + y 2 ,
p
4|x|y 2
4|x| 4 x2 4 x2 + y 2 .
2
2
x +y
p
Thus, if we choose = 4 , then, for any (x, y) with 0 < x2 + y 2 < ,
2
p
4xy 2
= 4|x|y 4 x2 + y 2 < 4 = 4 = .
x2 + y 2 x2 + y 2
4
Hence if define f (0, 0) = 0, then this function is made to be a continuous
function on R2 .
2m
2mx2
=
,
x2 (1 + m2 )
1 + m2
which depends on the value m. That is, f has no limit at X0 = (0, 0), and
so there is no way to define f (0, 0) to make it continuous at X0 .
Theorem 8.1.1 The general rules of the arithmetics of continuous functions hold: that is, if f and g are continuous at X0 = (x0 , y0 ) and k R,
then so are kf , f g, f g, fg provided g(X0 ) 6= 0. Moreover, if h(z) = w is
continuous function at z0 = f (x0 , y0 ), then so is w = (h f )(x, y) at X0 .
8.2
Partial Derivatives
240
Chapter 8.
f (x0 + h, y0 ) f (x0 , y0 )
f
d
z
f (x, y0 )
= lim
h0
dx
h
x (x0 ,y0 )
x (x0 ,y0 )
x=x0
fx (x0 , y0 ) = zx .
z
z = f (x0 , y)
z = f (x, y0 )
x0
x
y0
(x0 , y0 )
Similarly for y:
y
(x0 ,y0 )
s y
s
z
fy (x0 , y0 ) = zy
y (x0 ,y0 )
d
f (x0 , y0 + h) f (x0 , y0 )
f (x0 , y)
.
= lim
h0
dy
h
y=y0
2y
y+cos x ,
find fx and fy .
(y + cos x) x
(2y) 2y x
(y + cos x)
2y sin x
=
,
2
(y + cos x)
(y + cos x)2
(y + cos x) y
(2y) 2y y
(y + cos x)
2 cos x
=
.
(y + cos x)2
(y + cos x)2
Example 8.2.2 Let z = f (x, y) satisfy yz ln z = x + y. Find zx and zy .
fy (x, y) =
x y
(yz)
(ln z) =
+
x
x
x x
z
1 z
y
= 10
x z x
z
z
=
.
x
yz 1
Similarly for
z
y .
8.2.
Partial derivatives
241
0, if xy 6= 0,
1, if xy = 0.
fy (0, 0) exist, but f is not continuous at (0, 0).
Example 8.2.3 Let z = f (x, y) =
etc.
2f
yx (c, d)
2f
(c, d)4x4y,
yx
d [y0 , y0 + 4y].
is continuous, we have
2f
1
2f
(x0 , y0 ) =
lim
F (4x, 4y) =
(x0 , y0 ),
yx
xy
(4x,4y)(0,0) 4x4y
where the second equality is obtained similarly from h(y) = f (x0 + 4x, y)
f (x0 , y), and F (4x, 4y) = h(y0 + 4y) h(y0 ).
Example 8.2.4 For f (x, y) = xey + yx2 , one can easily show that
2f
2f
= ey + 2x =
.
yx
xy
242
8.3
Chapter 8.
Differentiability
as 4x 0,
4x
f 0 (x0 )4x
4x
x0
x = x0 + 4x
The above formula can be used for the differentiability of functions with
more than one variables: f : Rn R. However, it is good enough to work
on two variable functions:
Definition 8.3.1 A function z = f (x, y) on D is said to be differentiable
at X0 = (x0 , y0 ) D if fx and fy exist at X0 , and
4z = f (X) f (X0 ) = fx (X0 )4x + fy (X0 )4y + 1 4x + 2 4y,
where 1 , 2 0 as 4x, 4y 0. f is said to be differentiable on D if it is
differentiable at every point of D.
8.3.
Differentiability
243
In fact, for functions with more than one variables, we have the following
theorem:
Theorem 8.3.1 Let z = f (x, y) be a function on an open domain D R2 .
Suppose that fx and fy are defined on D and continuous at X0 = (x0 , y0 )
D. Then the increment 4z = f (X) f (X0 ) of f from X0 to X = (x, y) =
(x0 + 4x, y0 + 4y) D is given by
4z = f (X) f (X0 ) = fx (X0 )4x + fy (X0 )4y + 1 4x + 2 4y,
where 1 , 2 0 as 4x, 4y 0.
Proof: We assume that 4x and 4y are small enough so that a rectangle
T centered at X0 is contained in D. Then 4z = 4z1 + 4z2 where
4z1 = f (x0 + 4x, y0 ) f (x0 , y0 ),
4z2 = f (x0 + 4x, y0 + 4y) f (x0 + 4x, y0 ).
6
f
y (x0
1 4x
02 4x
+ 4x, y0 )4x
6
?
6
dz
f
x (X0 )4x
x0
4x
6
?
6
?
4z
6?
6 4z
?
4z1
y0
x = x0 + 4x
2 4y
f
y (X0 )4y
y0 + 4y
?y = ?
X0
4y
X = (x, y)
244
Chapter 8.
i j
245
Instead, we may take the linear approximation: Choose X0 = (3, 2). Then
f (X0 ) = 8, (4x, 4y) = (0.01, 0.02), and
fx (3, 2) = (2x y)(3,2) = 4,
fy (3, 2) = (x + y)(3,2) = 1,
z = f (3.01, 2.02) w = f (3, 2) + fx (3, 2)4x fy (3, 2)4y
= 8 + 4(0.01) + (1)(0.02) = 8.02.
8.4
Directional Derivatives
Note that the partial derivatives fx (X0 ) and fy (X0 ), etc, of a function with
more than one variables are the rate of changes of f when X moves along
the lines through X0 and parallel to the coordinate axes. How about the
rate of change of f when X moves in other directions at X0 ?
Let z = f (x, y) be a differentiable function on R R2 and X0 =
(x0 , y0 ) R. Let (t) = (x(t), y(t)), t I = [a, b], be a differentiable
curve in R through X0 = (t0 ) with 0 (t0 ) = (x0 (t0 ), y 0 (t0 )) a unit vector.
Then z = f (t) = f (x(t), y(t)) is a function in t, which is the restriction
of the domain of f along the curve (t).
Theorem 8.4.1 The composite z = f (t) = f (x(t), y(t)) is differentiable
at t0 , and
dx(t0 )
dy(t0 )
dz
(t0 ) = fx (X0 )
+ fy (X0 )
.
dt
dt
dt
Proof: By the differentiability of f , we have
4z = fx (X0 )4x + fy (X0 )4y + 1 4x + 2 4y,
4z
4x
4y
4x
4y
= fx (X0 )
+ fy (X0 )
+ 1
+ 2
,
4t
4t
4t
4t
4t
246
Chapter 8.
dz
4z
f dx(t0 )
f dy(t0 )
(t0 ) = lim
=
+
.
4t0 4t
dt
x
dt
y
dt
X0
X0
f
dz
f
u1 +
u2 .
(t0 ) =
dt
x X0
y X0
This has several notations:
dz
(t0 ) = fx (X0 )u1 + fy (X0 )u2
dt
= (fx (X0 ), fx (X0 )) (u1 , u2 ) = f (X0 ) u, in vector notation,
u1
= [fx (X0 ) fx (X0 )]
= Df (X0 )0 (t0 ), in matrix notation,
u2
which is called the directional derivative of f at X0 in u direction, also
denoted by dz
dt (t0 ) = Dfu (X0 ) = f (X0 ) u.
This can be done at every point X R, and the first equality is the
total differential:
dz = fx (X)x0 (t)dt + fx (X)y 0 (t)dt = fx (X)dx + fx (X)dy.
In the vector notation,
f (X) = (fx (X), fx (X))
is called the gradient vector of f at X in R2X0 , and in the matrix notation
the 1 2 matrix
Df (X) = [fx (X) fy (X)]
is called the derivative of f at X, and the above equation represents the
chain rule of the derivatives of functions of several variables.
By definition, the directional derivative of f is the rate of change of f
when X moves in u-direction, and it is given as, for any unit vector u,
Dfu (X0 ) = f (X0 ) u = |f (X0 )| cos , = ](f (X0 ), u),
8.4.
Directional derivatives
247
dz(t)
= Df0 (t) ((t)) = f ((t)) 0 (t).
dt
Since 0 (t) is tangent to the contour curve C, this means that f ((t)) is always perpendicular (or, normal) to C. That is, the function f increases most
rapidly in f (X) direction at X R at the rate |f (X), stays constant at
the rate 0 in the direction of C (or perpendicular to f (X)), and decreases
most rapidly in in f (X) direction at X R at the rate |f (X)|.
y
6
C = f (x, y)
X = (t)
0 (t)
1 u
j f (X)
- x
248
Chapter 8.
= (fx , fy , fz ),
D(f )(u) = f u = fx u1 + fy u2 + fz u3 .
8.5
In this section, we consider vector-valued functions of more than one variables: that is, functions of the form F : Rn Rm denoted by
F (x1 , . . . , xn ) = (f1 (x1 , . . . , xn ), . . . , fm (x1 , . . . , xn )), (x1 , . . . , xn ) R Rn ,
where R is an open domain in Rn . F is differentiable if f1 , . . ., fm are
differentiable functions on R: that is, fj s have continuous partial derivatives
on R, and its derivative is defined to be the m n matrix of the partial
derivatives:
f1
f1
x
x1
n
..
DF (X) =
(X).
.
fm
x1
fm
xn
(u, v) R R2 ,
8.5.
249
=
=
=
x du(t) x dv(t)
+
u dt
v dt
y du(t) y dv(t)
+
u dt
v dt
z du(t) z dv(t)
+
.
u dt
v dt
(t) = D(F )t =
dt = u v
dv
d(z)
dt
z
u
z
v
dt
(t)
= DF(t) Dt .
This shows that DF(t) transforms the tangent vectors 0 (t) at (t) to vector
0 (t) tangent to (t).
Example 8.5.1 Consider the spherical coordinates
F (, ) = (x(, ), y(, ), z(, )), given by, for (, ) (0, 2) (0, ),
x(, ) = sin cos ,
z(, ) = cos .
y
y
dt
dt
(t)
cos 0 sin t
sin 0
"
1
0
sin 0 sin t
sin 0 cos t .
250
Chapter 8.
(f F )
f x f y f z
=
+
+
.
u (u0 ,v0 )
x u y u z u (u0 ,v0 )
Similarly, for fixed u0 , the partial derivative of (f F ) in v is:
f x f y f z
(f F )
=
.
+
+
v (u0 ,v0 )
x v
y v
z v (u0 ,v0 )
These two equations together can be written in the chain rule
h
i
h
i
f
f
f
x
u
y
u
z
u
x
v
y
v
z
v
w
u
w
v
fx fy fz
1
v
u
y
u
z
u
+ 12u vu2 +
2
v
x
v
y
v
z
v
1
v
= [1 2 4u] 2u
vu2
1
v
g1
g1
f1
f1
x
y1
ym
x1
n
..
..
gp
gp
fm
fm
xn
x1
y1
ym
Suppose that z = F (x, y) is a differentiable function and the level curve
C = F (x, y) defines a differentiable function y = g(x). Then we have
C = F (x, y) = F (x, g(x)) is a function in x. By differentiating both sides,
0 = Fx
dx
dy
dg(x)
+ Fy
= Fx + Fy
.
dx
dx
dx
8.5.
251
Thus, if Fy 6= 0, we have
dy
Fx
= ,
dx
Fy
which is called the implicit differentiation.
F (x, y) = x2 + y 2 r2 = 0 defines two funcExample8.5.3 An equation
tions y = r2 x2 and y = r2 x2 . In both cases,
2x + 2y
dy
x
dy
= 0 =
= ,
dx
dx
y
Fx Fy
= Df D,
1 0
fx fy fz 0 1
=
gx gy
fx + fz gx fy + fz gy .
=
z
y
= 2
.
x
3z + y
z
x z 3y 2
=
.
y
3z 2 + y
3z 2
Hence,
wx wy
1 0
fx fy fz 0 1
=
gx gy
2x 2y 2z 0
=
y
3z 2 +y
h
=
2x +
2yz
3z 2 +y
2y +
0
1
xz3y 2
3z 2 +y
2z(xz3y 2 )
3z 2 +y
i
.
252
8.6
Chapter 8.
Taylors Polynomial
dx
dy
0
F (0) = fx
= [hfx + kfy ](a,b) ,
+ fy
dt
dt (a,b)
dx
dy
dx
dy
00
F (0) = fxx
+ fxy
h + fyx
+ fyy
k
dt
dt (a,b)
dt
dt (a,b)
The last term is the error term for the linear approximation of f (x, y) by
the tangent plane, discussed in Corollary 8.3.4: If
M = max{|fxx (x, y)|, |fxy (x, y)|, |fyy (x, y)| | (x, y) D},
where D is a rectangle in R centered at (a, b), then
Error2 (Q, P )
M
(|4x| + |4y|)2 .
2
differential operator D = h x
+ k y
so that for a differentiable function f ,
D(f ) = h
+k
(f ) = hfx + kfy ,
x
y
2
2
D (f ) = h
+k
(f ) = h2 fxx + 2hkfxy + k 2 fyy ,
x
y
3
+k
(f ) = h3 fxxx + 3h2 kfxxy + 3hk 2 fxyy + k 3 fyyy ,
D (f ) = h
x
y
..
.
253
(n)
(0) =
dn
n
n
F (0) = D (f )(a,b) = h
+k
(f )(a,b) .
dtn
x
y
F (n+1) (c)
(1 0)n+1 ,
(n + 1)!
F 00 (0)
F (n) (0)
(1 0)2 + +
(1 0)n
2!
n!
for some c [0, 1],
8.7
1 2
[h fxx + 2hkfxy + k 2 fyy ](a,b) +
2!
1 n
1
D (f )(a,b) +
Dn+1 (f )(a+ch,b+ck) .
n!
(n + 1)!
Extreme Values
Most of optimization problems in applications are concerned about the maximization or minimization of certain functions of several variables. When
the function is smooth on the domain, those local extrema usually occur at
some boundary points of the domain, or at the points where the tangent
planes are horizontal, or the derivatives are zero, but not all the time. A
point where the tangent plane is horizontal, but is not a local extremum, is
called a saddle point.
Definition 8.7.1 Let z = f (x, y) be function on a domain R R2 . For
(a, b) R, f (a, b) is a local maximum (or a local minimum) if f (a, b)
(or, ) f (x, y) for all (x, y) R in an open disk centered at (a, b).
Theorem 8.7.1 (First derivative test) If z = f (x, y) has a local extremum at an interior point (a, b) R, and if the first partial derivatives
exist there, then fx (a, b) = 0 = fy (a, b).
Proof: If z = f (x, y) has a local extremum at (a, b) R, then g(x) = f (x, b)
also has a local extremum at x = a. Thus g 0 (a) = fx (a, b) = 0. Similarly,
fy (a, b) = 0.
254
Chapter 8.
1 2
[h fxx + 2hkfxy + k 2 fyy ](a,b) + Error3 (Q, P ),
2!
where |Error3 (Q, P )| 0 for sufficiently small (h, k) = (xa, yb). Hence,
f (x, y) f (a, b)
1 2
[h fxx + 2hkfxy + k 2 fyy ](a,b) ,
2!
1 2 2
[h fxx + 2hkfxx fxy + k 2 fxx fyy ]
2!
1
2
(hfxx + kfxy )2 + k 2 (fxx fyy fxy
).
2!
fxx fxy
.
Hf (a, b) =
fxy fyy (a,b)
255
fy = x 2y 2 = 0 = x = 2 = y.
8.8
Lagrange Multipliers
256
Chapter 8.
2
2
2
Example 8.8.2 Find w
x of w = f (x, y, z) = x + y + z subject to a
2
2
constraint x + y z = 0.
Solution: (1) If we choose x, y as independent variables and z as a dependent variable, then z = g(x, y) = x2 + y 2 , and so w = f (x, y) =
f (x, y, g(xy)) with (x, y) = (x, y, g(x, y)). Thus
1 0
1 0
h
i
w
w
fx fy fz 0 1 = 2x 2y 2z 0 1
=
x
y
gx gy
2x 2y
2
2
2
2
2x + 4x(x + y ) 2y + 4y(x + y ) .
=
(2) If we choose x, z as
independent variables and y as a dependent variable, then y = h(x, x) = z x2 , and so w = f (x, z) = f (x, h(x, z), z) =
x2 + (z x2 ) + z 2 = z + z 2 . Thus
w
= 0.
x
(3) A geometrical interpretation: The level surface x2 + y 2 z = 0 is
the paraboloid as the following picture. When the x-coordinate of a point P
on the paraboloid varies, while holding y(= 0), as an independent variable,
fixed, P moves along the parabola z = x2 . Thus w as the distance from the
3
2
origin to P changes so that w
x = 2x + 4x + 4xy 6= 0.
8.8.
Lagrange multipliers
257
P
z=
x)
c = x2 + y 2
x2
zy
258
Chapter 8.
dt 0
Suppose that w = f (x, y, z) and g(x, y, z) are differentiable functions on
U , and suppose that w = f (x, y, z) has a local extremum at P0 on the level
surface g(x, y, z) = 0 relative to its values on the surface. Then f takes on
a local extremum at P0 relative to its values on every differentiable curve
through P0 on the surface g(x, y, z) = 0. Therefore, f (P0 ) is orthogonal
to the velocity vector of every curve on the surface through P0 . Since g is
orthogonal to the level surface g(x, y, z) = 0, we must have
f (P0 ) = g(P0 ), for some R.
is called a Lagrange multiplier, and this is called the method of Lagrange multipliers.
Example 8.8.4 Find the extremum values of z = f (x, y) = xy subject to
2
2
C : x8 + y2 = 1.
Solution: For f (x, y) = (y, x) and g(x, y) = ( x4 , y), f (x, y) = g(x, y)
gives
1
1
y = x, x = y = y = 2 y.
4
4
Thus, y = 0 or = 2. However, y 6= 0, otherwise x = 0 = 0 but
(0, 0) 6 C. Thus y 6= 0 and = 2 means x = 2y. Then from the
constraint:
x2 y 2
0=
+
1 = y 2 1 = y = 1, x = 2.
8
2
In fact, f (2, 1) = 2 is the maximum and f (2, 1) = 2 is the minimum.
8.8.
Lagrange multipliers
259
g2 . In this case, it can also be found by introducing two Lagrange multipliers 1 and 2 : Find the values x, y, z, 1 , and 2 from the following
equations
f = 1 g1 + 2 g2 ,
g1 (x, y, z) = 0, g2 (x, y, z) = 0.
P0
f
- g2
g1 = 0
Example 8.8.5 Find the points closest to the origin subject to two constraints g1 (x, y, z) = x + y + z = 1 and g2 (x, y, z) = x2 + y 2 = 1.
z
x+y+z =1
(1, 0, 0)
(0, 1, 0)
j y
x
x2
y2
=1
260
Chapter 8.
solve
f (x, y, z) = 1 g1 (x, y, z) + 2 g2 (x, y, z)
or (2x, 2y, 2z) = 1 (1, 1, 1) + 2 (2x, 2y, 0),
or 2x = 1 + 22 x, 2y = 1 + 22 y, 2z = 1 .
Thus, (1 2 )x = z and (1 2 )y = z, and so 2 = 1 and z = 0, or 2 6= 1
z
.
and x = y = 1
2
If z = 0, then 1 = 0, and from the constraints, x+y = 1 and x2 +y 2 = 1.
Thus, 0 = x2 + (1 x)2 1 = 2x(x 1) shows x = 0 and y = 1, or x = 1
and y = 0. Hence, at (0, 1, 0) and (1, 0, 0), f = 1 is the minimum.
If x = y, then, from the constraints, 2x+ z = 1 or z = 1 2x, and
and
x2 + y 2 = 2x2 = 1 or x = 12 : z = 1 2. Hence at ( 12 , 12 , 1 2)