Let be a continuous function (nothing beyond continuity is required from ). A vector is called a super-differential of at a given point if for all near we have the relation
Similarly, we say that is a sub-differential of at if
We now establish some useful properties of super- and sub-differentials.
TEST FUNCTIONS. if and only if there exists a function such that , , and for all near , i.e., has a local minimum at . Similarly, if and only if there exists a function such that and has a local maximum at . (Note that we can always arrange to have by adding a constant to , which does not affect the other conditions.)
The function is sometimes called a test function. For the case of , an example of such a function is shown in Figure 5.7. The above result, whose proof we will not give, will be used for proving the other facts that follow.
RELATION WITH CLASSICAL DIFFERENTIALS. If is differentiable at , then
We prove both claims with the help of test functions. First, suppose that is differentiable at . It is clear that the gradient is both a super-differential and a sub-differential of at (indeed, with both (5.31) and (5.32) become equalities). If has a local minimum or maximum at for some , then hence . This shows that is the only element in and .
To prove the second claim, let be such that and for near . Then has a local maximum at , implying that hence . For (the case is completely analogous) we can write
As , the first fraction approaches , the last one approaches , and we know that the two gradients are equal. Therefore, by the ``Sandwich Theorem" the limit of the middle fraction exists and equals the other two. This limit must be , and everything is proved.
NON-EMPTINESS AND DENSENESS. The sets and are both nonempty, and actually dense in the domain of .
The idea of the proof is sketched in Figure 5.8. The highly irregular graph in the figure is that of . Take an arbitrary point . Choosing a function steep enough (see the solid curve in the figure), we can force to have a local maximum at a nearby point , as close to as we want. (For clarity, we also shift the graph of vertically to produce the dotted curve in the figure which touches the graph of at .) We then have . A similar argument works for .