Math Insight

The multidimensional differentiability theorem

The question of the differentiability of a multivariable function ends up being quite subtle. Not only is the definition of differentiability in multiple dimensions fairly complicated and difficult to understand, but it turns out that the condition for a function to be differentiable is stronger than one might initially think. Although we view the derivative as the matrix of partial derivatives, the existence of partial derivatives is not sufficient for a function to be differentiable. We can create examples of functions that are not differentiable at a point despite having partial derivatives there.

Thankfully, most of the time, there is a way out of this mess. For most nice functions, we can completely sidestep the subtleties of differentiability and know right away that the function is differentiable. This escape from the intricacies of differentiability is due to a theorem that states that continuous partial derivatives are enough to ensure differentiability.

Differentiability theorem: If, for a function $\vc{f}: \R^n \to \R^m$ (confused?), all the partial derivatives of its matrix of partial derivatives exist and are continuous in a neighborhood of the point $\vc{x}=\vc{a}$, then $\vc{f}(\vc{x})$ is differentiable at $\vc{x}=\vc{a}$.

That's all we were missing in these non-differentiable functions with partial derivatives: the partial derivatives weren't continuous. If we can show the partial derivatives are continuous, then we don't have to worry about any of the subtleties of differentiability. If you zoom in on the function, it is very close to be linear, i.e., it is differentiable.

In the examples of calculating derivatives, the differentiability theorem is implicitly invoked to conclude that the functions are differentiable.

Tying all loose ends

The differentiability theorem finally puts some order into the chaotic world of multivariate differentiability. For many practical cases, testing for differentiability is reduced to the relatively simple task of checking for continuity of partial derivatives.

However, there are still a couple loose ends to be tied to make sure you really understand what's going on and that everything fits together the way it should. If you are up for it, it may be worth taking a look.

The first loose end is an immediate consequence of the differentiability theorem. Those pesky non-differentiable functions with partial derivatives must be violating the conditions of the differentiability theorem. To assure yourself that this is true and that the partial derivatives are discontinuous, you can check out this this visual tour showing the discontinuous partial derivatives for one of the example functions.

Once you have that issue tied up and settled in your mind, there's one more subtle loose end waiting for you. You have to remember your logic and notice that the differentiability theorem contains an "if" statement and not an "if and only if" statement. That's an important distinction because no, the converse of the differentiability theorem is not true. Just because a function is differentiable, it doesn't mean that its partial derivatives must be continuous. Unfortunately, there are differentiable functions out there that won't be neatly identified as such by the differentiability theorem. Thankfully, we have to work hard to make one of these functions. But since they exist, you may want to make yourself aware of their presence. In case you haven't lost your sense of adventure, we have an example of a differentiable function with discontinuous partial derivatives.

Once you get these last two loose ends tied up, you can feel pretty good about yourself. You've wrestled with the strange world of multivariable differentiability, and not only have you survived, you've emerged as the champion.