Calculus of Several Variables and Vector Calculus

Section 1 of the GATE Mathematics (MA) paper is calculus of several variables and then vector calculus, and it is examined differently from the engineering papers’ calculus: MA asks what the definitions imply and what they do not. A function of two variables can have both partial derivatives at a point and still be discontinuous there; it can have a directional derivative in every direction and still fail to be differentiable. So this chapter puts the chain of implications first — continuous partials ⇒ differentiable ⇒ continuous, with every converse broken by a named counterexample — and only then turns to the computations the paper also sets: Taylor’s theorem and the second-derivative test with its saddle points, Lagrange’s multipliers, double and triple integrals with the Jacobian of a change of variables, area, volume and surface area, and finally gradient, divergence and curl, line and surface integrals and the theorems of Green, Stokes and Gauss, each with the hypotheses that make it true. The field −y/(x² + y²), x/(x² + y²) is here on purpose: its curl is zero and its circulation round the unit circle is 2π, and that one example answers a whole family of “which of these is true” questions.

1. Continuity, partial, directional and total derivatives

Let f: ℝⁿ → ℝ and a ∈ ℝⁿ. The partial derivative ∂f/∂xᵢ(a) differentiates along one coordinate axis; the directional derivative Duf(a) = limt→0 [f(a + tu) − f(a)]/t does the same along a unit vector u. f is differentiable at a (has a total derivative) if there is a linear map L with f(a + h) = f(a) + L(h) + o(‖h‖). When it exists, L is given by the gradient, L(h) = ∇f(a)·h, and then Duf(a) = ∇f(a)·u for every u, so the greatest rate of increase is ‖∇f(a)‖, in the direction of ∇f(a).

The implications, and the counterexample that breaks each converse
ImplicationConverse fails for
partials exist near a and are continuous at a ⇒ f differentiable at af = (x² + y²) sin(1/√(x² + y²)), f(0) = 0: differentiable at 0, partials not continuous there
differentiable ⇒ continuous, and every Duf exists and equals ∇f·ug = x²y/(x⁴ + y²), g(0) = 0: every directional derivative exists at 0, yet g → 1/2 along y = x², so g is not even continuous
differentiable ⇒ both partials existf = xy/(x² + y²), f(0) = 0: fₓ(0) = fy(0) = 0, but f = m/(1 + m²) on y = mx, so f is discontinuous at 0
⚠️ The gradient formula needs differentiability
For g = x²y/(x⁴ + y²) both partials at the origin are 0, because g vanishes on both axes, so ∇g(0) = 0. But Dug(0) = u₁²/u₂ for u₂ ≠ 0, which is not ∇g(0)·u = 0. The formula Duf = ∇f·u is a consequence of differentiability, not of the partials existing; an option that computes a directional derivative from the gradient of a non-differentiable function is the trap.

Mixed partials commute — fxy = fyx — when both are continuous (Schwarz/Clairaut). Without continuity they can differ: f = xy(x² − y²)/(x² + y²), f(0) = 0, has fxy(0) = −1 and fyx(0) = 1.

2. Taylor’s theorem, maxima and minima, saddle points and Lagrange’s multipliers

For f of class C² near a, Taylor’s theorem gives f(a + h) = f(a) + ∇f(a)·h + ½ hᵀH(a + θh)h for some θ ∈ (0, 1), where H is the Hessian matrix of second partials. At a critical point (∇f(a) = 0) the sign of the quadratic form hᵀH(a)h decides: positive definite gives a strict local minimum, negative definite a strict local maximum, indefinite a saddle point, and semidefinite leaves the test inconclusive.

The two-variable test, with D = fxxfyy − fxy² at a critical point
ConditionConclusionExample at the origin
D > 0, fxx > 0local minimumx² + y²
D > 0, fxx < 0local maximum−x² − y²
D < 0saddle pointx² − y², xy
D = 0no conclusionx⁴ + y⁴ (minimum), x⁴ − y⁴ (saddle), x³ (neither)

