Engineering Mathematics III

Chapter 8
Multivariable and Vector Calculus

Bachelor Program in Mechatronics Engineering
Engineering Mathematics III   •   Bachelor

Multivariable and Vector Calculus

Introduction

Engineering systems rarely depend on a single variable. The temperature of a motor may vary with position, the velocity of a robot end-effector may depend on time and configuration, and the magnetic field in an actuator may vary throughout space. Multivariable calculus provides the mathematical language for describing such systems. Vector calculus extends this language to fields, flux, circulation, work, and conservation laws.

This chapter develops partial differentiation, multiple integration, coordinate transformations, and the principal differential and integral operators for scalar and vector fields. It then connects local field behavior with global measurements through Green’s, Gauss’s, and Stokes’ theorems.

Learning Objectives

By the end of this chapter, a student should be able to:

  1. Evaluate double and triple integrals over regular and transformed regions.
  2. Use Jacobians in Cartesian, polar, cylindrical, and spherical coordinates.
  3. Compute gradients, directional derivatives, divergence, and curl.
  4. Interpret scalar and vector fields in engineering contexts.
  5. Evaluate line, surface, and volume integrals.
  6. Select and apply Green’s, Gauss’s, and Stokes’ theorems under their conditions of validity.
  7. Check orientation, units, smoothness, and boundary conditions in vector-calculus calculations.

1. Scalar and Vector Fields

A scalar field assigns a number to each point in a region. Examples include temperature T(x,y,z), pressure p(x,y,z), and electric potential. A vector field assigns a vector to each point:

𝐅(x,y,z) = P(x,y,z)𝐢 + Q(x,y,z)𝐣 + R(x,y,z)𝐤

Here P, Q, and R are scalar component functions, and 𝐢, 𝐣, and 𝐤 are Cartesian unit vectors. A velocity field, force field, fluid-flow field, or magnetic field can be represented in this way.

The domain is the set of points where the field is defined. A field is continuous when its components are continuous. Differentiability generally requires the relevant partial derivatives to exist and be continuous. These regularity assumptions are important when applying the integral theorems later in the chapter.

2. Partial Derivatives and the Gradient

For a scalar field f(x,y,z), the partial derivative with respect to x holds the other variables constant:

∂f/∂x = limh→0 [f(x+h,y,z) − f(x,y,z)]/h

The gradient is the vector of first partial derivatives:

∇f = grad f = (∂f/∂x)𝐢 + (∂f/∂y)𝐣 + (∂f/∂z)𝐤

The gradient points in the direction of greatest increase of f. Its magnitude is the maximum rate of increase per unit distance. A level surface f(x,y,z)=C has normal vector ∇f, provided ∇f≠0. Consequently, the tangent plane at (x0,y0,z0) is

∇f(x₀,y₀,z₀) · [(x−x₀)𝐢 + (y−y₀)𝐣 + (z−z₀)𝐤] = 0

For a surface defined by F(x,y,z)=0, the same gradient gives a normal direction.

Directional Derivatives

If 𝐮 is a unit vector, the directional derivative of f in direction 𝐮 is

D_𝐮 f = ∇f · 𝐮

If a direction is given by a nonzero vector 𝐯, first normalize it:

𝐮 = 𝐯/||𝐯||

The maximum directional derivative is ||∇f||, occurring in the gradient direction. The minimum is −||∇f||.

Example 1: Temperature Gradient

Suppose temperature in a laboratory is

T(x,y,z) = 20 + 2x² − xy + 3z

where coordinates are measured in metres and temperature in °C. Then

∇T = (4x−y)𝐢 − x𝐣 + 3𝐤

At (1,2,0), ∇T=2𝐢−𝐣+3𝐤. In the direction 𝐯=2𝐢+𝐣+2𝐤, the unit vector is 𝐮=(2𝐢+𝐣+2𝐤)/3. Therefore,

D_𝐮T = (2𝐢−𝐣+3𝐤)·(2𝐢+𝐣+2𝐤)/3 = 9/3 = 3 °C/m

The temperature increases at 3 °C per metre in that direction. The greatest local increase is √(2²+(-1)²+3²)=√14 °C/m.

