Multivariable-Calculus · Unit 11 · Video 3 · Interactive Practice

The Slope in Every Direction: Directional Derivatives and the Gradient

IKey Formulas

FormulaNameWhere it comes from
x=x0+Asx = x_0 + As, y=y0+Bsy = y_0 + Bs, with u^=⟨A,B⟩\hat u = \langle A, B\rangle, ∣u^∣=1\lvert\hat u\rvert = 1Unit-speed line in direction u^\hat udr⃗ds=u^\dfrac{d\vec r}{ds} = \hat u, so ss is distance travelled
dwds∣u^=∇w⋅u^=wxA+wyB\left.\dfrac{dw}{ds}\right|_{\hat u} = \nabla w \cdot \hat u = w_x A + w_y BDirectional derivativeChain rule dwds=∇w⋅dr⃗ds\dfrac{dw}{ds} = \nabla w \cdot \dfrac{d\vec r}{ds} along that line
dwds∣u^=∣∇w∣cos⁡θ\left.\dfrac{dw}{ds}\right|_{\hat u} = \lvert\nabla w\rvert \cos\thetaGeometric formθ\theta = angle between ∇w\nabla w and u^\hat u; the component of ∇w\nabla w along u^\hat u
∣∇w∣\lvert\nabla w\rvert at θ=0\theta = 0;  0\ 0 at θ=90°\theta = 90\degree;  −∣∇w∣\ -\lvert\nabla w\rvert at θ=180°\theta = 180\degreeThree casesu^\hat u along ∇w\nabla w (steepest climb), tangent to the level curve, along −∇w-\nabla w (steepest descent)

Key Insight: The partials wxw_x and wyw_y are the directional derivatives along ı^\hat\imath and ȷ^\hat\jmath, two of infinitely many. Since the rate along ∇w/∣∇w∣\nabla w/\lvert\nabla w\rvert is ∣∇w∣>0\lvert\nabla w\rvert > 0, the gradient points to the side of the level curve where ww is larger.

IIOne Gradient, Every Direction

For w=x2+y2+1w = x^2 + y^2 + 1 at (1,1)(1, 1), the rate in direction u^\hat u is the projection of ∇w=⟨2,2⟩\nabla w = \langle 2, 2\rangle onto u^\hat u.

IIIThe Slope of the Slice

Along the line x=1+Asx = 1 + As, y=1+Bsy = 1 + Bs, the secant slope Δw/Δs\Delta w/\Delta s tends to ∇w⋅u^\nabla w \cdot \hat u.

IVSketching the Gradient from Contours

For w=x2+3y2w = x^2 + 3y^2, ∇w\nabla w crosses each ellipse at a right angle, on the side of higher values.

VQuiz Questions

Problem 1 · Compute a Directional Derivative

Given: w=x2yw = x^2 y at the point (1,2)(1, 2) — find the rate of change of ww in the direction of the vector ⟨3,4⟩\langle 3, 4\rangle.

✅ Correct! ∇w(1,2)=⟨4,1⟩\nabla w(1, 2) = \langle 4, 1\rangle and u^=⟨35,45⟩\hat u = \langle \tfrac35, \tfrac45\rangle, so ∇w⋅u^=125+45=165\nabla w \cdot \hat u = \tfrac{12}{5} + \tfrac{4}{5} = \tfrac{16}{5}.
❌ Not a unit vector. ⟨3,4⟩\langle 3, 4\rangle has length 55; dotting with it gives 55 times the rate. Divide by its length first.
❌ Only half the dot product. 125\tfrac{12}{5} is wxAw_x A; the term wyB=1⋅45w_y B = 1 \cdot \tfrac45 is missing.
❌ That is ∣∇w∣\lvert\nabla w\rvert. It is the rate only in the gradient's own direction; ⟨3,4⟩\langle 3, 4\rangle is not parallel to ⟨4,1⟩\langle 4, 1\rangle.
❌ Not quite. Compute ∇w=⟨2xy,x2⟩\nabla w = \langle 2xy, x^2\rangle at (1,2)(1, 2), normalise ⟨3,4⟩\langle 3, 4\rangle, then dot.
Show solution

Gradient: wx=2xyw_x = 2xy, wy=x2w_y = x^2, so ∇w(1,2)=⟨4,1⟩\nabla w(1, 2) = \langle 4, 1\rangle.

Unit vector: ∣⟨3,4⟩∣=5\lvert\langle 3, 4\rangle\rvert = 5, so u^=⟨35,45⟩\hat u = \langle \tfrac35, \tfrac45\rangle.

dwds∣u^=∇w⋅u^=4⋅35+1⋅45=125+45=165\left.\frac{dw}{ds}\right|_{\hat u} = \nabla w \cdot \hat u = 4 \cdot \tfrac35 + 1 \cdot \tfrac45 = \tfrac{12}{5} + \tfrac{4}{5} = \tfrac{16}{5}

