Directional Derivative: Step-by-Step Guide
The directional derivative D_u f(P) measures the rate of change of f at a point P in the direction of a unit vector u. It generalizes partial derivatives, which are directional derivatives along the coordinate axes, and is computed as the dot product of the gradient with u.
Math Racer skill guide · Calculus 3 · College
How to solve it, step by step
- Compute the gradient of f. Find the vector of partial derivatives grad f = (f_x, f_y) (or f_x, f_y, f_z in 3D).\[\nabla f = \langle f_x,\, f_y \rangle\]
- Evaluate the gradient at the point P. Plug the coordinates of P into each partial derivative.\[\nabla f(P) = \langle f_x(P),\, f_y(P) \rangle\]
- Normalize the direction vector. Divide the given direction v by its magnitude to get a unit vector u. The directional derivative requires a unit vector.\[\mathbf{u} = \frac{\mathbf{v}}{\|\mathbf{v}\|}\]
- Take the dot product. Compute D_u f(P) = grad f(P) dot u.\[D_{\mathbf{u}} f(P) = \nabla f(P) \cdot \mathbf{u}\]
- Interpret the sign and magnitude. A positive value means f increases in direction u; negative means decreases. The magnitude gives the rate per unit distance.\[D_{\mathbf{u}} f(P) > 0 \Rightarrow f \text{ increases}\]
Worked example
Find the directional derivative of f(x, y) = x^2 + 3xy at the point (1, 2) in the direction of v = (3, 4).
Step 1: Compute the gradient. f_x = 2x + 3y and f_y = 3x, so grad f = (2x + 3y, 3x).
Step 2: Evaluate at (1, 2): grad f(1, 2) = (2 + 6, 3) = (8, 3).
Step 3: Normalize v = (3, 4). |v| = sqrt(9 + 16) = 5, so u = (3/5, 4/5).
Step 4: Take the dot product: D_u f(1, 2) = (8)(3/5) + (3)(4/5) = 24/5 + 12/5 = 36/5.
Step 5: The directional derivative is 36/5 = 7.2, meaning f increases at rate 7.2 per unit distance in the direction (3/5, 4/5).
Verification: The maximum rate of change is |grad f(1,2)| = sqrt(64 + 9) = sqrt(73) ~ 8.54. Our value 7.2 is less than this maximum, as required.
Tips and common mistakes
- Always normalize the direction vector before dotting; otherwise you get a scaled answer.
- The directional derivative is maximum in the direction of grad f, and equals |grad f|.
- It is minimum (most negative) in the direction of -grad f, equal to -|grad f|.
- It is zero in any direction perpendicular to grad f - these are level-curve tangent directions.
- If the direction is given as an angle theta, use u = (cos theta, sin theta) - already a unit vector.
- Partial derivatives are special cases: f_x is D_u f with u = (1, 0).
- In 3D, the formula extends naturally: D_u f = grad f dot u with u in R^3.
- Verify that |D_u f| <= |grad f|; this is a quick correctness check (Cauchy-Schwarz).