3. Multiple Integrals

A double integral accumulates a scalar field over a planar region D:

∬D f(x,y) dA

If D is rectangular, a≤x≤b and c≤y≤d, then

∬D f dA = ∫ab ∫cd f(x,y) dy dx

For nonrectangular regions, the limits must describe the geometry accurately. If D is vertically simple, it can be written as a≤x≤b and g1(x)≤y≤g2(x). Then

∬D f dA = ∫ab ∫g₁(x)g₂(x) f(x,y) dy dx

A triple integral over a volume V is

∭V f(x,y,z) dV

It can represent mass when f=ρ, where ρ is mass density, or total charge when f is charge density. For constant density, mass is density multiplied by volume.

Example 2: Mass of a Rectangular Solid

A solid occupies 0≤x≤2, 0≤y≤1, and 0≤z≤3, with density ρ(x,y,z)=1+x kg/m³. Its mass is

m = ∫₀²∫₀¹∫₀³ (1+x) dz dy dx

Integrating first with respect to z and y gives

m = 3∫₀²(1+x)dx = 3[x+x²/2]₀² = 3(4)=12 kg

The units are consistent: kg/m³ multiplied by m³ gives kg.

4. Coordinate Transformations and Jacobians

A suitable coordinate system can simplify both the region and the integrand. In plane polar coordinates,

x = r cosθ, y = r sinθ, dA = r dr dθ

The factor r is the absolute value of the Jacobian determinant:

∂(x,y)/∂(r,θ) = | cosθ −r sinθ ; sinθ r cosθ | = r

Thus,

∬D f(x,y)dA = ∬D' f(r cosθ,r sinθ) r dr dθ

In cylindrical coordinates,

x=r cosθ, y=r sinθ, z=z, dV=r dr dθ dz

In spherical coordinates, with φ measured from the positive z-axis,

x=ρ sinφ cosθ, y=ρ sinφ sinθ, z=ρ cosφ

and

dV=ρ² sinφ dρ dφ dθ

The conventional ranges are ρ≥0, 0≤φ≤π, and 0≤θ<2π. Different texts sometimes interchange the names of the two angles, so definitions must always be stated.

Example 3: Volume of a Cylinder

For a cylinder of radius a and height h, cylindrical coordinates give

V=∫₀h∫₀2π∫₀a r dr dθ dz

Hence,

V = h(2π)(a²/2)=πa²h

This confirms that the Jacobian factor r is essential; omitting it produces an incorrect volume.

5. Line Integrals

Let a smooth curve C be parametrized by

𝐫(t)=x(t)𝐢+y(t)𝐣+z(t)𝐤, a≤t≤b

Its differential displacement is d𝐫=𝐫'(t)dt, and its arc-length element is

ds=||𝐫'(t)||dt

The scalar line integral is

∫C f ds = ∫ab f(𝐫(t))||𝐫'(t)||dt

It can represent the mass of a wire with linear density f. The work done by a force field 𝐅 along the curve is the vector line integral

W=∫C 𝐅·d𝐫 = ∫ab 𝐅(𝐫(t))·𝐫'(t)dt

Work has units of force × distance, or joules in SI units.

A field is conservative in a region if there is a potential function φ such that 𝐅=∇φ. For a conservative field,

∫C 𝐅·d𝐫 = φ(B)−φ(A)

and the integral is path-independent. In a simply connected region, a continuously differentiable field with zero curl is conservative; the topological condition is essential.

6. Divergence and Curl

For 𝐅=P𝐢+Q𝐣+R𝐤, the divergence is

∇·𝐅 = ∂P/∂x + ∂Q/∂y + ∂R/∂z

Divergence measures net outward flux per unit volume in the limiting sense. Positive divergence indicates a local source; negative divergence indicates a local sink.

The curl is

∇×𝐅 = (∂R/∂y−∂Q/∂z)𝐢 + (∂P/∂z−∂R/∂x)𝐣 + (∂Q/∂x−∂P/∂y)𝐤

Curl measures local rotational tendency. It is not simply the magnitude of rotation of a finite object; it is a local differential quantity whose direction follows the right-hand rule.

