ball of radius r centered at x 0 . The closed ball of radius r centered at x 0 is the set
interior point of D if there is an open ball B (a; r) ⊂ D . The collection of all interior
points of D is called the interior of D, and is usually denoted int D. A set U is said to be
open if U = int U.
open ball centered at a meets the domain D. If y ∈ R p is such that for every ε > 0, there
is a δ > 0 so that| f ( x ) − y| < ε whenever 0 < | x − a | < δ , then we say that y is the limit of
f at a. This is written
lim f ( x) = y ,
x →a
lim af ( x ) = a lim f ( x ) .
x →a x →a
where D ⊂ R n . Again this definition will not contradict our previous lower dimensional
7.1
definitions. Specifically, we say that f is continuous at a ∈ D if lim f ( x) = f ( a) . If f is
x →a
Example
ε
and a ∈ R n . Let ε > 0. Now let M = max{| f (e 1 )|,| f ( e2 )|,K,| f (e n )|} and let δ = .
nM
Another Example
x1 x 2
, for x12 + x 22 ≠ 0
Let f : R → R be defined by
2
f ( x ) = f ( x1 , x2 ) = x12 + x22 .
0, otherwise
α2 1
f ( x) = f (α ,α ) = 2 = .
α +α 2
2
7.2
Now. let x = α (10
, ) = (α ,0) . It follows that all α ≠ 0, f ( x) = 0 . What does this tell
us? It tells us that for any δ > 0 , there are vectors x with 0 < | x − ( 00
, )| < δ such that
1
f ( x) = and such that f ( x) = 0 . This, of course, means that lim f ( x) does not
2 x →( 0 ,0 )
exist.
7.2 Derivatives
1
lim [ f ( x0 + h) − f ( x 0 ) − L( h)] = 0 .
h→0 | h|
The linear function L is called the derivative of f at x 0 . It is usual to identify the linear
function L with its matrix representation and think of the derivative at a p × n matrix.
Note that in case n = p = 1, the matrix L is simply the 1 × 1 matrix whose sole entry is the
every day grammar school derivative of f .
Now, how do find the derivative of f ? Suppose f has a derivative at x 0 . First, let
h = te j = ( 00
, ,K ,0, t ,0,K,0) . Then
f 1 ( x1 , x 2 ,K, x j + t ,K , xn )
f ( x , x ,K , x + t ,K, x )
f ( x + h) = f ( x1 , x 2 ,K , x j + t ,K, x n ) =
2 1 2 j n
,
M
f p ( x1 , x 2 ,K, x j + t ,K , xn )
and
7.3
0
m11 m12 L m1n 0 m1 j t
m m22 L m2 n M m t
Lh = 21
= 2j ,
M t M
mp 1 m p 2 L m pn M mpj t
0
where x 0 = ( x 1 , x 2 ,K , x n ) , etc.
Now then,
1
[ f (x 0 + h) − f (x0 ) − L(h)]
| h|
f1(x1, x 2 ,K, xj + t,K,x n ) − f1(x1,x 2,K, x n ) − m1 j t
1 f2 (x1 , x2,K, x j + t,K, xn ) − f2 (x1 , x 2,K, xn ) − m2 j t
=
t M
f (x , x ,K, x + t,K,x ) − f (x , x ,K, x ) − m t
p 1 2 j n p 1 2 n pj
This derivative has a name. It is called the partial derivative of f i with respect to the j th
variable. There are many different notations for the partial derivatives of a function
g ( x1 , x 2 ,K , xn ) . The two most common are:
7.4
g , j ( x 1 , x 2 ,K , x n )
∂
g ( x1 , x 2 ,K , xn )
∂x j
1
The requirement that lim [ f ( x0 + h) − f ( x 0 ) − L( h)] = 0 now translates into
h→0 | h|
∂f i
mij = ,
∂x j
Example
3x sin x 2
Let f : R 2 → R 2 be given by f ( x1 . x2 ) = 3 1 2
. Assume f is differentiable
x1 + x 1 x 2
and let’s find the derivative (more precisely, the matrix of the derivative. This matrix will,
m m12
of course, be 2 × 2 : L = 11 . Now
m21 m22
∂f 1
= 3 sin x 2
∂x 1
,
∂f 2
= 3x 1 + x 2
2 2
∂x 1
7.5
and
∂f 1
= 3x 1 cos x 2
∂x 2
.
∂f 2
= 2 x1 x 2
∂x 2
3 sin x 3x 1 cos x 2
L = 2 22 .
3x1 + x 2 2 x 1 x 2
We now know how to find the derivative of f at x if we know the derivative exists;
but how do we know when there is a derivative? The function f is differentiable at x if the
partial derivatives exist and are continuous. It should be noted that it is not sufficient
just for the partial derivatives to exist.
Exercises
a) f ( x, y) = x 2 y 3 b) f ( x, y, z) = x 2 yz + z cos( xy)
x 3 sin( e x1 )
c) g ( x1 , x 2 , x 3 ) = x1 x 2 x 3 + x 2 d) h( x1 , x 2 , x 3 , x 4 ) =
x2 + x 4
1 3 2
2. Find the derivative of the linear function whose matrix is .
−2 7 0
7.6
4. Find the derivative of R (t ) = cos ti + sin tj + t k .
x1 x3 + e x 2
x3 log(x1 + x 22 )
f (x1 , x2, x3 ) = .
x2
x1 x 3 + 5
2
f (a + h) − f (a ) − L (h)
f ( a + h) − f (a ) = | h| − L (h)
| h|
f ( a + h) − f (a ) − L (h)
lim =0
h→0
| h|
7.7
because f is differentiable at a, and lim L( h) = L (0) = 0 because the linear function L is
h→0
continuous at a.
Next, let’s see what the celebrated chain rule looks like in higher dimensions. Let
Thus,
r(a + h) − r(a ) − ML (h) g( f ( a) + k ) − g( f ( a)) − M( k ) k − L (h )
= + M( )
| h| | h| | h|
Now we are ready to see what happens as | h| → 0 . look at the second term first:
k − L (h ) f ( a + h) − f (a ) − L (h) f (a + h) − f (a ) − L ( h)
lim M( ) = lim M = M (lim )
h→0 | h| h→0 | h| h→0 | h|
= M (0) = 0
g ( f (a) + k ) − g( f ( a)) − M ( k )
lim .
h→0 | h|
7.8
This is a bit tricky. Note first that because f is differentiable at a , we know that
| k| | f ( a + h) − f (a)|
=
| h| | h|
g ( f (a ) + k ) − g ( f (a )) − M ( k ) | k |
lim ⋅
h→0 | h| | k |
g ( f (a ) + k ) − g ( f (a )) − M ( k ) | k|
= lim =0
h→0 | k| | h|
| k|
since the derivative of g at f ( a) is M, and is well-behaved. Finally at last, we have
| h|
shown that
r (a + h) − r (a) − ML( h)
lim = 0,
h→0 | h|
matrix product, of the derivatives. What could be more pleasing from an esthetic point of
view!
Example
shall find the derivative of r at t = 2 using the Chain Rule. The derivative of f is
7.9
2t
L = 2,
3t
[
M = 6( 2 x1 − x2 ) 2 −3(2 x1 − x 2 ) 2 .]
4
At t = 2 , L = ; and at g ( f (2 )) = g (4 ,9 ) , M = [6 −3]. Thus the derivative of the
12
4
composition is ML = [6 − 3] = [ − 12] = − 12 .
12
Now for fun, let’s find an explicit recipe for r and differentiate:
and so r'( 2) = 3(1)(8 − 12 ) = − 12. It is, of course, very comforting to get the same answer
as before.
There are several different notations for the matrix of the derivative of
Exercises
9. Let f ( x, y) = (e ( x + y ) , e ( x− y ) ) and g ( x , y ) = ( x − y 3 , x 2 + y ) .
7.10
a)Find the derivative of f o g at the point (1,-2).
∂r ∂r
10. Suppose r = t 2 cos t and t = x 2 − 3y 2 . Find the partial derivatives and .
∂x ∂y
∂ r1 ∂ r1 ∂ r1
∂ x L
∂ x2 ∂ xn
1
∂ r2 ∂ r2
L
∂ r2
r'( x) = r '( x1 , x 2 ,K , x n ) = ∂ x1 ∂ x2 ∂ xn .
M
∂ r
p ∂ rp ∂ rp
L
∂ x1 ∂ x2 ∂ x n
We can thus find the derivative using the Chain Rule only in the very special case in
7.11
∂ f1 ∂ f1 ∂ f1
∂ x L
∂ x2 ∂ xn
1
∂f ∂ f2 ∂ f2
∂r ∂r ∂r ∂ g ∂g ∂ g 2 L
r'( x) = L = L ∂ x ∂ x2 ∂ xn
∂ x1 ∂ x2 ∂ xn ∂ y1 ∂ y2 ∂ y p M 1
∂ f
p ∂ fp ∂ f p
L
∂ x1 ∂ x2 ∂ x n
∂r ∂ g ∂ f1 ∂ g ∂ f 2 ∂ g ∂ fp
= + + L+ .
∂ x j ∂ y1 ∂ x j ∂ y 2 ∂ x j ∂ yp ∂ xj
Frequently, engineers and other malefactors do not use a different name for the
composition g o f , and simply use the name g to denote both the composition
folks also frequently just use y j to denote the function f j . The Chain Rule given above
∂g ∂ g ∂ y1 ∂ g ∂ y 2 ∂ g ∂ yp
= + +L+ .
∂ x j ∂ y1 ∂ x j ∂ y 2 ∂ x j ∂ yp ∂ xj
Example
∂g ∂g
find the partial derivatives and . We know that
∂r ∂t
7.12
∂ g ∂ g ∂ x ∂ g ∂ y ∂ g ∂z
= + +
∂ s ∂x ∂ s ∂y ∂ s ∂z ∂ s
= 2xy(1) +(x 2 + ez )t3 + ye z (2s)
= 2xy +(x 2 + e z )t 3 + 2syez
Similarly,
∂ g ∂g ∂ x ∂ g ∂y ∂ g ∂ z
= + +
∂ t ∂x ∂ t ∂y ∂ t ∂z ∂ t
= 2xy(1) + (x 2 + ez )3st 2 + yez (6t)
= 2xy + 3(x 2 + ez )st 2 + 6tyez
These notational shortcuts are fine and everyone uses them; you should, however,
be aware that it is a practice sometimes fraught with peril. Suppose, for instance, you
∂g
clear what is meant by the symbol . Meditate on this.
∂z
Exercises
∂g ∂g
11. Suppose g ( x , y ) = f ( x − y , y − s) . Find + .
∂x ∂y
12. Suppose the temperature T at the point ( x , y , z) in space is given by the function
7.13
13. Suppose the temperature T at the point ( x , y , z) in space is given by the function
14. Let r( x , y ) = f ( x ) g ( y ) , and suppose x = t and y = t . Use the Chain Rule to find
dr
.
dt
7.14