Worked example. f = x³ + y³ − 3xy has ∇f = (3x² − 3y, 3y² − 3x) = 0 at (0, 0) and (1, 1). With fxx = 6x, fyy = 6y, fxy = −3: at (0, 0), D = −9 < 0, a saddle; at (1, 1), D = 36 − 9 = 27 > 0 and fxx = 6 > 0, a local minimum with value −1. It is not a global minimum, since f → −∞ along the negative x-axis.

🎯 Why Lagrange’s condition is ∇f = λ∇g
To extremise f on the level set g = c, where ∇g ≠ 0, move only along the surface: any tangent direction v satisfies ∇g·v = 0, and at an extremum Dvf = ∇f·v must vanish for all such v. So ∇f is orthogonal to the whole tangent space, which forces ∇f = λ∇g. The hypothesis ∇g ≠ 0 is essential: minimise f = x on g = y² − x³ = 0; the minimum is at (0, 0), where ∇g = 0 and no λ exists, since ∇f = (1, 0). With two constraints the condition is ∇f = λ∇g + μ∇h.

On a sphere the multiplier method has a one-line shortcut: the extreme values of a linear function c·x on ‖x‖ = r are ±r‖c‖, attained at x = ±rc/‖c‖. So x + 2y + 2z on x² + y² + z² = 9 ranges over [−9, 9].

3. Double and triple integrals, Jacobians and change of variables

For f continuous on a region that is simultaneously of type I and type II, Fubini’s theorem lets the order of integration be exchanged, and this is how an impossible inner integral becomes an easy one: ∫₀¹∫ₓ¹ ey² dy dx has no elementary inner integral, but the region is 0 ≤ x ≤ y ≤ 1, so it equals ∫₀¹∫₀ʸ ey² dx dy = ∫₀¹ y ey² dy = (e − 1)/2.

Change of variables. If T: (u, v) ↦ (x, y) is a C¹ bijection with non-vanishing Jacobian J = ∂(x, y)/∂(u, v), then ∬T(D) f dx dy = ∬D f(T(u, v)) |J| du dv. The absolute value matters; the Jacobian of the inverse map is 1/J.

The Jacobians used most
CoordinatesMap|J|
polarx = r cos θ, y = r sin θr
cylindricalx = r cos θ, y = r sin θ, z = zr
sphericalx = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φρ² sin φ
linear(x, y) = A(u, v)|det A|
  • Area of D is ∬D 1 dA; volume under z = f ≥ 0 over D is ∬D f dA, and the volume of a solid V is ∭V 1 dV (a ball of radius a: ∫₀2π∫₀π∫₀a ρ² sin φ dρ dφ dθ = 4πa³/3).
  • Surface area of the graph z = f(x, y) over D is ∬D √(1 + fₓ² + fy²) dA; for a parametrised surface r(u, v) it is ∬ ‖ru × rv‖ du dv. The paraboloid z = x² + y² below z = 2 has area ∫₀2π∫₀√2 √(1 + 4r²) r dr dθ = 2π(27 − 1)/12 = 13π/3.

4. Gradient, divergence, curl, line and surface integrals

For a scalar φ and a vector field F = (P, Q, R): ∇φ = (φₓ, φy, φz); div F = Pₓ + Qy + Rz; curl F = (Ry − Qz, Pz − Rₓ, Qₓ − Py). For C² fields, curl ∇φ = 0 and div curl F = 0, and div ∇φ = ∇²φ. A line integral ∫C F·dr = ∫ₐᵇ F(r(t))·r′(t) dt depends on the orientation of C but not on its parametrisation; a surface integral ∬S F·n dS is the flux of F through S.

On an open connected set, F is conservative (F = ∇φ, equivalently ∮F·dr = 0 round every closed curve, equivalently path independence) exactly when line integrals depend only on end points; then ∫C ∇φ·dr = φ(end) − φ(start). On a simply connected open set, curl F = 0 is also sufficient.

