MATH U101 · Multivariable Calculus · Module 5
Directional Derivatives, the Gradient & Tangent Planes
Thomas §14.5–14.6*, lectures L10–L11. Module 4's partial derivatives, put to work: slopes in every direction, the steepest direction, and the plane that touches a surface. Error estimation (§14.6) is excluded by the handout.
Gradient & directional derivatives (8.3 min, T6 Q8–Q12) · Tangent planes, normal lines & intersections (6.9 min, T7 Q1–Q3). Each one is sound-on and pauses for your next move.
This block is on every recent mid-sem. 2023: Q2, 15 of 60 marks (find u from a given rate; tangent plane parallel to the xy-plane). 2024: Q3, 20 of 60 (directional derivative from the definition at a bad point; unit normal to a level surface). 2025: Q1, 18 of 50 (continuity, partials and directional derivatives of a piecewise function). This year's mid-sem (5 Oct, open book) covers Modules 1–6.
The computing is Module 4's partial derivatives plus one dot product. The new ideas, the gradient and the tangent plane, are new to everyone in the hall. First time? Start with the Module 5 lesson (slow build, direction widget); this page is the compressed map for revision.
1 · The directional derivative and the gradient §14.5
Intuition: the slope of the surface when you walk from (a, b) in the direction of a unit vector u = (u1, u2). Definition:
Shortcut, valid when f is differentiable at the point (e.g. continuous partials; Module 4 §4):
- Normalise first: "in the direction of v" means u = v/|v|. Dotting with an unnormalised v multiplies the answer by |v|.
- Three variables work the same way: ∇f = (fx, fy, fz) and u has three components.
- Axis directions give back the partials: Dif = fx, Djf = fy.
2 · Steepest, flattest, and working backwards §14.5
Since |u| = 1, Duf = |∇f| cos φ, where φ is the angle from ∇f to u.
| Want | Direction | Rate |
|---|---|---|
| Fastest increase | u = ∇f/|∇f| | +|∇f| |
| Fastest decrease | u = −∇f/|∇f| | −|∇f| |
| No change | the two unit vectors ⟂ ∇f: for ∇f = (p, q), u = ±(−q, p)/|∇f| | 0 |
| A given rate k | solve fxu1 + fyu2 = k with u12 + u22 = 1 | 2 answers if |k| < |∇f|, 1 if equal, none if larger |
Worked example 12023 mid-sem, Q2(a) [8 marks]: find u from the rate
As set: "If the directional derivative of the function f(x, y) = 2xy − 3x2 at the point (5, 5) along the vector u = u1i + u2j is −4, then find u."
- Gradient. fx = 2y − 6x and fy = 2x, so ∇f(5, 5) = (10 − 30, 10) = (−20, 10). Since |∇f| = √500 ≈ 22.4 > 4, expect two answers.
- Two equations. Rate: −20u1 + 10u2 = −4, so u2 = 2u1 − 2/5. Unit length: u12 + u22 = 1.
- Substitute and clear fractions. u12 + (2u1 − 2/5)2 = 1 expands to 5u12 − (8/5)u1 + 4/25 = 1. Multiply by 25: 125u12 − 40u1 − 21 = 0.
- Quadratic formula. u1 = (40 ± √(1600 + 10500))/250 = (40 ± 110)/250, so u1 = 3/5 or u1 = −7/25.
- Back-substitute: u2 = 6/5 − 2/5 = 4/5, or u2 = −14/25 − 10/25 = −24/25. Answer: u = (3/5)i + (4/5)j or u = −(7/25)i − (24/25)j.
- Check (the open-book minute that saves marks): −20(3/5) + 10(4/5) = −12 + 8 = −4 ✓ and −20(−7/25) + 10(−24/25) = (140 − 240)/25 = −4 ✓. Both have length 1 ✓.
The handwritten answer on this paper wrote "(3, 4)" and "(−7, −24)": right directions, but not unit vectors. A directional derivative is only defined along a unit vector, so give (3/5, 4/5) and (−7/25, −24/25).
3 · The gradient is normal to level curves and surfaces §14.5
Along a level curve f doesn't change, so the rate along it is 0. That means the curve's direction is ⟂ ∇f. The same holds in 3D: ∇F is perpendicular to the level surface F(x, y, z) = c, and it points towards larger F.
4 · At a special point of a piecewise function: use the definition
For f defined by a formula except at one point P (given a separate value there), differentiability at P is exactly what's in doubt, so ∇f · u is off-limits. The routine:
- Shift if needed. If the special point isn't the origin, set X = x − a, Y = y − b and rewrite (complete the squares).
- Substitute the walk (hu1, hu2) and simplify, cancelling powers of h. Use u12 + u22 = 1.
- Subtract the special value, divide by h, let h → 0. Split cases (e.g. u2 = 0 vs u2 ≠ 0).
- State for which u the limit exists, and its value.
Two outcomes the papers use:
- Exists in every direction, yet f is discontinuous. 2024 Q3(a): x2y/(x6 + y2) gives Duf(0, 0) = u12/u2 (for u2 ≠ 0). But along y = x2, f = x4/(x6 + x4) = 1/(x2 + 1) → 1 ≠ 0. Directional derivatives only test straight lines; the two-path test with a curve catches the discontinuity.
- Exists only in some directions. 2025 Q1(c): after the shift, (X2 − Y2)/(X2 + Y2). The quotient is (u12 − u22)/h, which has a limit only when u12 = u22 (worked example 2).
- Diagnostic: if the definition's answer differs from ∇f · u (computed from the partials at P), then f is not differentiable at P.
Worked example 22025 mid-sem, Q1 [6 + 4 + 8 marks]: continuity, partials and directional derivatives at a special point
As set: "Consider the function f(x, y) = (x2 − y2 − 2x + 2y)/(x2 + y2 − 2x − 2y + 2) if (x, y) ≠ (1, 1), and 0 if (x, y) = (1, 1). (a) Determine whether f is continuous at the point (1, 1). (b) Determine whether the partial derivatives fx(1, 1) and fy(1, 1) exist. (c) Find all unit vectors u for which the directional derivative Duf(1, 1) = 0."
- Shift to the special point. Complete the squares: x2 − 2x = (x − 1)2 − 1 and y2 − 2y = (y − 1)2 − 1. With X = x − 1, Y = y − 1, the numerator is (X2 − 1) − (Y2 − 1) = X2 − Y2, and the denominator is (X2 − 1) + (Y2 − 1) + 2 = X2 + Y2. So f = (X2 − Y2)/(X2 + Y2), with value 0 at X = Y = 0.
- (a) Two paths. Along Y = 0: f = X2/X2 = 1. Along X = 0: f = −1. Different limits, so the limit at (1, 1) does not exist and f is not continuous at (1, 1).
- (b) Partials by definition. f(1 + h, 1) = h2/h2 = 1, so the quotient is (1 − 0)/h = 1/h, which is unbounded: fx(1, 1) does not exist. Likewise f(1, 1 + h) = −1 gives −1/h: fy(1, 1) does not exist.
- (c) The walk. f(1 + hu1, 1 + hu2) = h2(u12 − u22)/h2(u12 + u22) = u12 − u22, using u12 + u22 = 1. The quotient is (u12 − u22)/h.
- When does the limit exist? If u12 ≠ u22 it blows up, so Duf doesn't exist. If u12 = u22, the quotient is 0 for every h, so Duf(1, 1) = 0.
- Unit vectors. u12 = u22 and u12 + u22 = 1 give u12 = u22 = ½. Answer: u = (±1/√2, ±1/√2), all four sign choices. In every other direction the directional derivative doesn't exist, so it can't equal 0.
Worth writing in the answer: along the diagonals the function is constantly 0 (since X2 = Y2 there), which is why those four directions are flat. The paper says "Answers without proper reasoning will not be awarded marks", so state each case.
5 · Tangent planes and normal lines §14.6
For a level surface F(x, y, z) = c at P = (x0, y0, z0) on the surface (check this first), the gradient ∇F(P) is the normal:
- Graph z = f(x, y): use F = f − z, which gives z − z0 = fx(x − x0) + fy(y − y0).
- Plane parallel to the xy-plane: normal ∥ k, so Fx = Fy = 0 (and Fz ≠ 0). Parallel to the xz-plane: Fx = Fz = 0. Parallel to the yz-plane: Fy = Fz = 0. Then solve those equations together with the surface equation.
- Unit normal: ±∇F/|∇F|, both signs. 2024 Q3(b): F = xyz2 − 4 at (−1, −1, 2) has ∇F = (yz2, xz2, 2xyz) = (−4, −4, 4). So u = ±(−1, −1, 1)/√3, and the directional derivative along it is ±|∇F| = ±4√3 (along the gradient's own direction, the rate is the maximum).
Worked example 32023 mid-sem, Q2(b) [7 marks]: tangent plane parallel to the xy-plane
As set: "Find the point(s) on the surface (x − y)2 + y2 + (y + z)2 = 1, where the tangent plane is parallel to the xy-plane."
- Set up. F = (x − y)2 + y2 + (y + z)2. Parallel to the xy-plane means normal ∥ k: we need Fx = 0 and Fy = 0.
- Partials (chain rule on each square): Fx = 2(x − y), Fy = −2(x − y) + 2y + 2(y + z), Fz = 2(y + z).
- Solve. Fx = 0 gives x = y. Then Fy = 0 + 2y + 2(y + z) = 4y + 2z = 0, so z = −2y.
- Back into the surface. 0 + y2 + (y − 2y)2 = 2y2 = 1, so y = ±1/√2.
- Points: (1/√2, 1/√2, −√2) and (−1/√2, −1/√2, √2). Check Fz ≠ 0: Fz = 2(y + z) = −2y = ∓√2 ≠ 0 ✓, so the normal is a genuine vertical vector at both points.
6 · The tangent line to a curve of intersection §14.6
Two surfaces F(x, y, z) = c1 and G(x, y, z) = c2 usually meet in a curve. At a point P on both, the curve lies inside each surface, so its tangent vector lies in both tangent planes. That makes it perpendicular to both normals, ∇F(P) and ∇G(P). The vector perpendicular to two given vectors is their cross product:
Written out, with the determinant layout that keeps the signs straight (note the minus on the middle term):
| i | j | k | |
|---|---|---|---|
| ∇F | Fx | Fy | Fz |
| ∇G | Gx | Gy | Gz |
- 1 · Check the point is on both surfaces: substitute it into each equation.
- 2 · Both gradients at the point: write each surface as F = c; a plane such as y = 1 is G = y, with ∇G = (0, 1, 0).
- 3 · The cross product, component by component, using the layout above.
- 4 · The parametric line x = x0 + v1t, y = y0 + v2t, z = z0 + v3t.
- 5 · Simplify the direction by scaling: any nonzero multiple of v gives the same line. Check v · ∇F = v · ∇G = 0.
Worked example 4Sphere meets plane: the tangent line at (1, 2, −1)
Find parametric equations for the line tangent to the curve of intersection of x2 + y2 + z2 = 6 and x + y + z = 2 at (1, 2, −1).
- On both? 1 + 4 + 1 = 6 ✓ and 1 + 2 − 1 = 2 ✓.
- Gradients. F = x2 + y2 + z2: ∇F = (2x, 2y, 2z) = (2, 4, −2). G = x + y + z: ∇G = (1, 1, 1).
- Cross product. i: 4·1 − (−2)·1 = 6. j: −(2·1 − (−2)·1) = −4. k: 2·1 − 4·1 = −2. So v = (6, −4, −2).
- Scale. Divide by 2: direction (3, −2, −1). Line: x = 1 + 3t, y = 2 − 2t, z = −1 − t.
- Check. (3, −2, −1)·(2, 4, −2) = 6 − 8 + 2 = 0 ✓ and (3, −2, −1)·(1, 1, 1) = 0 ✓: perpendicular to both normals.
Tutorial 7 Q2–Q3 are this exact routine, solved on the tutorial companion: Q2 (a cylinder and a paraboloid meet in a horizontal circle, so the tangent comes out horizontal) and Q3 (the plane y = 1, whose gradient (0, 1, 0) has two zero components; still just cross it).
1) Using one gradient as the direction. ∇F alone gives the normal line of one surface, not the curve's tangent. 2) The middle sign. The j component is −(FxGz − FzGx); check with the two dot products. 3) Zero components. A gradient like (0, 1, 0) is fine; the cross product still works. 4) A zero cross product means the gradients are parallel: the surfaces touch there and this method gives no line. 5) Skipping the on-both check.
7 · Linearization and total differential §14.6*
L(x, y) = f(a, b) + fx(a, b)(x − a) + fy(a, b)(y − b) is the tangent plane used to approximate values. The total differential is df = fx dx + fy dy. Example: f = x2 + 2y2 at (1, 1) gives L(1.1, 0.9) = 3 + 0.2 − 0.4 = 2.8 (true value 2.83). Error estimation is excluded by the handout.
1) Not normalising the direction vector, or reporting a direction like (3, 4) when a unit vector is asked for. 2) Using ∇f · u at a special point of a piecewise function. That shortcut needs differentiability; use the limit definition. 3) Stopping at one answer when solving for u: a line meets the unit circle twice. 4) "Every directional derivative exists, so f is continuous" is false (2024 Q3a); test a curved path like y = x2. 5) Tangent plane at a point not on the surface: substitute the point into the equation first. 6) Graph surfaces: forgetting the −1 from F = f − z, which flips the plane's z-term. 7) Unit normal with one sign only: say ±.
Your minimal prerequisite kit for this module
- Unit vectors: v/|v|, and |(a, b)| = √(a2 + b2).
- Dot product, both forms: a1b1 + a2b2 = |a||b| cos φ; perpendicular exactly when it is 0.
- Solving a line with a circle: substitute, expand a square, quadratic formula (worked example 1).
- Plane through a point with a given normal (A, B, C): A(x − x0) + B(y − y0) + C(z − z0) = 0.
- Module 4 partials (fast and accurate) and Module 3's path test for limits.
- Completing the square, to shift a special point to the origin (worked example 2).
- Cross product of two 3-vectors by the i/j/k determinant, with the minus on the middle term (section 6).
What to practise
Exercise ranges are approximate for the 15th edition, so check against your copy. Prefer odd numbers (answers in the back).
| Skill | Where | How many |
|---|---|---|
| Gradients; directional derivative towards a given vector (normalise!) | Thomas §14.5 exercises ~1–30 | 6–8 odd |
| Directions of fastest increase/decrease and zero change | §14.5 exercises ~31–38 | 3–4 odd |
| Tangent planes and normal lines to level surfaces and graphs | §14.6 exercises ~1–18 | 5–6 odd |
| Tangent line to a curve of intersection (∇F × ∇G) | §14.6 exercises on curves of intersection (check your copy) · Tutorial 7 Q2, Q3 | 3–4 |
| Linearization and total differential | §14.6 linearization exercises (skip error estimates) | 2–3 |
| Past mid-sem questions on this block | 2023 Q2 · 2024 Q3 · 2025 Q1 | all, timed |