Training Multivariable Calculus Gradient & Directional Derivatives
3 / 5

Gradient & Directional Derivatives

26 min Multivariable Calculus
The gradient ∇f = (∂f/∂x, ∂f/∂y) is a vector that points in the direction of steepest ascent of a scalar field f, and its magnitude equals the maximum rate of change. The directional derivative D_u f = ∇f · û generalizes the partial derivative to any unit direction û. At a point where ∇f = 0 (a critical point), the second-derivative test for multivariable functions uses the Hessian matrix to classify the point as a local min, local max, or saddle point. Gradients also appear in vector identities, the formulation of gradient descent algorithms, and the definition of conservative vector fields.

Gradient & Directional Derivatives

Gradient Vector

$$\nabla f(x,y) = \left\langle f_x, f_y \right\rangle = \frac{\partial f}{\partial x}\mathbf{i} + \frac{\partial f}{\partial y}\mathbf{j}$$

Points in the direction of steepest ascent. Its magnitude is the maximum rate of change.

Directional Derivative

The rate of change of $f$ in the direction of unit vector $\mathbf{u}$:

$$D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u}$$

Critical Points

A point $(a,b)$ is critical if $\nabla f(a,b) = \mathbf{0}$. Use the second-derivative test:

$$D = f_{xx}f_{yy} - (f_{xy})^2$$

  • $D > 0$ and $f_{xx} > 0$: local minimum
  • $D > 0$ and $f_{xx} < 0$: local maximum
  • $D < 0$: saddle point
Example 1

Find $\nabla f$ at $(1,2)$ for $f = x^2y + y^3$.

$\nabla f = \langle 2xy, x^2+3y^2 \rangle$. At $(1,2)$: $\langle 4, 13 \rangle$.

Example 2

Find $D_{\mathbf{u}}f$ at $(1,0)$ for $f = e^x\cos y$ in the direction $\mathbf{u} = \langle 3/5, 4/5 \rangle$.

$\nabla f = \langle e^x\cos y, -e^x\sin y \rangle$. At $(1,0)$: $\langle e, 0 \rangle$.

$D_{\mathbf{u}}f = e(3/5) + 0(4/5) = 3e/5$.

Example 3

Classify the critical point of $f = x^2 + y^2 - 2x$.

$f_x = 2x-2 = 0 \Rightarrow x = 1$. $f_y = 2y = 0 \Rightarrow y = 0$.

$D = (2)(2) - 0 = 4 > 0$, $f_{xx} = 2 > 0$ → local minimum at $(1,0)$.

Practice Problems

1. Find $\nabla f$: $f = 3x^2 - xy + y^2$.
2. Evaluate $\nabla f(2,1)$: $f = x^2y$.
3. Direction of steepest ascent at $(1,1)$: $f = x^2+y^2$.
4. $D_{\mathbf{u}}f$ at $(0,0)$: $f = x^2+xy$, $\mathbf{u} = \langle 1/\sqrt{2}, 1/\sqrt{2} \rangle$.
5. Find critical points: $f = x^2+y^2-4x-6y$.
6. Classify: $f = x^2 - y^2$ at $(0,0)$.
7. Max rate of change at $(1,1)$: $f = x^2+3xy$.
8. Find $\nabla f$: $f = \ln(x^2+y^2)$.
9. Critical points of $f = x^3 - 3x + y^2$?
10. Is $(0,0)$ a min, max, or saddle for $f = x^2+4y^2$?
11. $\nabla f$ perpendicular to what curves?
12. $D_{\mathbf{u}}f$ at $(3,4)$: $f = \sqrt{x^2+y^2}$, $\mathbf{u} = \langle 1,0 \rangle$.
Show Answer Key

1. $\langle 6x-y, -x+2y \rangle$

2. $\langle 4, 4 \rangle$

3. $\nabla f = \langle 2,2 \rangle$, direction $\langle 1/\sqrt{2}, 1/\sqrt{2} \rangle$

4. $\nabla f(0,0) = \langle 0,0 \rangle$; $D_{\mathbf{u}}f = 0$

5. $f_x = 2x-4=0$, $f_y = 2y-6=0$; $(2,3)$

6. $D = (2)(-2)-0 = -4 < 0$: saddle point

7. $\nabla f(1,1) = \langle 5,3 \rangle$; $|\nabla f| = \sqrt{34}$

8. $\langle \frac{2x}{x^2+y^2}, \frac{2y}{x^2+y^2} \rangle$

9. $f_x = 3x^2-3=0 \Rightarrow x=\pm 1$; $f_y = 2y=0$; $(1,0)$ and $(-1,0)$

10. $D = 8>0$, $f_{xx}=2>0$: local minimum

11. Level curves $f(x,y)=c$

12. $\nabla f = \langle 3/5, 4/5 \rangle$; $D_{\mathbf{u}} = 3/5$

Gradient & Directional Derivative
∇f at (x₀,y₀)
|∇f| (max rate)
D_û f