Differentiability For Multivariable Functions
Differentiability For Multivariable Functions
Differentiability For Multivariable Functions
f (a + h) − f (a)
f 0 (a) = lim (1)
h→0 h
exists. A consequence of the existence of this limit is the existence of a function, ϕ, with
the properties
1. limh→0 ϕ(h) = 0, and
2. f (a + h) = f (a) + f 0 (a)h + ϕ(h) · h for all non-zero values of h that are sufficiently
close to 0.
The existence of such a ϕ is sometimes called the fundamental increment lemma, and we
prove it simply by putting
f (a + h) − f (a)
ϕ(h) = − f 0 (a) (2)
h
and noting that the function so defined has the necessary properties. This result proves its
usefulness when we need to prove the Chain Rule—among other things.
What we rarely point out in the early calculus courses is that the conclusion of the funda-
mental increment lemma, properly restated, essentially characterizes differentiability for
functions of a single variable. For suppose that there are a number m and a function ϕ
defined on some deleted neighborhood of 0 such that
1. limh→0 ϕ(h) = 0, and
2. f (a + h) = f (a) + mh + ϕ(h) · h for all non-zero values of h that are sufficiently close
to 0.
Then, when h 6= 0, we have
f (a + h) − f (a) mh + ϕ(h) · h
= (3)
h h
= m + ϕ(h), (4)
and it is clear that limh→0 [m + ϕ(h)] = m. Thus, the existence of a number m and
the function ϕ having together the properties described guarantee that f 0 (a) exists and
is m.
Now let us rephrase this equivalent description of differentiability for functions of a single
variable in a way that we allows us to interpret it for functions of several variables. The
key to doing this is the notion of a linear function.
Definition 1: A function F : Rn → Rm is called a linear function if, for every pair of real
numbers α and β and every pair of n-vectors u and v we have
2
Definition 2: A function f : D → R, where D ⊆ Rn , is said to be differentiable at the
point a ∈ D if there is a linear function M : Rn → R and a function Φ, carrying some
deleted neighborhood of the origin in Rn to Rn , such that
1. limh→0 ϕ(h) = 0, and
2. f (a + h) = f (a) + M (h) + Φ(h) · h for all non-zero vectors h that are sufficiently
close to 0 ∈ Rn .
When all of these things are so, the linear function M is called the derivative of f at a. It
is sometimes written Dfa .
Definition 2 says, essentially, that we call a function “differentiable” at a point precisely
when its increments there are well-approximated by a linear function acting on the corre-
sponding (vector) increments of the independent variable.
Now the linear functions acting from R2 to R all have the form (h, k) 7→ ph+qk, where p and
q are constants, so for functions f acting from some set D ⊆ R2 into R the requirement
of Definition 2 for differentiability at a point (x0 , y0 ) translates to the existence of two
numbers, p and q, and two functions, ϕ and ψ, both of two variables and defined in some
deleted neighborhood of (x0 , y0 ), such that
1. lim(h,k)→(0,0) ϕ(h, k) = 0,
2. lim(h,k)→(0,0) ψ(h, k) = 0, and
3. f (x0 + h, y0 + k) = f (x0 , y0 ) + ph + qk + ϕ(h, k)h + ψ(h, k)k for all non-zero (h, k)
that are sufficiently close to (0, 0).
The graph, in three dimensions, of the function (h, k) 7→ f (x0 , y0 )+ph+qk is, of course, the
graph of a certain plane which passes through the point x0 , y0 , f (x0 , y0 ) . So for such func-
tions, the differentiability requirement is that the surface z = f (x, y) be well-approximated
near the point (x0 , y0 ) by a certain plane—which we call the tangent plane.
It is not difficult to show that if the numbers p and q and the functions ϕ and ψ of the
previous paragraph exist, then the partial derivatives f1 (x0 , y0 ) and f2 (x0 , y0 ) exist and
are, respectively, p and q. If a function f of two variables is differentiable at (x0 , y0 ),
then it possesses both of its partial derivatives, and, indeed, possesses all of its directional
derivatives, at (x0 , y0 ). We can also show, though it requires substantially more sophisti-
cation and work to do so1 , that when the partial derivatives of f are both continuous in a
neighborhood of (x0 , y0 ), the function f must be differentiable at (x0 , y0 ).
1
We must first prove a mean value theorem for functions of two variables. Unlike the MVT for functions
of a single variable, this MVT requires that the (partial) derivatives be continuous in the region where we
are working.
3
But here the parallels with the single-variable theory end. In particular, the mere existence
of the partial derivatives f1 (x0 , y0 ) and f2 (x0 , y0 ) does not imply that f is differentiable at
(x0 , y0 ), and even the existence of all of the directional derivatives2 isn’t enough. This can
be seen by considering the example, to which we shall turn directly, of the function g given
by
x3
, when x2 + y 2 6= 0,
2
x + y2
g(x, y) = (6)
when x2 + y 2 = 0.
0,
The underlying difficulty is that partial (or directional) derivatives depend only upon the
values of the function along a single line, but functions of two variables can twist and bend
enough to defy any analysis that depends only on information gathered along straight
lines—even if we consider every straight line that passes through the particular point
where we are carrying out our analysis. The extra room in which functions can wiggle
and misbehave makes life with multivariable calculus more interesting than life with single
variable calculus was.
When g is as given in the previous paragraph, and as long as x2 + y 2 6= 0, we have, by the
usual differentiation rules,
x4 + 3x2 y 2
g1 (x, y) = , and (7)
(x2 + y 2 )2
2x3 y
g2 (x, y) = − 2 . (8)
(x + y 2 )2
The algebraic expression for g(x, y) is meaningless when x2 + y 2 = 0, so we must have
recourse to limits of difference quotients at the origin, where g(0, 0) = 0 by definition. We
have
g(0 + h, 0) − g(0, 0)
g1 (0, 0) = lim (9)
h→0 h
h3 h3
1
= lim − 0 = lim = lim 1 = 1, (10)
h→0 h h2 + 0 2 h→0 h3 h→0
while
g(0, 0 + k) − g(0, 0)
g2 (0, 0) = lim (11)
k→0 k
03
1 1
= lim − 0 = lim · 0 = lim 0 = 0. (12)
k→0 k 02 + k 2 k→0 k k→0
2
The partial derivatives are special cases of the directional derivatives.
4
The partial derivatives g1 and g2 thus exist everywhere.
However, lim(x,y)→(0,0) g1 (x, y) and lim(x,y)→(0,0) g2 (x, y) do not exist, so that neither of the
partial derivatives of g is continuous at (0, 0). In order to see this, consider what happens
in each case if we force (x, y) to approach (0, 0) along the straight line y = mx. We then
have
lim g1 (x, y) = lim g1 (x, mx) (13)
(x,y)→(0,0) x→0
x4 + 3m2 x4
= lim (14)
x→0 (x2 + m2 x2 )2
1 + 3m2 1 + 3m2
= lim = (15)
x→0 (1 + m2 )2 (1 + m2 )2
and
2mx4
= − lim (17)
x→0 (x2 + m2 x2 )2
2m 2m
= − lim =− . (18)
x→0 (1 + m2 )2 (1 + m2 )2
Thus, in both cases, the limits as we approach the origin along different lines have different
values. Consequently, neither of the limits as (x, y) → (0, 0) exists. This means that neither
partial derivative is continuous at the origin.
Is g differentiable at the origin? To answer this question we must determine whether or
not there are a pair of numbers p and q and a pair of functions ϕ and ψ, all with the
properties required by our translation of Definition 2 for functions of two variables. From
our earlier discussion, we know that if such numbers and functions exist, we will have to
have p = g1 (0, 0) = 1 and q = g2 (0, 0) = 0. But
h3
g(0 + h, 0 + k) − g(0, 0) − 1 · h − 0 · k = −h−0·k (19)
h2 + k 2
h2
= −1 ·h+0·k (20)
h2 + k 2
k2
=− 2 · h + 0 · k. (21)
h + k2
In order for g to be differentiable at the origin, we must therefore have
k2
ϕ(h, k) = − , and (22)
h2 + k2
ψ(h, k) = 0. (23)
5
The function ψ causes no trouble. But ϕ is quite another matter, because—again consid-
ering what happens as we approach the origin along straight lines, this time of the form
k = mh—we have
m2 h2
lim ϕ(h, k) = lim ϕ(h, mh) = − lim (24)
(h,k)→(0,0) h→0 h→0 h2 + m2 h2
m2 m2
= − lim = − , (25)
h→0 1 + m2 1 + m2
which once again gives different results along different lines so that the limit as (h, k) →
(0, 0) of ϕ(h, k) doesn’t exist—and consequently can’t be zero as is required for differen-
tiability. We are forced to conclude that the function g is not differentiable at the origin,
or, more intuitively, that no plane through the origin gives a suitable approximation to the
surface z = g(x, y) at the point (0, 0, 0), which lies on the surface.
Finally, let us remark that although continuity of the first order partial derivatives of g
in some neighborhood of the point (x0 , y0 ) guarantees that g is differentiable at (x0 , y0 ),
it is possible for a function to be differentiable at (x0 , y0 ) when its partial derivatives are
not continuous there. In order to see that this is so, let g now denote the function given
by
!
2 2 1
(x + y ) sin p , when x2 + y 2 6= 0,
2
x +y 2
g(x, y) = (26)
when x2 + y 2 = 0.
0,
6
Then we note that
2 2 1
g(0 + h, 0 + k) = (h + k ) sin √ (30)
h2 + k 2
1 1
= 0 + 0 · h + 0 · k + h sin √ h + k sin √ k (31)
h2 + k 2 h2 + k 2
= 0 + 0 · h + 0 · k + ϕ(h, k)h + ψ(h, k)k (32)
= g(0, 0) + 0 · h + 0 · k + ϕ(h, k)h + ψ(h, k)k. (33)
We have written g(0 + h, 0 + k) in the required form, and we must now conclude that g is
differentiable at (0, 0). We also conclude, from what we said earlier, that g1 (0, 0) = p = 0
and that g2 (0, 0) = q = 0.
However, when x2 + y 2 6= 0, we have, by standard differentiation techniques,
x cos[(x2 + y 2 )−1/2 ]
g1 (x, y) = − p + 2x sin[(x2 + y 2 )−1/2 ]. (34)
2
x +y 2
It is easily seen that lim(x,y)→(0,0) g1 (x, y) does not exist: We have already seen that
" #
1
lim x sin p = 0, (35)
(x,y)→(0,0) x2 + y 2
so the second piece of this derivative is well-behaved. But, calling the y = mx trick into
play again, we would have to have
which does not exist owing to √ the fact that the√fraction involving the cosine oscillates
infinitely many times, from 1/ 1 + m2 to −1/ 1 + m2 and back again in every open
interval which has 0 as an endpoint. Similarly for lim(x,y)→(0,0) g2 (x, y). Thus, the partial
derivatives of g fail of continuity at the origin.