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.
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.
The idea in one picture
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.
The method
- Find \(\nabla\phi\) and evaluate it at the given point.
- 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\).
- Make it a unit vector: \(\hat a = \dfrac{\vec a}{|\vec a|}\).
- Take the dot product \(\nabla\phi\cdot\hat a\).
Solved examples
Example 1: A given direction
EasyFind the directional derivative of \(\phi = xy + yz + zx\) at \((1, 2, 0)\) in the direction of \(\mathbf{i} + 2\mathbf{j} + 2\mathbf{k}\).
- \(\nabla\phi = (y + z,\; x + z,\; x + y) = (2, 1, 3)\) at the point.
- \(\hat a = \dfrac{1}{3}(1, 2, 2)\).
- \(\nabla\phi\cdot\hat a = \dfrac{2 + 2 + 6}{3}\).
Answer\(\dfrac{10}{3}\)
Example 2: A classic
MediumFind 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}\).
- \(\phi_x = 2xyz + 4z^2 = 4 + 4 = 8\); \(\phi_y = x^2z = -1\); \(\phi_z = x^2y + 8xz = -2 - 8 = -10\).
- \(\hat a = \dfrac{1}{3}(2, -1, -2)\).
- \(\nabla\phi\cdot\hat a = \dfrac{16 + 1 + 20}{3}\).
Answer\(\dfrac{37}{3}\)
Example 3: Towards a point
MediumFind the directional derivative of \(\phi = 4xz^3 - 3x^2y^2z\) at \(P(2, -1, 2)\) towards \(Q(3, 1, 0)\).
- \(\phi_x = 4z^3 - 6xy^2z = 32 - 24 = 8\); \(\phi_y = -6x^2yz = 48\); \(\phi_z = 12xz^2 - 3x^2y^2 = 96 - 12 = 84\).
- \(\vec{PQ} = (1, 2, -2)\), with length 3, so \(\hat a = \dfrac{1}{3}(1, 2, -2)\).
- \(\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
MediumFind the maximum directional derivative of \(\phi = x^3y^2z\) at \((1, -2, 3)\).
- \(\nabla\phi = (3x^2y^2z,\; 2x^3yz,\; x^3y^2) = (36, -12, 4)\).
- 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 levelFind 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)\).
- \(\nabla\phi = (y^2,\; 2xy + z^3,\; 3yz^2) = (1, -3, -3)\) at \((2, -1, 1)\).
- 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}}\).
- \(\nabla\phi\cdot\hat n = \dfrac{0 + 12 + 3}{\sqrt{17}}\).
Answer\(\dfrac{15}{\sqrt{17}}\)
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.
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.
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.
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)\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
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\).