Two useful identities, when the required derivatives are continuous, are

∇×(∇f)=0

and

∇·(∇×𝐅)=0

The first explains why gradient fields are irrotational. The second reflects the fact that a curl has no net source.

7. Surface Integrals and Flux

For a parametrized surface 𝐫(u,v), the oriented vector area element is

d𝐒 = (𝐫u×𝐫v) du dv

Reversing the parameter order reverses orientation. The scalar surface integral is

∬S g dS = ∬D g(𝐫(u,v))||𝐫u×𝐫v|| du dv

The flux of a vector field through an oriented surface is

∬S 𝐅·𝐧 dS = ∬S 𝐅·d𝐒

where 𝐧 is the chosen unit normal. For a closed surface, the outward orientation is conventional unless otherwise stated.

For a graph z=g(x,y), an upward-oriented vector area element is

d𝐒 = (−gx𝐢−gy𝐣+𝐤)dA

The downward orientation is its negative.

8. Green’s Theorem

Let C be a positively oriented, piecewise smooth, simple closed curve bounding a region D. If P and Q have continuous first partial derivatives on an appropriate region containing D, Green’s theorem states

∮C P dx + Q dy = ∬D (∂Q/∂x − ∂P/∂y)dA

Positive orientation means counterclockwise traversal, with the region on the left. Green’s theorem converts a planar circulation integral into a double integral. A flux form is

∮C 𝐅·𝐧 ds = ∬D ∇·𝐅 dA

for 𝐅=P𝐢+Q𝐣, with outward normal on the boundary.

9. Gauss’s Divergence Theorem

Let V be a solid with a closed, piecewise smooth boundary S, oriented outward. If 𝐅 has continuous first partial derivatives on a region containing V, then

∯S 𝐅·𝐧 dS = ∭V ∇·𝐅 dV

The theorem equates total outward flux with the volume integral of divergence. It is particularly useful when a volume integral is easy but direct surface integration is difficult, or conversely.

Example 4: Flux Through a Sphere

Let 𝐅=x𝐢+y𝐣+z𝐤. Since

∇·𝐅=1+1+1=3

the outward flux through a sphere of radius a is

∯S 𝐅·𝐧 dS = ∭V 3 dV = 3(4πa³/3)=4πa³

The result has units of field magnitude multiplied by area when the coordinates carry physical units.

10. Stokes’ Theorem

Let S be an oriented, piecewise smooth surface with positively oriented boundary C. If 𝐅 has continuous first partial derivatives, then

∮C 𝐅·d𝐫 = ∬S (∇×𝐅)·𝐧 dS

The orientation obeys the right-hand rule: when the right thumb points in the direction of 𝐧, the curled fingers indicate positive traversal of C. Stokes’ theorem generalizes the circulation form of Green’s theorem to space.

The choice of spanning surface can simplify calculation. Any surface with the same boundary may be used if the field is sufficiently smooth throughout the intervening region and no singularity is crossed.

11. Integrated Engineering Interpretation

The main operators have complementary meanings:

Operator or integralInterpretationTypical engineering use
∇fDirection and rate of greatest scalar increaseTemperature, potential, optimization
∇·𝐅Local source or sink strengthFluid compression, charge density
∇×𝐅Local rotational tendencyVorticity, electromagnetic fields
∫C𝐅·d𝐫Accumulated tangential actionWork, circulation
∬S𝐅·𝐧dSTotal flux through a surfaceHeat, fluid, electric flux
∭V f dVAccumulation throughout volumeMass, charge, energy

In continuum mechanics, the divergence theorem is a mathematical expression of balance: the net flux leaving a control volume equals the integrated local source. In electromagnetics, Gauss-type laws relate field flux to enclosed charge, while Stokes-type laws relate circulation to currents or changing fields. In robotics and mechatronics, gradients support potential-field navigation and optimization, and Jacobians map differential joint motion to differential Cartesian motion.

12. Detailed Applied Case: Thermal Flux in a Mechatronic Housing

Background

Consider an illustrative aluminium housing occupying a rectangular region. Its steady temperature field is approximated by

