Differentiation in several variables · Definition

Directional derivative

multivariable calculusderivatives

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}\).

\[D_{\mathbf{u}}f(\mathbf{x}_0)=\lim_{h\to0}\frac{f(\mathbf{x}_0+h\mathbf{u})-f(\mathbf{x}_0)}{h}\]

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

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