Theorem 2 can be used to simplify some complicated problems. The next theorem is even better in this respect — it makes it simple to check differentiability of many functions of several variables, by using single variable derivatives and properties of continuous functions.
Suppose is a function for some open . If all partial derivatives of exist and are continuous at every point of , then is differentiable at every point of .
This theorem motivates the following definition.
A function is said to be continuously differentiable or of class (or simply for short) if all partial derivatives of exist and are continuous at every point of .
Thus by Theorem 3, any function is differentiable everywhere in .
Details for Theorem 3
For notational simplicity, we will present the proof when . The idea is exactly the same in the general case.
Let be any point in . Since is open, there exists such that whenever . Below, we will always assume that .
Consider a vector . We start by writing Let’s temporarily write . Then by the single variable Mean Value Theorem from MAT 137. Rewriting this in terms of partial derivatives of , it says that A very similar argument shows that Combining these with , we see that where Finally, since and , it follows that
The right-hand side equals zero by an
argument, using our assumption that the partial derivatives are continuous. Hence
which proves the differentiability of
at
. Since
was an arbitrary point of
, this completes the proof.
Example 5.
Let . At which points of is differentiable?
Solution
In Example 1, we proved that is differentiable at , by using the definition of differentiability. That was a moderate amount of work, and it only told us about the point . Now let’s use Theorem 3 instead. We have already computed These are both continuous everywhere on , so Theorem 3 implies that is differentiable everywhere in , and that .
Example 6.
Let be a polynomial of total degree . At which points of is differentiable?
Solution
To answer this, note that if we “freeze†all variables except , then what is left is a polynomial function of (whose coefficients are polynomials involving all the other variables). When we differentiate this, we get a polynomial function of of lower degree. When we remember that the coefficients of this polynomial are themselves polynomials involving the other variables, we see that To see how this works in practice, consider a concrete example, such as Example 5 above. Since this is true for every , and since polynomials are continuous in all of , Theorem 3 implies that polynomials are differentiable everywhere in .
Contrast this with the example using a naive, incorrect definition for differentiable. The correct definition of differentiable functions eventually shows that polynomials are differentiable, and leads us towards other concepts that we might find useful, like . The incorrect naive definition leads to not being differentiable. Although it looks more complicated, the correct version does two important things that we look for from mathematical definitions: it includes the functions that we intuitively believe it should, and it leads us to new interesting properties.
Directional derivatives and the meaning of the gradient
A direction in is naturally represented by a unit vector. In general a vector has a direction and a magnitude; if we are only interested in directions, we can just consider vectors with magnitude equal to , i.e. unit vectors.
Thus, given a unit vector and a point , the point is the point reached by starting at and traveling a distance in the direction . So represents the change in if we start at and move a distance in the direction . This motivates the following definition:
If is a unit vector, then we define the directional derivative of at in the direction to be whenever the limit exists.
Based on our knowledge of first-year calculus, we can see that represents the instantaneous rate of change of as we move in the direction through the point .
By comparing the definitions of directional derivative and partial derivative, we see that for any , where denotes the unit vector in the th coordinate direction.
If is differentiable at a point , then exists for every unit vector , and moreover
The proof of this is almost exactly like the proof of Theorem 2. This is not surprising, since partial derivatives are just a special case of directional derivatives.
The proof does not require to be a unit vector; this is only needed for the interpretation of as a directional derivative. For any vector , whether or not it is a unit vector, it is generally true that if is differentiable at a point , then The proof again is essentially the same as that of Theorem 2. It is left as an exercise.
The converse of Theorem 4 is not true. One can find functions such that at some point , the directional derivative exists for every unit vector , but is not differentiable at . See the exercises below for some examples.
Example 7.
Assume that is an open subset of and that is differentiable. At a point , determine the direction in which is increasing most rapidly, in the sense that
Solution
By Theorem 4 and basic properties of the dot product, we know that for any unit vector , where is the angle between and .
We consider two cases:
Case 1. If then for all , so every unit vector maximizes (and minimizes) .
Case 2. If , then according to we have to choose so that is as large as possible. This happens when , that is, when is the unit vector pointing in the same direction as . That is, the directional derivative is maximized in the direction
This example tells us what the gradient of a real-valued function means. If you remember only one thing from MAT 237, it should be this:
If it is not zero, points in the direction where has the greatest increase.
This is the principle that allows machine learning by gradient descent, determines seam carving for image resizing, and will play an important role in the rest of this course.
Example 8.
Let . Find the direction in which has the greatest increase at the point .
Solution
To answer this, we use formula . We compute
Example 9.
Let . Find the direction in which is decreasing most rapidly at the point .
Solution
If has the greatest decrease in the direction , then is increasing most rapidly in the direction . By linearity of the dot product and gradient, , so is decreasing most rapidly in the direction of .
Thus for , we have
Problems
Basic
- Determine all points where a function is differentiable, and determine at those points.
Problems like this are normally solved by using Theorem 3 and properties of continuous functions which allow us to recognize partial derivatives as continuous. Examples might be
- for .
- for such that .
- for
- for .
Given a function , find the direction in which is increasing/decreasing most rapidly at the point . For example, consider any of the functions in the above question, at the point or , depending on the dimension.
If is a complicated function like Example 4, determining whether is differentiable at a given point using the defintion rather than using Theorem 3 is difficult. But determining the directional derivatives at a point using their definition is not. For example
- Let For the unit vector , determine .
- Let For the unit vector , determine .
Advanced
- Let
- Define by
Is continuous at ? Determine the answer using material from Section 1.2.
Show that for every unit vector , the directional derivative exists and equals zero.
Prove that is not differentiable at .
Hint
Consider for small values of . Also, note that if , then .
- Consider the function defined by Prove that
- all partial derivatives of exist everywhere in ,
- at least one partial derivative of is not continuous at ,
- is differentiable at .
Hint
See Example 4.
- A function is said to be homogeneous of degree if The same definition holds if the domain of is .
Prove that if is differentiable away from the origin and homogeneous of degree , then for every unit vector , the directional derivative is homogeneous of degree .
In particular this imples that all partial derivatives are homogeneous of degree , since partial derivatives are a special case of directional derivatives.
Hint
To get started, note that for any and ,
Give a detailed proof of , and hence of Theorem 4 (by small modifications of the proof of Theorem 2.)
Suppose that is an open subset of that contains the origin, and that is a function . Prove that if then for every unit vector .
This was used in the proof of Theorem 2. It is good practice to write out the proof. You should be able to supply all relevant definitions from memory. This would be considered an easy proof question for a test.
- Suppose that , and that . Prove that This was also used in the proof of Theorem 2.
   Â

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.