T(x,y,z)=80−4x−2y−z

where x, y, and z are measured in metres and temperature is in °C. The thermal conductivity is constant at k=150 W/(m·K).

Problem

Determine the direction of greatest temperature decrease and the conductive heat-flux vector under Fourier’s law.

Analysis

The gradient is

∇T=−4𝐢−2𝐣−𝐤 °C/m

The direction of greatest decrease is opposite to the gradient, namely

−∇T/||∇T|| = (4𝐢+2𝐣+𝐤)/√21

Fourier’s law for an isotropic material is

𝐪=−k∇T

where 𝐪 is heat flux in W/m² and k is thermal conductivity in W/(m·K). Therefore,

𝐪=150(4𝐢+2𝐣+𝐤)=600𝐢+300𝐣+150𝐤 W/m²

The flux points from hotter toward colder regions, as expected. Its magnitude is 150√21≈687.4 W/m².

Outcome and Learning Points

The gradient supplies the local temperature-change information, while Fourier’s law converts it into heat flux. The negative sign is physically important: heat conducts down the temperature gradient. The calculation assumes steady conduction, constant isotropic conductivity, and validity of the continuum model. If conductivity varies with position or temperature, the more general expression remains 𝐪=−k(x,y,z,T)∇T, but divergence of heat flux must then be treated carefully in the energy balance.

13. Best Practices and Limitations

  1. Sketch the region before selecting integration limits.
  2. Include the Jacobian whenever coordinates are transformed.
  3. Normalize direction vectors before computing directional derivatives.
  4. Check whether a curve or surface is oriented consistently with the theorem.
  5. Distinguish open and closed surfaces; Gauss’s theorem requires a closed boundary.
  6. Verify that the field is defined and sufficiently smooth on the relevant region.
  7. Check units after every physical calculation.
  8. Use symmetry only when both the geometry and field respect that symmetry.
  9. Treat singular fields cautiously; a zero curl away from a singularity does not automatically imply global path independence.
  10. Use numerical software for complicated domains only after formulating the geometry and boundary conditions analytically.

Computer algebra and finite-element software can evaluate derivatives and integrals, but they do not reliably determine orientation, physical assumptions, or whether a theorem applies. Engineering judgment remains essential. In computational practice, mesh quality, coordinate singularities, numerical quadrature error, and boundary approximation can materially affect results.

Chapter Summary

Multivariable calculus extends differentiation and integration to functions of several variables. The gradient describes the direction and maximum rate of scalar increase, while directional derivatives quantify change in a specified unit direction. Double and triple integrals accumulate quantities over areas and volumes, and Jacobians correctly transform differential elements between coordinate systems.

Line integrals measure accumulated scalar quantities along curves or work done by vector fields. Surface integrals measure accumulation over surfaces, especially flux. Divergence describes local source strength and curl describes local rotational behavior. Green’s theorem relates planar circulation or flux to a double integral; Gauss’s theorem relates outward flux through a closed surface to volume divergence; Stokes’ theorem relates circulation around a boundary to curl through a spanning surface. Correct application depends on smoothness, geometry, orientation, and domain conditions.

Key Terms

Scalar field: A function assigning a scalar value to every point in a domain.

Vector field: A function assigning a vector to every point in a domain.

Partial derivative: A derivative with respect to one variable while other independent variables are held fixed.

Gradient: The vector of first partial derivatives of a scalar field.

Directional derivative: The rate of change of a scalar field in a specified unit direction.

Level surface: A surface on which a scalar field has constant value.

Jacobian: The determinant describing local scaling under a coordinate transformation.

Double integral: Accumulation of a function over a planar region.

Triple integral: Accumulation of a function over a three-dimensional volume.

Line integral: Integral evaluated along a curve.

Surface integral: Integral evaluated over a surface.

Flux: The component of a vector field passing through a surface, integrated over that surface.

Divergence: The scalar field measuring local net outward tendency of a vector field.

Curl: The vector field measuring local rotational tendency.

Conservative field: A vector field equal to the gradient of a potential function.

Green’s theorem: A planar theorem relating circulation or flux around a closed curve to an area integral.

