Euler Hall — free maths guides

The directional derivative

Compute a directional derivative as the gradient dotted with a unit direction. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus III guides.

The gradient, dotted with a unit direction

The directional derivative offf at a point in the direction of a unit vectoru\mathbf{u} is

Duf=∇f⋅u.D_{\mathbf{u}}f = \nabla f\cdot\mathbf{u}.

It is the rateff changes per unit distance moved in that direction.

A worked case.f=x+yf=x+y at the origin has∇f=⟨1,1⟩\nabla f = \langle 1,1\rangle. In the direction⟨3,4⟩\langle 3,4\rangle, the unit direction is⟨3/5,4/5⟩\langle 3/5, 4/5\rangle, so

Duf=1⋅35+1⋅45=75.D_{\mathbf{u}}f = 1\cdot\tfrac35 + 1\cdot\tfrac45 = \tfrac75.

Soff rises by1.41.4 per unit travelled in that direction — less than its steepest rate, which would besqrt2≈1.41\\sqrt2 \approx 1.41 along the diagonal.

The whole family of directions. Rotatingu\mathbf{u} through a full turn sweeps the rate between+∥∇f∥+\|\nabla f\| and−∥∇f∥-\|\nabla f\|, passing through zero whenu\mathbf{u} is perpendicular to the gradient — that is, along a level curve.

Why normalising is not optional

The dot product∇f⋅v\nabla f\cdot\mathbf{v} scales linearly withv\mathbf{v}: doubling the vector doubles the answer. If the "direction" were⟨6,8⟩\langle 6,8\rangle instead of⟨3,4⟩/5\langle 3,4\rangle/5, the answer would be twice the true rate — it would no longer be a rate per unit distance, but per two units.

So the direction is divided by its own length, which is exactly what makes the answer a rate.

A directional derivative with a negative component

Question, in the shape the practice takes.f=x2+y2f = x^2+y^2 at(1,0)(1,0), direction⟨−1,0⟩\langle -1,0\rangle.

Work it through.∇f=⟨2,0⟩\nabla f = \langle 2,0\rangle and the direction is already unit, soDuf=−2D_{\mathbf{u}}f = -2.

A negative rate: moving in−x-x decreasesff, which is right sinceff grows away from the origin.

By the end you can
  • Compute a directional derivative as the gradient dotted with a unit direction
  • Normalise the direction first
  • Say why the direction must be a unit vector
Check yourself

f=xyf=xy at(1,1)(1,1) along⟨1,0⟩\langle 1,0\rangle?

Answers

∇f=⟨y,x⟩=⟨1,1⟩\nabla f = \langle y,x\rangle = \langle 1,1\rangle, so the rate along⟨1,0⟩\langle 1,0\rangle is 1.

Work out where to start — free, no accountAnswer six real questions — free, no account