4.4.8 · D4Multivariable Calculus

Exercises — Directional derivative — definition, formula

2,554 words12 min readBack to topic

Prerequisites you may want open: Gradient vector, Partial derivatives, Dot product and cosine of angle, Multivariable chain rule, Level curves and level sets.


L1 — Recognition

These check that you can identify the three ingredients: Gradient, Unit vector, dot Number (the "GUN" recipe).

Problem 1.1

Is a valid direction to plug straight into ? If not, produce the vector you should use.

Recall Solution 1.1

What we check: the formula demands a unit vector — a direction arrow of length exactly . So is not valid as-is. Normalise (divide by its length): Check:

Problem 1.2

For , write down (the gradient), then evaluate it at .

Recall Solution 1.2

What a gradient is: the list of partial derivatives — one slope per axis (see Gradient vector). So . At :

Problem 1.3

True or false: is a vector pointing in the direction of steepest ascent.

Recall Solution 1.3

False. is a scalar (a dot product of two vectors is a single number — see Dot product and cosine of angle). The vector pointing most uphill is itself, and the steepest slope is the number .


L2 — Application

Run the full recipe end-to-end.

Problem 2.1

at , in the direction toward the point .

Recall Solution 2.1

G — Gradient. , , so . U — Unit direction. Direction vector , length , so . N — Number (dot product).

Problem 2.2

at , direction making a angle with the positive -axis.

Recall Solution 2.2

Why an angle gives a unit vector for free: always has length , since . So . Gradient. , . At : , , : Dot product. The -rate is here, so only the horizontal lean of the walk matters.

Problem 2.3

at , direction along .

Recall Solution 2.3

Normalise: , so . Gradient: . At : . Dot product:


L3 — Analysis

Now choose directions and read the sign/size of the result.

Problem 3.1

For at : (a) find the direction of steepest ascent and its rate; (b) the steepest descent rate; (c) both directions giving .

Recall Solution 3.1

Gradient: , with . (a) Steepest ascent is along : , rate . (b) Steepest descent is opposite: rate .

(c) Zero rate happens when — walking along a level curve, where is constant. We need a direction perpendicular to . How to build a perpendicular systematically (the " turn" rule): two vectors are perpendicular exactly when their dot product is . If , try : So swap the two components and negate one of them — that always turns a vector by a right angle. This is why the rule works; it isn't magic, it's forced by the dot product being zero. With : perpendicular , length , so The second choice (edge case). A right-angle turn can go clockwise or counter-clockwise, so there are two opposite unit directions with zero slope. The other one is just (equivalently the rule ): Both check out: and ✓ Geometrically these are the two tangent directions to the level circle at — same line, opposite arrows.

The figure below shows all four vectors at once: the yellow gradient (ascent), the red opposite (descent), and the two green tangents (zero slope) sitting on the level circle.

Figure — Directional derivative — definition, formula

Reading the figure. The blue circle is the level curve . The yellow arrow points straight out of the circle — steepest ascent, rate . The red arrow is its exact reverse — steepest descent, rate . The two green arrows lie along the circle (tangent), from yellow; walking either way keeps you on the same contour, so the slope is . Notice green is perpendicular to yellow — that is the geometric meaning of "swap-and-negate."

Problem 3.2

at . Compute along and along . Interpret the signs.

Recall Solution 3.2

Gradient: . Along : — the surface rises this way. Along : rises faster. Interpretation: both are positive, but leans more toward (which points down-and-right), so it climbs harder. The sign tells you up/down; the size tells you how steep.

Problem 3.3

The angle between a walking direction and satisfies . If a certain gives , what angle does make with the gradient?

Recall Solution 3.3

Why cosine enters: the dot product satisfies , and (see Dot product and cosine of angle). So — a knob turned by the angle only. Here , so


L4 — Synthesis

Combine the directional derivative with other tools.

Problem 4.1

A hiker at on the surface wants the slope to be exactly half its steepest possible value. Find the angle between her heading and the gradient, and give one such unit direction.

Recall Solution 4.1

Gradient: , so . Half of steepest: we need . Since : Building a heading from the gradient (why the rotation works). Any unit vector in the plane can be written as a mix of two perpendicular unit vectors: pointing along the gradient, and pointing across it. If we take then is automatically a unit vector (since gives ), and it makes angle with because . That is exactly a rotation by — it's how the rotation matrix is built, one perpendicular axis at a time. Here , and using the swap-and-negate rule from Problem 3.1, . With : Numerically , , so Check the slope: ✓ (Choosing instead gives the other valid heading — rotating the other way.)

Problem 4.2

. At the point , find the directional derivative in the direction tangent to the level curve through that point (choose either tangent direction).

Recall Solution 4.2

Key link: the level curve through is the circle . The gradient is perpendicular to that circle. A tangent direction is therefore perpendicular to . Perp unit vector (swap-and-negate, then normalise): . Why zero makes sense: along a level curve is constant, so its rate of change is — no matter which of the two tangent directions you pick.

Problem 4.3

For , the directional derivative at some point along is , and along is . Find and then there.

Recall Solution 4.3

Idea: the directional derivative along an axis equals that partial derivative (dotting the gradient with picks out ). So , and , giving


L5 — Mastery

Edge cases, degeneracy, and proof.

Problem 5.1 (Zero gradient)

at the origin . Compute for an arbitrary unit direction . What does the result say geometrically?

Recall Solution 5.1

at the origin. Then for any unit : Geometry: the origin is the bottom of the bowl (a minimum). Every direction is momentarily flat — the surface is level to first order in all directions. This is the degenerate case where "steepest ascent" has no preferred direction because there is no ascent at all instantaneously.

Problem 5.2 (When the formula breaks)

Consider Show that the directional derivative at the origin exists for every direction, but the dot-product formula would give the wrong answer.

Recall Solution 5.2

Direct limit. Take unit , so . Along the ray : using . So exists for every direction. The partials. Put : . Put : . So , and the formula would predict But the true value is , which is nonzero for e.g. : there . Moral: the dot-product shortcut requires to be differentiable at the point (see Tangent planes and differentiability). Here is not, so the formula fails even though all directional derivatives exist.

Problem 5.3 (Prove the max)

Prove that among all unit vectors , is maximised when (assume ), and the maximum equals .

Recall Solution 5.3

Tool: the cosine form of the dot product (see Dot product and cosine of angle): since . Here is the angle between and . Why this settles it: is a fixed positive number, so is largest exactly when is largest. And with equality iff , i.e. points the same way as . That direction is , and then Similarly the minimum is , giving (steepest descent).