Calculus · Unit 3 · Topic 15

Directional derivative: the rate of change in any direction.

Short answer

The directional derivative of a scalar field \(\phi\) in the direction of a vector \(\vec a\) is

\[D_{\hat a}\phi = \nabla\phi\cdot\hat a, \qquad \hat a = \frac{\vec a}{|\vec a|}\]

It is greatest in the direction of \(\nabla\phi\), where its value is \(|\nabla\phi|\).

Engineering Calculus · Unit 3B Tech / BE Semester IBSc
01

The formula

Before you start: you'll need the gradient.

Partial derivatives give the rate of change along the \(x\), \(y\) and \(z\) axes. The directional derivative gives the rate of change in any direction you choose.

Directional derivative

The rate of change of \(\phi\) at a point in the direction of a vector \(\vec a\) is \[D_{\hat a}\phi = \nabla\phi\cdot\hat a, \qquad \text{where } \hat a = \frac{\vec a}{|\vec a|}\]

The direction must be a unit vector, so always divide \(\vec a\) by its length first.

02

The idea in one picture

The gradient vector at a point, a unit direction at angle theta to it, and the projection of the gradient onto that direction P ∇f direction â θ Dₐ f = |∇f| cos θ
The directional derivative in the direction \(\hat a\) is the shadow (projection) of \(\nabla f\) on that direction: \(D_{\hat a} f = \nabla f\cdot\hat a = |\nabla f|\cos\theta\). It is largest when \(\theta = 0\), along \(\nabla f\) itself.

Three facts that follow

  • The maximum directional derivative is \(|\nabla\phi|\), in the direction of \(\nabla\phi\) (\(\theta = 0\)).
  • The minimum is \(-|\nabla\phi|\), in the opposite direction (\(\theta = 180^\circ\)).
  • It is zero in any direction perpendicular to \(\nabla\phi\), that is, along the level surface.
03

The method

  1. Find \(\nabla\phi\) and evaluate it at the given point.
  2. Find the direction vector \(\vec a\). If you're told “towards the point \(Q\)”, use \(\vec a = \vec{PQ}\). If “along the normal to a surface \(\psi = c\)”, use \(\vec a = \nabla\psi\).
  3. Make it a unit vector: \(\hat a = \dfrac{\vec a}{|\vec a|}\).
  4. Take the dot product \(\nabla\phi\cdot\hat a\).
04

Solved examples

Example 1: A given direction

Easy

Find the directional derivative of \(\phi = xy + yz + zx\) at \((1, 2, 0)\) in the direction of \(\mathbf{i} + 2\mathbf{j} + 2\mathbf{k}\).

  1. \(\nabla\phi = (y + z,\; x + z,\; x + y) = (2, 1, 3)\) at the point.
  2. \(\hat a = \dfrac{1}{3}(1, 2, 2)\).
  3. \(\nabla\phi\cdot\hat a = \dfrac{2 + 2 + 6}{3}\).

Answer\(\dfrac{10}{3}\)

Example 2: A classic

Medium

Find the directional derivative of \(\phi = x^2yz + 4xz^2\) at \((1, -2, -1)\) in the direction of \(2\mathbf{i} - \mathbf{j} - 2\mathbf{k}\).

  1. \(\phi_x = 2xyz + 4z^2 = 4 + 4 = 8\); \(\phi_y = x^2z = -1\); \(\phi_z = x^2y + 8xz = -2 - 8 = -10\).
  2. \(\hat a = \dfrac{1}{3}(2, -1, -2)\).
  3. \(\nabla\phi\cdot\hat a = \dfrac{16 + 1 + 20}{3}\).

Answer\(\dfrac{37}{3}\)

Example 3: Towards a point

Medium

Find the directional derivative of \(\phi = 4xz^3 - 3x^2y^2z\) at \(P(2, -1, 2)\) towards \(Q(3, 1, 0)\).

  1. \(\phi_x = 4z^3 - 6xy^2z = 32 - 24 = 8\); \(\phi_y = -6x^2yz = 48\); \(\phi_z = 12xz^2 - 3x^2y^2 = 96 - 12 = 84\).
  2. \(\vec{PQ} = (1, 2, -2)\), with length 3, so \(\hat a = \dfrac{1}{3}(1, 2, -2)\).
  3. \(\nabla\phi\cdot\hat a = \dfrac{8 + 96 - 168}{3}\).

Answer\(-\dfrac{64}{3}\): \(\phi\) decreases in that direction.

Example 4: The maximum directional derivative

Medium

Find the maximum directional derivative of \(\phi = x^3y^2z\) at \((1, -2, 3)\).

  1. \(\nabla\phi = (3x^2y^2z,\; 2x^3yz,\; x^3y^2) = (36, -12, 4)\).
  2. The maximum is \(|\nabla\phi| = \sqrt{1296 + 144 + 16} = \sqrt{1456}\).

