Given a function
, the change from
to
is
.
For example, if
, then the change in going from
to
is
This can be seen as a linear function
plus another
part
which is small in the sense that
Definition 1: If
is a
function, then a derivative
of
at
is a
linear function from
to
such that
Proposition 1: There is at most one derivative of
at
.
Proof: Suppose that
and
are two derivatives.
Then each satisfies the limit condition of the definition. Subtracting
these gives:
For
, let
for
. Then
since
and
are linear. So
Exercise 1: If
is
linear, then
for all
. If
is a constant
function, then
for all
.
Proposition 2: If
and
, then
is differentiable at
if and only if
the coordinate functions
are
differentiable for all
. If either is true, then
.
Proof: If
is differentiable at
, then
In particular each of the terms of the sum have limit zero. So the
coordinate functions
have derivatives and they are the coordinate functions of the
derivative of
. Conversely, if the coordinate functions
are
differentiable, then putting their derivatives in the above formula in the
place of the coordinate functions of
shows that
is differentiable
at
.
The main computational tool for derivatives is:
Theorem 1: (Chain Rule) If
is differentiable at
and if
is differentiable at
, then
is differentiable at
and
.
Proof: Define
and
by
and
We need to show that
where
Now, letting
and
, we have by the definition of
,
Using the definition of
, we get
By linearity of
, this simplifies to:
We must show that
. Since
is
linear, there is an
such that
and the right hand side approaches zero.
For the other term, for any
,
there is a
such that
whenever
. Note that we can remove the
condition that the middle term be non-zero -- if it were zero, then
the condition becomes
which is true since
. Now
is bounded for small
.
So
This completes the proof.
Corollary 1: If
are
differentiable at
, then
Proof: The sum
(respectively the product
) function can be
written as the composition of the
defined by
and the function
(respectively
) defined by
(respectively
). Now
is linear and
so its derivative is itself. Further, it is easy to check that:
and so
since
The formulas now follow by the chain rule.
Definition 2: Let
be a function and
.
Then, for each j, one can define
by
. The
partial
derivative
of
at
is defined to be
.
Proposition 3: Let
be a function with domain
and
be in the interior of
and assume that
is either a local minimum or local maximum of
. Then
provided that the partial derivative exists.
Proof:
is a local extremum of the function of one variable
.
Theorem 2: Let
be a function and
. If
is differentiable at
, then
is the
linear transformation whose matrix is the
array of
partial derivatives
of the coordinate functions
of
.
Conversely, if The partial derivatives of the coordinate functions of
all have partials defined in an open neighborhood of
and are continuous
at
, then
is differentiable at
.
Proof: By Proposition 2, it is enough to check the case where
.
The first assertion is immediate from the definitions. For the
second assertion break up the change in
into a sum of changes in which
one varies only one parameter at a time:
One can apply the Mean Value Theorem to each of the differences on the right:
where
.
It follows that
because the
are continuous at
.
Corollary 2: (Chain Rule) If
for
are
continuously differentiable at
and if
is
differentiable at (g_1(a),...,g_m(a)), then
has
partial derivatives
Proof: Apply the Chain Rule and Theorem 2.
Theorem 3: If
is a function defined on
an open subset
and if
and its first and
second order partials are exist throughout
and are continuous there,
then
for all
.
Proof: It is clearly enough to prove the result in the case where
. Let
and
be such that the rectangle
with diagonal from
to
is contained in
.
Let
be defined by
. First apply the
Mean Value Theorem to find a
such that
Now,
. Apply the Mean Value Theorem again
to find
between
and
such that
Combining results we have
But
which is symmetric in the two variables. So, one can obtain another
expression for the same by repeating the same construction swapping the
roles of the two variables: Let
and get
and
such that
and
So
. Now take the limit as
and use the continuity of the second partials to conclude
that the mixed partials are equal.