⚠️ Zero curl is not enough on a punctured plane
F = (−y/(x² + y²), x/(x² + y²)) on ℝ² ∖ {0} has Qₓ − Py = 0 everywhere, yet on the unit circle r = (cos t, sin t), F·r′ = sin²t + cos²t = 1 and ∮F·dr = 2π ≠ 0. So F is not conservative on the punctured plane; it is the gradient of the polar angle θ only on a slit plane, which is simply connected. The hole is what breaks “curl zero ⇒ gradient”.

5. The theorems of Green, Stokes and Gauss

Statements with their hypotheses
TheoremStatementHypotheses
Green∮C (P dx + Q dy) = ∬D (Qₓ − Py) dAC a positively oriented, piecewise smooth, simple closed curve bounding D; P, Q of class C¹ on an open set containing D
Stokes∮∂S F·dr = ∬S (curl F)·n dSS an oriented, piecewise smooth surface with boundary ∂S oriented by the right-hand rule; F of class C¹ near S
Gauss (divergence)∯∂V F·n dS = ∭V div F dVV a bounded solid whose boundary is a closed piecewise smooth surface with outward normal n; F of class C¹ on V
  • Area by Green. Taking (P, Q) = (−y/2, x/2) gives area(D) = ½∮C(x dy − y dx); for the ellipse x = a cos t, y = b sin t this is ½∫₀2π ab dt = πab.
  • Gauss in one line. F = (x, y, z) has div F = 3, so its outward flux through the sphere of radius a is 3 · (4/3)πa³ = 4πa³, which the direct computation F·n = a on the sphere, times area 4πa², confirms.
  • Stokes lets you pick the surface. Every surface with the same oriented boundary gives the same flux of curl F, so replace a hemisphere by the flat disc it caps.
⚠️ Green on a region with a hole
Green’s theorem needs P and Q to be C¹ on the whole of D. For the field of Section 4 and the unit disc, the right side would be ∬0 dA = 0 while the left side is 2π; there is no contradiction, because the field is undefined at the origin. For an annulus the boundary has two pieces, the outer counter-clockwise and the inner clockwise, and then the theorem holds.

Key takeaways

  • Continuous partials ⇒ differentiable ⇒ continuous with Duf = ∇f·u; each converse fails, and xy/(x² + y²) and x²y/(x⁴ + y²) are the counterexamples to keep ready.
  • At a critical point D = fxxfyy − fxy² decides: D > 0 is an extremum by the sign of fxx, D < 0 a saddle, D = 0 nothing.
  • Lagrange’s condition ∇f = λ∇g holds at a constrained extremum only where ∇g ≠ 0.
  • Change variables with |J|: r for polar and cylindrical, ρ² sin φ for spherical; reverse the order of integration when the inner integral has no primitive.
  • Green, Stokes and Gauss need C¹ fields on the whole region; curl F = 0 gives a potential only on a simply connected domain.