Check against the bound: 165=3.2≤∣∇w∣=17≈4.12\tfrac{16}{5} = 3.2 \le \lvert\nabla w\rvert = \sqrt{17} \approx 4.12.

Problem 2 · Steepest Ascent on an Ellipse

Given: w=x2+3y2w = x^2 + 3y^2 at the point (1,13)(1, \tfrac{1}{\sqrt3}) on the level curve w=2w = 2 — find the unit vector of fastest increase and the rate in that direction.

Direction of fastest increase?

Maximum rate of increase?

✅ Correct! ∇w=⟨2,23⟩\nabla w = \langle 2, 2\sqrt3\rangle has length 44 and points at 60°60\degree, while the radius to the point is at 30°30\degree.
❌ That is the direction from the origin. It points at 30°30\degree; the gradient ⟨2,23⟩\langle 2, 2\sqrt3\rangle points at 60°60\degree, perpendicular to the ellipse rather than along the radius.
❌ Right direction, wrong length. ⟨2,23⟩\langle 2, 2\sqrt3\rangle has length 44; divide by it to get a unit vector.
❌ Check the direction. −∇w-\nabla w is the direction of fastest decrease; compute ∇w=⟨2x,6y⟩\nabla w = \langle 2x, 6y\rangle at the point.
❌ That is the value w=2w = 2, not a rate. The maximum rate is ∣∇w∣\lvert\nabla w\rvert.
❌ That is ∣∇w∣2=4+12\lvert\nabla w\rvert^2 = 4 + 12. Take the square root.
❌ Check the rate. The maximum rate is the length ∣∇w∣\lvert\nabla w\rvert, not the sum of the components.
Show solution

Gradient: ∇w=⟨2x,6y⟩\nabla w = \langle 2x, 6y\rangle, so at (1,13)(1, \tfrac{1}{\sqrt3}):

∇w=⟨2, 63⟩=⟨2,23⟩,∣∇w∣=4+12=4\nabla w = \Big\langle 2,\ \tfrac{6}{\sqrt3} \Big\rangle = \langle 2, 2\sqrt3 \rangle, \qquad \lvert\nabla w\rvert = \sqrt{4 + 12} = 4

Direction: u^=∇w∣∇w∣=⟨12,32⟩\hat u = \dfrac{\nabla w}{\lvert\nabla w\rvert} = \big\langle \tfrac12, \tfrac{\sqrt3}{2} \big\rangle, at 60°60\degree above the xx-axis.

Rate: dwds∣u^=∣∇w∣cos⁡0=4\left.\dfrac{dw}{ds}\right|_{\hat u} = \lvert\nabla w\rvert \cos 0 = 4.

The radius from the origin, ⟨1,13⟩\langle 1, \tfrac{1}{\sqrt3}\rangle, is at 30°30\degree: the level curves are ellipses, not circles, so the gradient does not point straight away from the centre.

Problem 3 · Descent and No Change

Given: w=xy2w = xy^2 at the point (2,1)(2, 1) — find the most negative directional derivative there, and a unit vector along which ww does not change to first order.

Most negative value of dwds∣u^\left.\frac{dw}{ds}\right|_{\hat u}?

Unit vector with dwds∣u^=0\left.\frac{dw}{ds}\right|_{\hat u} = 0?

✅ Correct! ∇w=⟨1,4⟩\nabla w = \langle 1, 4\rangle: steepest descent is −∣∇w∣=−17-\lvert\nabla w\rvert = -\sqrt{17}, and ⟨−4,1⟩⊥⟨1,4⟩\langle -4, 1\rangle \perp \langle 1, 4\rangle.
❌ That is −∣∇w∣2-\lvert\nabla w\rvert^2. The rate along −∇w/∣∇w∣-\nabla w/\lvert\nabla w\rvert is −∣∇w∣-\lvert\nabla w\rvert.
❌ −(1+4)-(1 + 4) adds the components. The length of ⟨1,4⟩\langle 1, 4\rangle is 1+16\sqrt{1 + 16}.
❌ Check the minimum. The smallest value of ∣∇w∣cos⁡θ\lvert\nabla w\rvert\cos\theta occurs at θ=180°\theta = 180\degree.
❌ That is the gradient direction, where the rate is largest, +17+\sqrt{17}.
❌ That is −∇w/∣∇w∣-\nabla w/\lvert\nabla w\rvert, the direction of steepest descent.
❌ Changing one sign is not enough. ⟨1,4⟩⋅⟨1,−4⟩=1−16=−15≠0\langle 1, 4\rangle \cdot \langle 1, -4\rangle = 1 - 16 = -15 \ne 0; swap the entries and change one sign: ⟨−4,1⟩\langle -4, 1\rangle or ⟨4,−1⟩\langle 4, -1\rangle.
❌ Check the zero direction. You need u^⋅∇w=0\hat u \cdot \nabla w = 0.
Show solution