Gauss’s divergence theorem: A theorem relating closed-surface flux to volume divergence.

Stokes’ theorem: A theorem relating boundary circulation to surface curl.

Orientation: The chosen direction of traversal or normal direction for a curve or surface.

Review Questions

Short Answer Questions

  1. What geometric information does the gradient of a scalar field provide?
  2. Why does a polar-coordinate double integral contain the factor r?
  3. Define divergence and describe its physical interpretation.
  4. What orientation is conventionally used for a positively oriented planar boundary?
  5. State the condition that makes a vector field conservative in a simply connected region when its components are continuously differentiable.

Long Answer Questions

  1. Derive the formula for the directional derivative from the chain rule and explain why the gradient gives the direction of maximum increase.
  2. Explain cylindrical and spherical coordinates, including their coordinate definitions, differential volume elements, and typical applications.
  3. Develop the concept of a line integral and distinguish scalar line integrals from work integrals.
  4. State and compare Green’s, Gauss’s, and Stokes’ theorems, including geometric conditions and orientation requirements.
  5. Explain how divergence and curl are used to interpret fluid flow and heat or electromagnetic transport.

Analytical / Application Questions

  1. A temperature field is T=100−x²−2y²−z °C. At (1,1,2), determine the direction of greatest temperature increase and the rate of increase per metre in the direction 𝐯=𝐢+2𝐣+2𝐤.
  2. Use the divergence theorem to calculate the outward flux of 𝐅=2x𝐢+3y𝐣+4z𝐤 through a sphere of radius a. Explain why symmetry is not required for the theorem.
  3. A force field acts on a robot end-effector along a parametrized trajectory. Describe the data and assumptions required to compute its work using a line integral, and explain how you would test whether the result is path-independent.

Multiple Choice Questions with Answers

Question 1

For a scalar field f, the gradient points in the direction of:

A. Maximum increase of f

B. Maximum decrease of f

C. Zero change of f

D. Minimum magnitude of f

Correct Answer: A. Maximum increase of f

Question 2

In polar coordinates, the area element is:

A. dr dθ

B. r dr dθ

C. r² dr dθ

D. sinθ dr dθ

Correct Answer: B. r dr dθ

Question 3

The divergence of 𝐅 = x𝐢 + 2y𝐣 + 3z𝐤 is:

A. 0

B. 3

C. 6

D. x+2y+3z

Correct Answer: B. 3

Question 4

The curl of a gradient field is, under the stated smoothness conditions:

A. The gradient magnitude

B. The divergence

C. Zero

D. One

Correct Answer: C. Zero

Question 5

Gauss’s divergence theorem relates:

A. A line integral to a point value

B. Closed-surface flux to a volume integral of divergence

C. A surface integral to a line integral of gradient

D. A volume integral to a directional derivative

Correct Answer: B. Closed-surface flux to a volume integral of divergence

Question 6

For a positively oriented planar closed curve, the bounded region is normally kept on the:

A. Right

B. Left

C. Outside only

D. Top

Correct Answer: B. Left

Question 7

If 𝐅 = ∇φ, the line integral from A to B equals:

A. φ(A)+φ(B)

B. φ(A)−φ(B)

C. φ(B)−φ(A)

D. Zero for every path

Correct Answer: C. φ(B)−φ(A)

Question 8

The spherical-coordinate volume element, with φ measured from the positive z-axis, is:

A. ρ dρ dφ dθ

B. ρ² sinφ dρ dφ dθ

C. ρ² cosφ dρ dφ dθ

D. sinφ dρ dφ dθ

Correct Answer: B. ρ² sinφ dρ dφ dθ

Question 9

The flux of a vector field through a surface uses which product?

A. 𝐅×𝐧

B. 𝐅·𝐧

C. ||𝐅||+||𝐧||

D. ∇𝐅

Correct Answer: B. 𝐅·𝐧

Question 10

For 𝐅 = x𝐢 + y𝐣 + z𝐤, the outward flux through a sphere of radius a is:

A. πa²

B. 3πa²

C. 4πa³

D. 4πa²

Correct Answer: C. 4πa³

Engineering Mathematics III
Chapter 8 of 15