Functions of Several Variables: Limits, Directional Derivatives, Taylor’s Theorem, Extrema, Lagrange Multipliers and Multiple Integrals
2. Partial derivatives, directional derivatives, the gradient and the total derivative
The directional derivative of f at a in the direction of a unit vector u is D_u f(a) = limh→0 [f(a + hu) − f(a)]/h. When f is differentiable, D_u f = ∇f · u, where ∇f = (f_x, f_y, f_z) is the gradient. It follows that f increases fastest in the direction of ∇f, at rate ‖∇f‖, and not at all in directions perpendicular to it — so ∇f is normal to the level surfaces f = c. For f = x²y + yz³ at (1, 1, 1), ∇f = (2xy, x² + z³, 3yz²) = (2, 2, 3); in the direction (1, 2, 2)/3 the derivative is (2 + 4 + 6)/3 = 4.
f is differentiable at a if f(a + h) = f(a) + L(h) + o(‖h‖) for a linear map L — the total derivative, whose matrix is the Jacobian of partial derivatives (for a scalar f, the row ∇f). Differentiable ⇒ continuous and all directional derivatives exist. Continuous partial derivatives ⇒ differentiable (a sufficient condition). The converse chain fails at every step: f = xy/(x² + y²), f(0, 0) = 0 has f_x(0, 0) = f_y(0, 0) = 0, because f vanishes on both axes, yet it is not continuous at the origin, let alone differentiable.
| Statement | Implies | Does not imply |
|---|---|---|
| Partials continuous near a | differentiable at a | — |
| Differentiable at a | continuous; D_u f = ∇f · u for all u | continuous partials |
| Partials exist at a | nothing about other directions | continuity, differentiability |
The directional derivative of f at a in the direction of a unit vector u is D_u f(a) = limh→0 [f(a + hu) − f(a)]/h. When f is differentiable, D_u f = ∇f · u, where ∇f = (f_x, f_y, f_z) is…
3. Taylor’s theorem, the Hessian, and maxima, minima and saddle points
Taylor’s theorem in several variables, to second order: f(a + h) = f(a) + ∇f(a) · h + ½ hᵀ H(a) h + o(‖h‖²), where H = [∂²f/∂xᵢ∂xⱼ] is the Hessian, symmetric when the second partials are continuous. For e^x cos y about (0, 0): f = 1, ∇f = (1, 0), H = [[1, 0], [0, −1]], so f ≈ 1 + x + (x² − y²)/2.
At a critical point ∇f = 0 the quadratic term decides: H positive definite ⇒ strict local minimum; negative definite ⇒ strict local maximum; indefinite (eigenvalues of both signs) ⇒ saddle point; semidefinite ⇒ the test is silent. In two variables with r = f_xx, s = f_xy, t = f_yy: rt − s² > 0 and r > 0 is a minimum, rt − s² > 0 and r < 0 a maximum, rt − s² < 0 a saddle. For f = x³ + y³ − 3xy, ∇f = 0 gives (0, 0) and (1, 1); at (0, 0) rt − s² = −9, a saddle; at (1, 1) it is 36 − 9 = 27 with r = 6, a local minimum of value −1.
- H positive definiteStrict local minimum
- H negative definiteStrict local maximum
- H indefiniteSaddle point
- H semidefiniteThe test is silent
Taylor’s theorem in several variables, to second order: f(a + h) = f(a) + ∇f(a) · h + ½ hᵀ H(a) h + o(‖h‖²), where H = [∂²f/∂xᵢ∂xⱼ] is the Hessian, symmetric when the second partials are…
4. The method of Lagrange multipliers
To find extrema of f subject to g = c, look for points where the level curve of f is tangent to the constraint: ∇f = λ∇g, together with g = c. With several constraints, ∇f = Σλᵢ∇gᵢ. The multiplier λ is the rate at which the optimal value changes with c. Maximising xyz subject to x + y + z = 12 (positive variables): yz = xz = xy = λ forces x = y = z = 4 and a maximum of 64. Minimising x² + y² + z² subject to x + 2y + 2z = 6: (2x, 2y, 2z) = λ(1, 2, 2) gives (x, y, z) = (2/3, 4/3, 4/3) and the minimum 4, the squared distance 6²/(1 + 4 + 4) from the origin to the plane.
To find extrema of f subject to g = c, look for points where the level curve of f is tangent to the constraint: ∇f = λ∇g, together with g = c. With several constraints, ∇f = Σλᵢ∇gᵢ. The…
5. Double and triple integrals, the Jacobian, and applications
Fubini: for an integrable f on a region, the double integral equals either iterated integral, so the order may be changed — and changing it can make an impossible inner integral possible. ∫₀¹∫ₓ¹ ey² dy dx has no elementary inner integral; over the same triangle 0 ≤ x ≤ y ≤ 1 in the other order it is ∫₀¹ y ey² dy = (e − 1)/2 ≈ 0.859.
Change of variables: if (x, y) = T(u, v) is one-to-one and smooth, dx dy = |J| du dv with J = ∂(x, y)/∂(u, v). Polar: |J| = r; cylindrical: r; spherical: ρ² sin φ. The polar change evaluates ∫∫ℝ² e−(x²+y²) dx dy = ∫₀2π∫₀^∞ e−r² r dr dθ = π, so ∫_ℝ e−x² dx = √π — the normalising constant of the normal density.
- Area and volume: area = ∫∫_R dA; volume under z = f(x, y) = ∫∫_R f dA; volume of a solid = ∫∫∫ dV.
- Mass and centroid: with density ρ, mass = ∫∫ρ dA and x̄ = ∫∫xρ dA / mass.
- Probability: for a joint density f(x, y), P((X, Y) ∈ A) = ∫∫_A f. With f = x + y on the unit square, P(X ≤ 1/2) = ∫₀1/2(x + 1/2) dx = 1/8 + 1/4 = 3/8.
Fubini: for an integrable f on a region, the double integral equals either iterated integral, so the order may be changed — and changing it can make an impossible inner integral possible.…
Key takeaways
- A two-variable limit must be the same along every path; two paths that disagree disprove it, and a bound depending only on r proves it.
- D_u f = ∇f · u for a unit vector u; the maximum rate is ‖∇f‖ in the direction of ∇f.
- Continuous partials ⇒ differentiable ⇒ continuous; mere existence of partials implies neither (xy/(x² + y²)).
- At ∇f = 0: Hessian PD → minimum, ND → maximum, indefinite → saddle, singular → the test is silent.
- Lagrange: ∇f = λ∇g with g = c; the multinomial MLE p̂ᵢ = nᵢ/n is this method.
- dx dy = |J| du dv (polar r, spherical ρ² sin φ); the polar change gives ∫e−x² = √π.
Practice questions (24)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
For f(x, y) = xy/(x² + y²), the limit of f as (x, y) → (0, 0):
Show answer
Answer: C — does not exist
Along y = mx, f = m/(1 + m²): 0 along the x-axis (m = 0) and 1/2 along y = x. Two paths give different values, so there is no limit. Answering 0 checks only the axes, where f is identically zero.The directional derivative of f(x, y, z) = x²y + yz³ at (1, 1, 1) in the direction of the vector (1, 2, 2) is ____.
Numerical answer — type the value.
Show answer
Answer: 4
∇f = (2xy, x² + z³, 3yz²) = (2, 2, 3) at (1, 1, 1). The unit vector is (1, 2, 2)/3, so D_u f = (2 + 4 + 6)/3 = 4. Forgetting to normalise gives 12, three times too large.The maximum rate of change of f(x, y) = x² + y² at the point (3, 4) is ____.
Numerical answer — type the value.
Show answer
Answer: 10
The maximum directional derivative is ‖∇f‖ = ‖(2x, 2y)‖ = ‖(6, 8)‖ = 10, attained in the direction (3, 4)/5. Giving 5, the distance to the origin, confuses the gradient with the position vector.
Show the other 21 questions
Let f(x, y) = xy/(x² + y²) for (x, y) ≠ (0, 0) and f(0, 0) = 0. Which statements are true?
Show answer
Answer: A — f_x(0, 0) exists and equals 0; D — f_y(0, 0) exists and equals 0
(A), (D) f(h, 0) = 0 and f(0, h) = 0 for all h, so both difference quotients are 0. (B) Along y = x, f = 1/2 ≠ f(0, 0): not continuous. (C) Differentiability implies continuity, so it fails too. This is the standard counterexample: partial derivatives exist, yet the function is not even continuous.The value of f(x, y) = x³ + y³ − 3xy at its local minimum is ____.
Numerical answer — type the value.
Show answer
Answer: -1
f_x = 3x² − 3y = 0 and f_y = 3y² − 3x = 0 give (0, 0) and (1, 1). At (1, 1): r = 6x = 6, t = 6, s = −3, rt − s² = 27 > 0 with r > 0, a minimum, and f = 1 + 1 − 3 = −1. (0, 0) has rt − s² = −9 < 0 — a saddle, so the value 0 there is not the answer. Type the answer as -1.For f(x, y) = x⁴ + y⁴ at the origin, which statements are true?
Show answer
Answer: A — (0, 0) is a critical point; B — The second-derivative test (rt − s²) is inconclusive there; C — (0, 0) is a strict local minimum
∇f = (4x³, 4y³) = 0 at the origin. All second partials vanish there, so rt − s² = 0 and the test says nothing. But f > 0 = f(0, 0) for every other point, so the origin is a strict minimum, not a saddle. Compare x⁴ − y⁴, which has the same zero Hessian and is a saddle.The maximum value of xyz for positive x, y, z subject to x + y + z = 12 is ____.
Numerical answer — type the value.
Show answer
Answer: 64
∇(xyz) = λ∇(x + y + z) gives yz = xz = xy = λ, so x = y = z = 4 and xyz = 64. The AM–GM inequality confirms it: xyz ≤ ((x + y + z)/3)³ = 64. Answering 48 (= 4 × 12) multiplies the wrong quantities.The minimum value of x² + y² + z² subject to x + 2y + 2z = 6 is ____.
Numerical answer — type the value.
Show answer
Answer: 4
(2x, 2y, 2z) = λ(1, 2, 2) gives x = λ/2, y = z = λ; the constraint gives λ/2 + 4λ = 6, λ = 4/3, so (x, y, z) = (2/3, 4/3, 4/3) and x² + y² + z² = 4/9 + 16/9 + 16/9 = 4. Geometrically it is the squared distance 6²/9 = 4 to the plane; answering 2 gives the distance, not its square.The value of ∫∫ e−(x² + y²) dx dy over the unit disc x² + y² ≤ 1, correct to two decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 1.99
In polar coordinates: ∫₀2π∫₀¹ e−r² r dr dθ = 2π × [−e−r²/2]₀¹ = π(1 − e−1) = 3.1416 × 0.6321 = 1.986 → 1.99. Omitting the Jacobian r leaves ∫₀¹e−r² dr, which has no elementary antiderivative — the r is what makes the integral doable.The value of ∫₀¹ ∫ₓ¹ ey² dy dx, correct to two decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 0.86
The region is 0 ≤ x ≤ y ≤ 1. Reversing the order: ∫₀¹ ∫₀^y ey² dx dy = ∫₀¹ y ey² dy = (e − 1)/2 = 0.859 → 0.86. Keeping the given order stalls on ∫ey² dy, which is the signal to swap.Under x = r cos θ, y = r sin θ, the element dx dy becomes:
Show answer
Answer: A — r dr dθ
∂(x, y)/∂(r, θ) = det[[cos θ, −r sin θ], [sin θ, r cos θ]] = r cos²θ + r sin²θ = r. The factor r² sin φ belongs to spherical coordinates in three dimensions; dr dθ alone forgets the Jacobian entirely.(X, Y) has joint density f(x, y) = x + y on the unit square 0 < x, y < 1. P(X ≤ 1/2), correct to three decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 0.375
Integrate y out first: ∫₀¹(x + y) dy = x + 1/2, the marginal density of X. Then ∫₀1/2(x + 1/2) dx = 1/8 + 1/4 = 3/8 = 0.375. Answering 0.5 treats X as uniform; its marginal density x + 1/2 puts more mass near 1.The second-order Taylor polynomial of f(x, y) = eˣ cos y about (0, 0) is:
Show answer
Answer: A — 1 + x + (x² − y²)/2
f(0, 0) = 1, f_x = 1, f_y = −eˣ sin y = 0, f_xx = 1, f_xy = 0, f_yy = −1. So f ≈ 1 + x + ½(x² − y²). The "+y²" option gets the sign of f_yy wrong, and dropping the ½ forgets that the quadratic term is ½hᵀHh.For f(x, y) = x² + 4xy + y², which statements are true?
Show answer
Answer: A — (0, 0) is a critical point; B — The Hessian at (0, 0) is indefinite; C — (0, 0) is a saddle point
∇f = (2x + 4y, 4x + 2y) = 0 only at the origin. H = [[2, 4], [4, 2]] has determinant 4 − 16 = −12 < 0, eigenvalues 6 and −2: indefinite, so a saddle — along y = −x, f = −2x² < 0. Positive diagonal entries do not make a matrix positive definite; the cross term dominates.For f(x, y) = x²y, the partial derivative ∂f/∂x at (1, 2) is ____.
Numerical answer — type the value.
Show answer
Answer: 4
∂f/∂x = 2xy = 4 at (1, 2). The tempting 1 is ∂f/∂y = x². Substituting the answer back into the relation confirms it.For f(x, y) = 3x + 4y, the magnitude of the gradient is ____.
Numerical answer — type the value.
Show answer
Answer: 5
∇f = (3, 4), |∇f| = 5, the greatest rate of increase. The tempting 7 adds the components. Substituting the answer back into the relation confirms it.The double integral of x + y over the rectangle 0 ≤ x ≤ 2, 0 ≤ y ≤ 1 equals ____.
Numerical answer — type the value.
Show answer
Answer: 3
The inner integral gives x + 1/2, and ∫₀² (x + 1/2) dx = 2 + 1 = 3. The tempting 2 forgets the y term of the inner integral.The area of the region 0 ≤ x ≤ 2, 0 ≤ y ≤ x is ____.
Numerical answer — type the value.
Show answer
Answer: 2
∫₀² x dx = 2, a right triangle with legs 2 and 2. The tempting 4 is the bounding square. Substituting the answer back into the relation confirms it.At a smooth constrained extremum of f subject to g = c (with ∇g ≠ 0), the method of Lagrange multipliers requires
Show answer
Answer: A — ∇f = λ∇g for some scalar λ
At the extremum the level set of f is tangent to the constraint surface, so the gradients are parallel. The tempting ∇f = 0 is the unconstrained condition, which generally fails on the constraint.For f(x, y) = x² + xy + y², the determinant of the Hessian matrix is ____.
Numerical answer — type the value.
Show answer
Answer: 3
H = [[2, 1], [1, 2]], det = 3 > 0 with f_xx > 0, so the origin is a minimum. The tempting 4 ignores the mixed partial.The maximum value of x + y subject to x² + y² = 8 is ____.
Numerical answer — type the value.
Show answer
Answer: 4
Lagrange gives x = y, so 2x² = 8, x = y = 2 and x + y = 4 (equivalently √2 × √8). The tempting 2√2 = 2.83 is the radius.The value of ∫∫ xy over the triangle 0 < y < x < 1, correct to three decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 0.125
∫₀¹ x (∫₀ˣ y dy) dx = ∫₀¹ x³/2 dx = 1/8 = 0.125, half of the square’s 0.25 by symmetry. The tempting 0.25 integrates over the whole square.The minimum value of x² + y² subject to xy = 4 is ____.
Numerical answer — type the value.
Show answer
Answer: 8
x² + y² ≥ 2|xy| = 8, with equality at x = y = ±2. The tempting 4 is the product constraint itself. Substituting the answer back into the relation confirms it.The value of ∫∫ over ℝ² of e^(−(x² + 2y²)) dx dy, correct to three decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 2.221
It separates into √π × √(π/2) = π/√2 = 2.221. The tempting 3.142 = π ignores the factor 2 in front of y². Substituting the answer back into the relation confirms it.