Gradient: wx=y2w_x = y^2, wy=2xyw_y = 2xy, so ∇w(2,1)=⟨1,4⟩\nabla w(2, 1) = \langle 1, 4\rangle and ∣∇w∣=17\lvert\nabla w\rvert = \sqrt{17}.

Most negative rate: ∣∇w∣cos⁡θ\lvert\nabla w\rvert\cos\theta is smallest at θ=180°\theta = 180\degree, u^=−117⟨1,4⟩\hat u = -\tfrac{1}{\sqrt{17}}\langle 1, 4\rangle:

dwds∣u^=−∣∇w∣=−17\left.\frac{dw}{ds}\right|_{\hat u} = -\lvert\nabla w\rvert = -\sqrt{17}

Zero rate: need θ=90°\theta = 90\degree, i.e. u^⊥⟨1,4⟩\hat u \perp \langle 1, 4\rangle. Swap the entries and change one sign: ⟨−4,1⟩\langle -4, 1\rangle, length 17\sqrt{17}.

117⟨1,4⟩⋅⟨−4,1⟩=117(−4+4)=0\tfrac{1}{\sqrt{17}}\langle 1, 4\rangle \cdot \langle -4, 1\rangle = \tfrac{1}{\sqrt{17}}(-4 + 4) = 0

The other answer is 117⟨4,−1⟩\tfrac{1}{\sqrt{17}}\langle 4, -1\rangle; both are tangent to the level curve xy2=2xy^2 = 2 at (2,1)(2, 1).

Problem 4 · From Two Directional Derivatives

Given: at a point PP, the rate of change of ww is 33 in the direction ı^\hat\imath and −4-4 in the direction ȷ^\hat\jmath — answer both parts.

Which value can NOT be a directional derivative of ww at PP?

Rate of change in the direction of ⟨1,1⟩\langle 1, 1\rangle?

✅ Correct! The two rates are the partials, so ∇w=⟨3,−4⟩\nabla w = \langle 3, -4\rangle; every rate lies in [−5,5][-5, 5], and along ⟨1,1⟩\langle 1, 1\rangle it is 3−42=−22\tfrac{3 - 4}{\sqrt2} = -\tfrac{\sqrt2}{2}.
❌ −5-5 is attained. It is −∣∇w∣-\lvert\nabla w\rvert, the rate along −∇w/∣∇w∣-\nabla w/\lvert\nabla w\rvert.
❌ Check the bound. ∣∇w∣cos⁡θ\lvert\nabla w\rvert\cos\theta takes every value between −∣∇w∣-\lvert\nabla w\rvert and ∣∇w∣\lvert\nabla w\rvert, and nothing outside.
❌ ⟨1,1⟩\langle 1, 1\rangle has length 2\sqrt2. Dotting with it unnormalised gives 2\sqrt2 times the rate.
❌ Watch the sign. The rate along ȷ^\hat\jmath is −4-4, so wy=−4w_y = -4, not 44.
❌ Check the dot product. Use ∇w=⟨3,−4⟩\nabla w = \langle 3, -4\rangle and u^=12⟨1,1⟩\hat u = \tfrac{1}{\sqrt2}\langle 1, 1\rangle.
Show solution

Recover the gradient: the rate along ı^\hat\imath is wxw_x and along ȷ^\hat\jmath is wyw_y, so ∇w(P)=⟨3,−4⟩\nabla w(P) = \langle 3, -4\rangle and ∣∇w∣=5\lvert\nabla w\rvert = 5.

Possible rates: dwds∣u^=5cos⁡θ\left.\dfrac{dw}{ds}\right|_{\hat u} = 5\cos\theta ranges over [−5,5][-5, 5]. So 00, −5-5 and 4.94.9 all occur, but 5.2>55.2 > 5 cannot.

Along ⟨1,1⟩\langle 1, 1\rangle: u^=12⟨1,1⟩\hat u = \tfrac{1}{\sqrt2}\langle 1, 1\rangle, and

dwds∣u^=⟨3,−4⟩⋅12⟨1,1⟩=3−42=−12=−22\left.\frac{dw}{ds}\right|_{\hat u} = \langle 3, -4\rangle \cdot \tfrac{1}{\sqrt2}\langle 1, 1\rangle = \frac{3 - 4}{\sqrt2} = -\frac{1}{\sqrt2} = -\frac{\sqrt2}{2}

Solved: 0 / 4