Practice questions (14)

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.

  1. Let f(x, y) = xy/(x² + y²) for (x, y) ≠ (0, 0) and f(0, 0) = 0. At the origin,

    1. both partial derivatives exist but f is not continuous
    2. f is continuous but neither partial derivative exists
    3. f is differentiable
    4. f is continuous and both partial derivatives exist
    Show answer

    Answer: A — both partial derivatives exist but f is not continuous

    f vanishes on both axes, so fₓ(0, 0) = lim [f(h, 0) − 0]/h = 0 and likewise fy(0, 0) = 0. On the line y = mx, f = m/(1 + m²), which depends on m (1/2 on y = x, 0 on y = 0), so the limit at the origin does not exist and f is discontinuous; a discontinuous function cannot be differentiable.
  2. Let g(x, y) = x²y/(x⁴ + y²) for (x, y) ≠ (0, 0) and g(0, 0) = 0. Which statements are true at the origin?

    1. the directional derivative Dug exists for every unit vector u
    2. g is continuous
    3. g is differentiable
    4. Dug = ∇g·u for every unit vector u
    Show answer

    Answer: A — the directional derivative D_{u}g exists for every unit vector u

    (1) True: g(tu)/t = u₁²u₂/(t²u₁⁴ + u₂²) → u₁²/u₂ if u₂ ≠ 0, and g(tu) = 0 if u₂ = 0. (2) False: on y = x², g = x⁴/(2x⁴) = 1/2 ≠ 0. (3) False: differentiability implies continuity, which fails. (4) False: ∇g(0) = (0, 0) because g vanishes on both axes, but Dug = u₁²/u₂ ≠ 0 for u = (1, 1)/√2.
  3. The directional derivative of f(x, y, z) = x²y + yz³ at the point (1, 2, 1) in the direction of the vector 2i − j + 2k is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 6

    ∇f = (2xy, x² + z³, 3yz²) = (4, 2, 6) at (1, 2, 1). The unit vector is (2, −1, 2)/3, since ‖(2, −1, 2)‖ = 3. Duf = (8 − 2 + 12)/3 = 18/3 = 6. Forgetting to normalise gives 18.
  4. For f(x, y) = x³ + y³ − 3xy, the critical points are

    1. (0, 0), a saddle point, and (1, 1), a local minimum
    2. (0, 0), a local maximum, and (1, 1), a local minimum
    3. (0, 0), a saddle point, and (1, 1), a local maximum
    4. (1, 1) only, a global minimum
    Show answer

    Answer: A — (0, 0), a saddle point, and (1, 1), a local minimum

    fₓ = 3x² − 3y = 0 and fy = 3y² − 3x = 0 give y = x², x = x⁴, so (0, 0) and (1, 1). With fxx = 6x, fyy = 6y, fxy = −3: D(0, 0) = −9 < 0, a saddle; D(1, 1) = 27 > 0 with fxx = 6 > 0, a local minimum. It is not global: f(x, 0) = x³ → −∞.
  5. The maximum value of x + 2y + 2z subject to x² + y² + z² = 9 is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 9

    Lagrange: (1, 2, 2) = 2λ(x, y, z), so (x, y, z) is parallel to (1, 2, 2), of length 3; on the sphere of radius 3, (x, y, z) = (1, 2, 2) and the value is 1 + 4 + 4 = 9. Equivalently, Cauchy–Schwarz gives |c·x| ≤ ‖c‖‖x‖ = 3 × 3. The minimum is −9.
  6. The value of ∫₀¹ ∫ₓ¹ ey² dy dx, correct to two decimal places, is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 0.86

    The inner integral has no elementary primitive, so reverse the order over 0 ≤ x ≤ y ≤ 1: ∫₀¹ (∫₀ʸ dx) ey² dy = ∫₀¹ y ey² dy = [ey²/2]₀¹ = (e − 1)/2 = 1.71828/2 = 0.859, which is 0.86.
  7. Under spherical coordinates x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ, the volume element dx dy dz equals

    1. ρ² sin φ dρ dφ dθ
    2. ρ sin φ dρ dφ dθ
    3. ρ² cos φ dρ dφ dθ
    4. ρ² dρ dφ dθ
    Show answer

    Answer: A — ρ² sin φ dρ dφ dθ

    The Jacobian determinant ∂(x, y, z)/∂(ρ, φ, θ) equals ρ² sin φ, which is non-negative for 0 ≤ φ ≤ π. Integrating it over 0 ≤ ρ ≤ a, 0 ≤ φ ≤ π, 0 ≤ θ ≤ 2π gives (a³/3)(2)(2π) = 4πa³/3, the volume of the ball, a quick check that rules out the other factors.
  8. The surface area of the part of the paraboloid z = x² + y² that lies below the plane z = 2 is kπ. The value of k, correct to two decimal places, is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 4.33

    Area = ∬ √(1 + 4x² + 4y²) dA over x² + y² ≤ 2 = ∫₀2π ∫₀√2 √(1 + 4r²) r dr dθ. With u = 1 + 4r², r dr = du/8 and u runs from 1 to 9: 2π · (1/8)(2/3)(27 − 1) = 2π · 26/12 = 13π/3. So k = 13/3 = 4.33.
  9. Let F = (−y/(x² + y²), x/(x² + y²)) on ℝ² ∖ {(0, 0)}. Which statement is correct?

    1. curl F = 0 but F is not conservative on ℝ² ∖ {(0, 0)}
    2. curl F = 0, so F is conservative on ℝ² ∖ {(0, 0)}
    3. curl F ≠ 0, which is why the circulation is non-zero
    4. the circulation of F round the unit circle is 0
    Show answer

    Answer: A — curl F = 0 but F is not conservative on ℝ² ∖ {(0, 0)}

    Qₓ = (y² − x²)/(x² + y²)² = Py, so the (scalar) curl vanishes. On r = (cos t, sin t), F·r′ = sin²t + cos²t = 1, so ∮F·dr = 2π ≠ 0, and a conservative field has zero circulation. Curl zero implies a potential only on a simply connected domain; the punctured plane is not one.
  10. Let C be the unit circle x² + y² = 1 traversed counter-clockwise. Then ∮C (−y³ dx + x³ dy) = kπ, where k = ____.

    Numerical answer — type the value.

    Show answer

    Answer: 1.5

    By Green, the integral is ∬ (Qₓ − Py) dA = ∬ (3x² + 3y²) dA = 3∫₀2π∫₀¹ r² · r dr dθ = 3 · 2π · 1/4 = 3π/2, so k = 1.5. The hypotheses hold: P = −y³, Q = x³ are polynomials.
  11. The outward flux of F = (x³, y³, z³) through the unit sphere x² + y² + z² = 1 is kπ, where k = ____.

    Numerical answer — type the value.

    Show answer

    Answer: 2.4

    div F = 3(x² + y² + z²) = 3ρ². By Gauss, flux = ∭ 3ρ² · ρ² sin φ dρ dφ dθ = 3 · (1/5) · 2 · 2π = 12π/5, so k = 2.4. Using the volume 4π/3 with div F treated as 3 gives the wrong 4.
  12. Let F = (y, z, x) and let C be the circle x² + y² = 1, z = 0, oriented counter-clockwise when viewed from above. Then ∮C F·dr = kπ, where k = ____.

    Numerical answer — type the value.

    Show answer

    Answer: -1

    curl F = (Ry − Qz, Pz − Rₓ, Qₓ − Py) = (0 − 1, 0 − 1, 0 − 1) = (−1, −1, −1). By Stokes over the unit disc with n = k, the integral is (−1) × π = −π, so k = −1. Directly: r = (cos t, sin t, 0), F·r′ = sin t · (−sin t) + 0 + cos t · 0 = −sin²t, integrating to −π. Typed, the answer is -1.
  13. For a scalar field φ and a vector field F, both of class C² on ℝ³, which identities hold everywhere?

    1. curl(∇φ) = 0
    2. div(curl F) = 0
    3. curl(curl F) = 0
    4. div(∇φ) = ∇²φ
    Show answer

    Answer: A — curl(∇φ) = 0; B — div(curl F) = 0; D — div(∇φ) = ∇²φ

    (1) and (2) hold because mixed second partials of C² functions commute. (4) is the definition of the Laplacian. (3) is false: curl curl F = ∇(div F) − ∇²F; for F = (0, 0, x²), curl F = (0, −2x, 0) and curl curl F = (0, 0, −2) ≠ 0.
  14. Using area = ½∮(x dy − y dx), the area enclosed by the ellipse x²/9 + y²/4 = 1 is

    1. 6π
    2. 12π
    3. 36π
    4. 3π
    Show answer

    Answer: A — 6π

    With x = 3 cos t, y = 2 sin t, x dy − y dx = (6 cos²t + 6 sin²t) dt = 6 dt, so the area is ½ · 6 · 2π = 6π = πab with a = 3, b = 2. 12π forgets the factor ½; 36π multiplies a² by b².