- Duf = ∇f · u = fxu₁ + fyu₂
u = (u₁, u₂) must be a unit vector, |u| = 1. The directional derivative is defined as the limit of the difference
quotient for a step h from (a, b) along u as h goes to 0: the rate of change of f per unit of length in the direction u. The formula is the gradient
dotted with u, a dot product. The card takes the two partial derivatives
and the two components of u and returns Duf. If the components do not make a unit vector, it says so and gives
the rate per unit length.
Holds when f is differentiable at (a, b). For u = (1, 0) it is fx and for u = (0, 1) it is fy, so
the partial derivatives are the directional derivatives along
the axes. Turning u to −u changes the sign.
Worked example: x²y at (1, 2), towards (4, 6)
- The gradient: ∇f = (2xy, x²) = (4, 1) at (1, 2).
- The direction: from (1, 2) towards (4, 6) is v = (3, 4), and |v| = 5, so u = (3/5, 4/5) = (0.6, 0.8).
- Duf = 4 · 0.6 + 1 · 0.8 = 2.4 + 0.8 = 3.2.
Using v = (3, 4) without dividing by its length gives 4 · 3 + 1 · 4 = 16, which is five times too large.
Largest, smallest and zero
With θ the angle between ∇f and u, Duf = |∇f| cos θ.
- The largest value is |∇f|, for u along ∇f. Here |∇f| = √17 ≈ 4.12, in the direction (4, 1)/√17.
- The smallest is −|∇f|, for u against ∇f.
- The value is 0 for u perpendicular to ∇f, which is the direction of the
level curve through the point: here (−1, 4)/√17, and
4 · (−1) + 1 · 4 = 0.
The largest rate holds when ∇f ≠ 0. Where ∇f = 0 every direction has rate 0.
Take f(x, y) = xy²/(x² + y²) with f(0, 0) = 0. For a unit vector u, f(hu₁, hu₂)/h = u₁u₂², so every directional
derivative at the origin exists. Both partial derivatives are 0 there, so ∇f · u = 0, but for u = (0.6, 0.8) the
directional derivative is 0.6 · 0.64 = 0.384. The formula fails because f is not differentiable at the origin:
all the directional derivatives existing is not enough.
Common mistakes
- A direction that is not a unit vector. The formula then gives |v| times the rate per unit length.
- Calling Duf a vector. ∇f is the vector. Duf is a number.
- Taking ∇f at the wrong point. The gradient belongs at (a, b), where the rate is wanted.
- Mixing up the components. u₁ goes with fx and u₂ with fy.
Related: tangent plane,
total differential.