MULTIVARIABLE CALCULUS 04
Directional Derivatives
A directional derivative measures how quickly a multivariable function changes when we move in a chosen direction.
The main idea
For a function
\[ f(x,y), \]the partial derivatives measure change in the coordinate directions.
But we may want to move in some other direction.
If \(\mathbf{u}\) is a unit vector, the directional derivative is
It gives the instantaneous rate of change of \(f\) in the direction \(\mathbf{u}\).
1. Why partial derivatives are only special cases
The partial derivative
\[ \frac{\partial f}{\partial x} \]measures change in the direction
\[ \mathbf{e}_x= \begin{pmatrix} 1\\ 0 \end{pmatrix}. \]Similarly,
\[ \frac{\partial f}{\partial y} \]measures change in the direction
\[ \mathbf{e}_y= \begin{pmatrix} 0\\ 1 \end{pmatrix}. \]A directional derivative extends this idea to any direction.
2. A direction vector
Suppose we want to move in the direction
\[ \mathbf{v} = \begin{pmatrix} 3\\ 4 \end{pmatrix}. \]Its magnitude is
\[ \|\mathbf{v}\| = \sqrt{3^2+4^2} = 5. \]The corresponding unit vector is
3. Why the direction vector should be a unit vector
The directional derivative should measure change per unit distance travelled.
So the direction vector must have magnitude \(1\).
Otherwise, its length would affect the numerical value of the derivative as well as its direction.
4. Example
Let
\[ f(x,y)=x^2+y^2. \]Then
\[ \nabla f= \begin{pmatrix} 2x\\ 2y \end{pmatrix}. \]At the point
\[ (1,2), \]we have
\[ \nabla f(1,2) = \begin{pmatrix} 2\\ 4 \end{pmatrix}. \]5. Direction \((3,4)\)
The corresponding unit vector is
\[ \mathbf{u} = \begin{pmatrix} 3/5\\ 4/5 \end{pmatrix}. \]Therefore,
\[ D_{\mathbf{u}}f = \begin{pmatrix} 2\\ 4 \end{pmatrix} \cdot \begin{pmatrix} 3/5\\ 4/5 \end{pmatrix}. \]Using the dot product,
\[ D_{\mathbf{u}}f = \frac65+\frac{16}{5}. \]Hence,
6. What does this number mean?
At the point \((1,2)\), if we move in the direction
\[ \begin{pmatrix} 3/5\\ 4/5 \end{pmatrix}, \]then \(f\) is increasing at an instantaneous rate of
\[ \frac{22}{5} \]per unit distance travelled.
7. Why the dot product appears
The dot product can be written as
\[ \nabla f\cdot\mathbf{u} = \|\nabla f\| \|\mathbf{u}\| \cos\theta, \]where \(\theta\) is the angle between the gradient and the chosen direction.
Since \(\mathbf{u}\) is a unit vector,
\[ \|\mathbf{u}\|=1. \]Therefore,
8. Direction of greatest increase
The directional derivative is largest when
\[ \cos\theta=1. \]This happens when
\[ \theta=0, \]so the chosen direction is the same as the gradient direction.
9. Maximum rate of increase
When we move in the gradient direction,
\[ D_{\mathbf{u}}f = \|\nabla f\|. \]Therefore,
10. Direction of greatest decrease
The smallest directional derivative occurs when
\[ \cos\theta=-1. \]This means we move opposite to the gradient:
\[ -\nabla f. \]The rate is then
\[ -\|\nabla f\|. \]So
11. Movement perpendicular to the gradient
If the direction is perpendicular to the gradient,
\[ \theta=\frac{\pi}{2}. \]Then
\[ \cos\theta=0. \]Therefore,
\[ D_{\mathbf{u}}f=0. \]There is no first-order change in the function in that direction.
12. Why this corresponds to a level curve
Along a level curve,
\[ f(x,y)=c, \]the function value remains constant.
Therefore its directional derivative along the tangent to the level curve is zero.
This explains again why
13. Diagram
14. Definition from first principles
Let \(\mathbf{u}\) be a unit vector.
The directional derivative at a point \(\mathbf{x}\) can be defined by
This is exactly the ordinary derivative idea applied along a line in the direction \(\mathbf{u}\).
15. Why \(\mathbf{x}+h\mathbf{u}\)?
Suppose the current point is
\[ \mathbf{x}. \]Moving a distance \(h\) in direction \(\mathbf{u}\) takes us to
\[ \mathbf{x}+h\mathbf{u}. \]So
\[ f(\mathbf{x}+h\mathbf{u})-f(\mathbf{x}) \]is the resulting change in the function.
Dividing by \(h\) gives change per unit distance, and taking \(h\to0\) gives the instantaneous rate.
16. Partial derivatives as directional derivatives
If
\[ \mathbf{u} = \begin{pmatrix} 1\\ 0 \end{pmatrix}, \]then
\[ D_{\mathbf{u}}f = \frac{\partial f}{\partial x}. \]If
\[ \mathbf{u} = \begin{pmatrix} 0\\ 1 \end{pmatrix}, \]then
\[ D_{\mathbf{u}}f = \frac{\partial f}{\partial y}. \]So partial derivatives are simply directional derivatives in the coordinate directions.
17. Three-dimensional version
For
\[ f(x,y,z), \]and a unit direction
\[ \mathbf{u} = \begin{pmatrix} u_1\\ u_2\\ u_3 \end{pmatrix}, \]the directional derivative is
\[ \boxed{ D_{\mathbf{u}}f = \nabla f\cdot\mathbf{u} } \]where
\[ \nabla f = \begin{pmatrix} f_x\\ f_y\\ f_z \end{pmatrix}. \]18. Modelling interpretation
Suppose an outcome
\[ R(\beta,\gamma) \]depends on two parameters.
The gradient tells us the separate sensitivities.
But perhaps both parameters change together in a particular direction.
Then the directional derivative tells us how \(R\) changes under that combined parameter change.
19. The central idea
The gradient contains the local change information; the directional derivative extracts the part corresponding to a chosen direction.