Answer\(4\sqrt{91} \approx 38.2\), in the direction of \(36\mathbf{i} - 12\mathbf{j} + 4\mathbf{k}\)

Example 5: Along the normal to a surface

Exam level

Find the directional derivative of \(\phi = xy^2 + yz^3\) at \((2, -1, 1)\) in the direction of the normal to the surface \(x\log z - y^2 = -4\) at \((-1, 2, 1)\).

  1. \(\nabla\phi = (y^2,\; 2xy + z^3,\; 3yz^2) = (1, -3, -3)\) at \((2, -1, 1)\).
  2. Normal: \(\psi = x\log z - y^2\), so \(\nabla\psi = \left(\log z,\; -2y,\; \dfrac{x}{z}\right) = (0, -4, -1)\) at \((-1, 2, 1)\). Unit normal \(\hat n = \dfrac{(0, -4, -1)}{\sqrt{17}}\).
  3. \(\nabla\phi\cdot\hat n = \dfrac{0 + 12 + 3}{\sqrt{17}}\).

Answer\(\dfrac{15}{\sqrt{17}}\)

Vipul Sir's tip

Notice that two different points can appear in one question, as in Example 5. Evaluate \(\nabla\phi\) at the first point and the normal at the second. Mixing them up is very common.

05

Common mistakes

1. Not using a unit vector

\(\nabla\phi\cdot\vec a\) without dividing by \(|\vec a|\) gives an answer that is too big by a factor of \(|\vec a|\).

2. Using the position of \(Q\) instead of \(\vec{PQ}\)

“Towards \(Q\)” means the direction \(\vec{PQ} = Q - P\), not the vector to \(Q\) from the origin.

3. Saying the maximum is in the direction of \(\hat a\)

The maximum is always along \(\nabla\phi\) itself, whatever direction the question mentions.

06

How it's asked in exams

  • In a given direction, towards a given point, or along the normal to a surface.
  • Maximum directional derivative and the direction in which it occurs.
  • Find constants so that the directional derivative has a given maximum value or direction.
07

Practice questions

Try each one on paper before you open the answer.

Q1\(\phi = x^2 + y^2 + z^2\) at \((1, 1, 1)\), in the direction \(\mathbf{i} - \mathbf{j} + \mathbf{k}\).

\(\nabla\phi = (2, 2, 2)\), \(\hat a = \dfrac{1}{\sqrt 3}(1, -1, 1)\). Answer: \(\dfrac{2}{\sqrt 3}\).

Q2\(\phi = xyz\) at \((1, 1, 1)\), in the direction \(\mathbf{i} + 2\mathbf{j} + 2\mathbf{k}\).

\(\nabla\phi = (1, 1, 1)\), \(\hat a = \dfrac{1}{3}(1, 2, 2)\). Answer: \(\dfrac{5}{3}\).

Q3Maximum directional derivative of \(\phi = 2x^2 + 3y^2 + 5z^2\) at \((1, 1, -4)\).

\(\nabla\phi = (4, 6, -40)\), so the maximum is \(\sqrt{1652} = 2\sqrt{413} \approx 40.6\).

Q4\(\phi = e^{2x}\cos(yz)\) at the origin, towards \((1, 1, 1)\).

\(\nabla\phi = (2e^{2x}\cos yz,\; -ze^{2x}\sin yz,\; -ye^{2x}\sin yz) = (2, 0, 0)\). Answer: \(\dfrac{2}{\sqrt 3}\).

Q5In which directions is the directional derivative of \(\phi = x^2y\) at \((1, 2)\) zero?

\(\nabla\phi = (2xy, x^2) = (4, 1)\). It is zero in the perpendicular directions \(\pm\dfrac{1}{\sqrt{17}}(1, -4)\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

08

Frequently asked questions

What is a directional derivative?

The rate of change of a scalar field in a chosen direction: \(\nabla\phi\cdot\hat a\), where \(\hat a\) is a unit vector in that direction.

In which direction is the directional derivative maximum?

Along the gradient \(\nabla\phi\). Its maximum value is \(|\nabla\phi|\).

How is it related to partial derivatives?

Partial derivatives are directional derivatives along the axes: with \(\hat a = \mathbf{i}\), \(\nabla\phi\cdot\mathbf{i} = \phi_x\).

Where this leads next

← All 33 Calculus topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

First-year Engineering Calculus

Get the whole course right, with Vipul Sir beside you.

Concept-first coaching in small batches in Goregaon and Vile Parle, from the mean value theorems to Gauss's divergence theorem.

WhatsApp↗