← MATH 241 MathScape 0 MATH241

Directional Derivatives

2 min read

Jump to a section
Reference: Stewart §14.6

Textbook Reference

Primary source OpenStax Calculus Volume 3, Section 4.6: “Directional Derivatives and the Gradient”
Direct link https://openstax.org/books/calculus-volume-3/pages/4-6-directional-derivatives-and-the-gradient
Textbook used in class Stewart, Calculus, Section 14.6: “Directional Derivatives and the Gradient Vector” (Examples 1, 2)

Quick Reference

Definition: $$D_\mathbf{u} f(a,b) = \lim_{h\to 0}\frac{f(a+h u_1,\, b+h u_2)-f(a,b)}{h},$$ where $\mathbf{u} = \langle u_1, u_2\rangle$ is a unit vector.

Formula (using the gradient): $$D_\mathbf{u} f = \nabla f \cdot \mathbf{u} = f_x u_1 + f_y u_2.$$

Maximum value: $D_\mathbf{u} f$ is maximized when $\mathbf{u}$ points in the direction of $\nabla f$, and the maximum value is $|\nabla f|$.


Motivation

Partial derivatives measure the rate of change only in the coordinate axis directions. The directional derivative $D_\mathbf{u} f$ extends this to any direction: it measures the rate at which $f$ increases as you move in the direction of the unit vector $\mathbf{u}$.

If you stand on a hillside (a surface $z = f(x,y)$), the slope depends on which direction you are facing. Walking north gives one slope; walking northeast gives another. The directional derivative captures this direction-dependent slope.


Key Concepts

1. The Formula

When $f$ is differentiable at $(a,b)$, the directional derivative in the direction of any unit vector $\mathbf{u} = \langle u_1, u_2\rangle$ is: $$D_\mathbf{u} f(a,b) = f_x(a,b) u_1 + f_y(a,b) u_2 = \nabla f(a,b) \cdot \mathbf{u}.$$

The requirement that $\mathbf{u}$ be a unit vector ($|\mathbf{u}| = 1$) is essential: without it, the formula would depend on the magnitude of $\mathbf{u}$, not just its direction.

2. Converting Angles to Unit Vectors

A direction making angle $\theta$ with the positive $x$-axis corresponds to $\mathbf{u} = \langle \cos\theta, \sin\theta\rangle$. For example, the direction “northeast” is $\theta = 45°$, giving $\mathbf{u} = \langle 1/\sqrt{2}, 1/\sqrt{2}\rangle$.

3. Partial Derivatives as Special Cases

$D_{\mathbf{i}} f = f_x$ (direction $\mathbf{i} = \langle 1,0\rangle$) and $D_{\mathbf{j}} f = f_y$ (direction $\mathbf{j} = \langle 0,1\rangle$). Directional derivatives generalize partial derivatives.


Worked Example

Find $D_\mathbf{u} f(1,2)$ for $f(x,y) = x^3 - 3xy + 4y^2$ in the direction of $\mathbf{v} = \langle 2, -5\rangle$. (Stewart 14.6, Example 1.)

Step 1. Convert $\mathbf{v}$ to a unit vector. $$|\mathbf{v}| = \sqrt{4+25} = \sqrt{29}, \qquad \mathbf{u} = \frac{1}{\sqrt{29}}\langle 2, -5\rangle.$$

Step 2. Compute the gradient at $(1,2)$. $$f_x = 3x^2 - 3y \implies f_x(1,2) = 3 - 6 = -3.$$ $$f_y = -3x + 8y \implies f_y(1,2) = -3 + 16 = 13.$$ $$\nabla f(1,2) = \langle -3, 13\rangle.$$

Step 3. Dot with $\mathbf{u}$. $$D_\mathbf{u} f = \langle -3, 13\rangle \cdot \frac{1}{\sqrt{29}}\langle 2, -5\rangle = \frac{-6 - 65}{\sqrt{29}} = \frac{-71}{\sqrt{29}}.$$

The negative value means $f$ decreases in this direction at the given point.


Common misconception

$D_\mathbf{v} f = \nabla f \cdot \mathbf{v}$ for any vector $\mathbf{v}$. The formula $D_\mathbf{u} f = \nabla f \cdot \mathbf{u}$ requires $\mathbf{u}$ to be a unit vector. If $\mathbf{v}$ is not a unit vector, then $\nabla f \cdot \mathbf{v}$ depends on $|\mathbf{v}|$ and does not give the rate of change per unit distance. Always normalize first: $\mathbf{u} = \mathbf{v}/|\mathbf{v}|$.


Leveled Practice

Problem 1. Find the directional derivative of $f(x,y) = x^2 + xy$ at $(2,1)$ in the direction of $\theta = \pi/4$.

Show answer

$\mathbf{u} = \langle \cos(\pi/4), \sin(\pi/4)\rangle = \langle 1/\sqrt{2}, 1/\sqrt{2}\rangle$.

$f_x = 2x + y \implies f_x(2,1) = 5$.

$f_y = x \implies f_y(2,1) = 2$.

$D_\mathbf{u} f = 5/\sqrt{2} + 2/\sqrt{2} = 7/\sqrt{2} = 7\sqrt{2}/2$.


Mastery Checklist


Next: The Gradient Vector