Differentiation in several variables · Definition
Directional derivative
Before you start you need to know
Partial derivatives measure change only along the axes; the directional derivative measures the slope of the terrain when walking in any heading.
Definition
The directional derivative \(D_{\mathbf{u}}f\) of \(f\) at a point \(\mathbf{x}_0\), along a unit vector \(\mathbf{u}\), is the rate of change of \(f\) moving from \(\mathbf{x}_0\) in the direction of \(\mathbf{u}\).
If \(f\) is differentiable, the directional derivative is computed without limits: \(D_{\mathbf{u}}f=\nabla f\cdot\mathbf{u}\). The partials are the special case \(\mathbf{u}=\mathbf{i}\) or \(\mathbf{u}=\mathbf{j}\), so \(D_{\mathbf{i}}f=f_x\) and \(D_{\mathbf{j}}f=f_y\). The same formula holds with three or more variables.
The vector \(\mathbf{u}\) must be a unit vector: the definition measures change per unit of distance traveled. If the heading is given by an arbitrary vector \(\mathbf{v}\), normalize it first, \(\mathbf{u}=\mathbf{v}/|\mathbf{v}|\). For \(f=x^2y\) at \((1,2)\) with \(\mathbf{v}=\langle3,4\rangle\), \(\nabla f=\langle4,1\rangle\) and \(D_{\mathbf{u}}f=\tfrac{12+4}{5}=\tfrac{16}{5}\).
Writing \(D_{\mathbf{u}}f=|\nabla f|\cos\theta\), with \(\theta\) the angle between \(\mathbf{u}\) and the gradient, three cases can be read off: the maximum value \(|\nabla f|\) is reached by moving along the gradient, the minimum \(-|\nabla f|\) in the opposite sense, and zero in the perpendicular directions, which are tangent to the level curve.
A common mistake is forgetting to normalize \(\mathbf{v}\), which multiplies the result by \(|\mathbf{v}|\). Another is believing that the existence of all directional derivatives implies differentiability: a function can have derivatives in every heading and still fail to be continuous; the formula \(\nabla f\cdot\mathbf{u}\) requires differentiability.
Think about it
At a point, \(f\) increases at rate \(3\) toward the east and at rate \(4\) toward the north. At what rate does it increase toward the northeast?
The gradient is \(\langle3,4\rangle\) and northeast is \(\mathbf{u}=\langle1,1\rangle/\sqrt2\). Then \(D_{\mathbf{u}}f=\tfrac{3+4}{\sqrt2}=\tfrac{7}{\sqrt2}\approx4.95\), less than the maximum \(|\nabla f|=5\).
Exercises 10
- Compute \(D_{\mathbf{u}}f(1,2)\) for \(f(x,y)=x^2y\) and \(\mathbf{u}=\langle\tfrac35,\tfrac45\rangle\).
- Compute \(D_{\mathbf{u}}f(2,3)\) for \(f(x,y)=xy\) and \(\mathbf{u}=\mathbf{i}=\langle1,0\rangle\).
- Compute \(D_{\mathbf{u}}f(1,1)\) for \(f(x,y)=x^2+y^2\) and \(\mathbf{u}=\langle\tfrac{1}{\sqrt2},\tfrac{1}{\sqrt2}\rangle\).
- Compute the derivative of \(f(x,y)=e^{xy}\) at \((0,1)\) in the direction of the vector \(\mathbf{v}=\langle3,4\rangle\).
- A point at \((1,1)\) moves toward \((4,5)\). Compute the rate of change of \(f(x,y)=x^2y+y\) in that direction.
- What is the maximum rate of change of \(f(x,y)=x^2+3y^2\) at \((1,1)\)?
- For \(f(x,y)=x^2+y^2\) at \((1,2)\), in which unit direction \(\mathbf{u}\) is the directional derivative \(0\)?
- Compute \(D_{\mathbf{u}}f(1,2,3)\) for \(f(x,y,z)=xyz\) and \(\mathbf{u}=\langle\tfrac23,\tfrac13,\tfrac23\rangle\).
- If \(|\nabla f(p)|=5\) and for a unit vector \(\mathbf{u}\) we have \(D_{\mathbf{u}}f(p)=5\), what follows about \(\mathbf{u}\)?
- A differentiable function satisfies \(D_{\mathbf{i}}f(p)=2\) and \(D_{\mathbf{j}}f(p)=-1\). Compute \(D_{\mathbf{u}}f(p)\) with \(\mathbf{u}=\langle\tfrac35,\tfrac45\rangle\).
References
- James Stewart, Daniel K. Clegg, Saleem Watson, Calculus: Early Transcendentals, 9th edition, Cengage, 2021. §14.6
- Joel Hass, Christopher Heil, Przemyslaw Bogacki, Maurice D. Weir, George B. Thomas Jr., Thomas' Calculus, 15th edition, Pearson, 2023. §14.5
- Jerrold E. Marsden, Anthony Tromba, Vector Calculus, 6th edition, W. H. Freeman, 2012. §2.6