Engineering Mathematics II

Chapter 4
Vector Calculus and Field Theory

Bachelor Program in Mechatronics Engineering
Engineering Mathematics II   •   Bachelor

Vector Calculus and Field Theory

Introduction

Vector calculus extends ordinary calculus to quantities that vary throughout space. This makes it essential in mechatronics engineering, where position, velocity, force, fluid velocity, electric field, magnetic field, heat flux, and energy flow are often spatially distributed. A robot end-effector moves along a path; air flows around a mechanism; an electric field acts throughout a sensor; and heat crosses the surface of an actuator. These are naturally described by scalar and vector fields.

This chapter develops vector fields, line and surface integrals, divergence, curl, potentials, and the integral theorems of Green, Gauss, and Stokes. The central theme is the relationship between local differential properties and global integral quantities.

Learning Objectives

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

  1. Distinguish scalar fields, vector fields, and coordinate representations.
  2. Calculate line, surface, and volume integrals and interpret their physical meaning.
  3. Determine divergence and curl and relate them to sources, sinks, and circulation.
  4. Test whether a vector field is conservative and construct a potential function when possible.
  5. Apply Green’s, Gauss’s, and Stokes’ theorems with correct orientation and regularity conditions.
  6. Model motion, fluid flow, electromagnetism, and energy transfer using vector calculus.
  7. Select an efficient theorem or coordinate system for an engineering calculation.

1. Fields in Engineering

A scalar field assigns one scalar value to each point in a region. Examples include temperature T(x,y,z), pressure p(x,y,z), and electric potential V(x,y,z). A vector field assigns a vector to every 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, while 𝐢, 𝐣, and 𝐤 are unit vectors in the Cartesian x-, y-, and z-directions. A velocity field, for example, has units of m/s; a force field has units of N.

The gradient converts a scalar field into a vector field:

∇φ = ∂φ/∂x 𝐢 + ∂φ/∂y 𝐣 + ∂φ/∂z 𝐤

The gradient points in the direction of greatest increase of φ, and its magnitude is the maximum rate of increase per unit distance. A level surface φ(x,y,z)=C is everywhere perpendicular to ∇φ. For temperature, ∇T points toward increasing temperature.

The differential displacement is

d𝐫 = dx 𝐢 + dy 𝐣 + dz 𝐤

The operator ∇, called del or nabla, is formally

∇ = 𝐢 ∂/∂x + 𝐣 ∂/∂y + 𝐤 ∂/∂z

Its use must be interpreted according to the operation that follows it.

2. Line Integrals and Work

Let a smooth curve C be parametrized by 𝐫(t), where a≤t≤b. A scalar line integral is

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

It accumulates a scalar quantity along length. For example, if ρ is a wire’s linear density in kg/m, then ∫C ρ ds is its mass.

A vector line integral is

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

If 𝐅 is a force in newtons and d𝐫 is measured in metres, the integral has units of joules and represents work. Reversing the orientation of C changes the sign of the integral.

Worked Example 1: Work Along a Straight Path

Let

𝐅(x,y) = (2x𝐢 + y𝐣) N

and let a mechanism move from (0,0) to (2,1). Parameterize the straight path by 𝐫(t)=(2t,t), 0≤t≤1. Then 𝐫′(t)=(2,1), and

𝐅(𝐫(t)) = 4t𝐢 + t𝐣

Therefore,

W = ∫01 (4t, t) · (2,1) dt
= ∫01 9t dt
= 9/2 J

The work is 4.5 J. This result applies to the specified path; a different path may produce a different value unless the field is conservative.

3. Conservative Fields and Potential Functions

A vector field is conservative in a region if there is a scalar potential φ such that

𝐅 = ∇φ

Some engineering conventions define a force as 𝐅=-∇U, where U is potential energy. The sign depends on the physical definition of the potential.

If 𝐅=∇φ, then the fundamental theorem for line integrals gives

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

Thus the integral depends only on endpoints. Equivalently, every closed-loop integral is zero:

∮C 𝐅 · d𝐫 = 0

For a sufficiently smooth field in a simply connected region, a practical test is

∇ × 𝐅 = 𝐽0

where 𝐽0 is the zero vector. The qualification “simply connected” is important: a field may have zero curl away from a hole and still fail to be globally conservative.

To find a potential for 𝐅=(P,Q,R), integrate one component and compare the result with the other components. For example, if P=2x, Q=2y, and R=2z, then φ=x²+y²+z²+C, because ∇φ=(2x,2y,2z).

4. Divergence and Flux

The divergence of a vector field is

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

It is a scalar measure of net outward flow per unit volume near a point. Positive divergence indicates a local source; negative divergence indicates a sink; zero divergence indicates no net local creation or destruction of flux.

For a surface S with oriented unit normal 𝐧̂, the flux of 𝐅 through S is

∫S 𝐅 · 𝐧̂ dS

If a parametrized surface is 𝐫(u,v), its oriented vector area element is

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

and flux is ∫∫D 𝐅(𝐫(u,v))·(𝐫u×𝐫v) du dv. The order of the cross product determines orientation.

In fluid mechanics, 𝐯 is velocity and ∫S 𝐯·𝐧̂ dS is volumetric flow rate through S, with units m³/s. If density is ρ kg/m³, mass flow rate is ∫S ρ𝐯·𝐧̂ dS, in kg/s.

5. Curl and Circulation

The curl is

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

Curl measures local rotational tendency. Its direction follows the right-hand rule, and its magnitude is related to circulation per unit area in the limiting sense. In fluid flow, nonzero curl indicates local vorticity; in electromagnetism, curl relations connect fields to currents and time-varying fields.

Divergence and curl describe different properties. A field can have zero divergence but nonzero curl, or zero curl but nonzero divergence. Neither quantity alone fully identifies a field.

Worked Example 2: Divergence and Curl

For

𝐅(x,y,z) = (−y𝐢 + x𝐣 + z²𝐤)

we obtain

∇ · 𝐅 = 0 + 0 + 2z = 2z

and

∇ × 𝐅 = (0, 0, 1 − (−1)) = 2𝐤

Thus the field has a source or sink character depending on the sign of z, and it has uniform rotational tendency in the positive z-direction.

6. Green’s Theorem in the Plane

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

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

Positive orientation means that D remains on the left as C is traversed. The theorem converts circulation around a boundary into accumulated planar curl over the interior.

A flux form is also useful:

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

For 𝐅=(P,Q), with outward normal, this becomes ∮C P dy − Q dx = ∬D(Px+Qy)dA.

Worked Example 3: Green’s Theorem

Evaluate ∮C (−y dx + x dy) around the counterclockwise unit circle. Here P=−y and Q=x, so

∂Q/∂x − ∂P/∂y = 1 − (−1) = 2

The enclosed area is π, hence

∮C (−y dx + x dy) = ∬D 2 dA = 2π

7. Gauss’s Divergence Theorem

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

∭V ∇ · 𝐅 dV = ∬S 𝐅 · 𝐧̂ dS

This theorem equates total outward flux through a closed surface with the volume integral of divergence. It is especially useful when the surface consists of several faces or when divergence is simple.

The surface must be closed. For an open surface, one must add a suitable closing surface before applying Gauss’s theorem and then subtract the added flux.

Worked Example 4: Flux Through a Cube

Let 𝐅=(x,y,z), and let V be the cube 0≤x,y,z≤a. Since

∇ · 𝐅 = 1+1+1=3

Gauss’s theorem gives

∬S 𝐅 · 𝐧̂ dS = ∭V 3 dV = 3a³

The result has the appropriate units: if the components of 𝐅 have units of flux per area, the integrated flux has units of flux.

8. Stokes’ Theorem

Let S be an oriented, smooth surface with positively oriented boundary curve C. If 𝐅 is continuously differentiable on a region containing S, Stokes’ theorem states

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

The orientation of C and S must satisfy the right-hand rule: when the right thumb points along 𝐧̂, the curled fingers indicate the positive direction around C.

Stokes’ theorem generalizes Green’s theorem to surfaces in three-dimensional space. The choice of surface is flexible when the field is sufficiently smooth and the two surfaces have the same boundary.

For the field in Worked Example 2, take S to be a disk of area πa² in the xy-plane, with upward normal. Since ∇×𝐅=2𝐤,

∮C 𝐅 · d𝐫 = ∬S 2𝐤 · 𝐤 dS = 2πa²

9. Coordinate Systems and Engineering Efficiency

Cartesian coordinates are convenient for rectangular geometries. Cylindrical coordinates (r,θ,z) suit shafts, pipes, and rotational actuators; spherical coordinates suit fields around point sources.

The differential volume elements are

dV = dx dy dz

in Cartesian coordinates,

dV = r dr dθ dz

in cylindrical coordinates, and

dV = r² sinθ dr dθ dφ

in spherical coordinates. The factors r and r²sinθ are scale factors required for correct geometry and units. Omitting them is a common source of error.

A practical selection rule is:

  • Use a direct parametrization when the curve or surface is simple.
  • Use Green’s theorem for planar closed curves.
  • Use Gauss’s theorem for closed surfaces and simple divergence.
  • Use Stokes’ theorem when curl is simple or the boundary is easier than the surface.
  • Use symmetry before integrating; symmetry may make components cancel or make the field constant on a surface.

10. Physical Applications

Fluid Flow

For velocity field 𝐯, incompressible flow satisfies

∇ · 𝐯 = 0

provided density is constant and mass conservation applies locally. In compressible flow, the continuity equation is

∂ρ/∂t + ∇ · (ρ𝐯) = 0

where ρ is density in kg/m³. This equation expresses conservation of mass and is not restricted to steady flow.

Heat Transfer

Fourier’s law is

𝐪 = −k∇T

where 𝐪 is heat flux in W/m², k is thermal conductivity in W/(m·K), and T is temperature in K. The negative sign indicates heat flows toward decreasing temperature. The heat rate through a surface is ∫S 𝐪·𝐧̂ dS.

Electrostatics

The electric field is related to electric potential by

𝐄 = −∇V

where V is potential in volts and 𝐄 is measured in N/C or V/m. Therefore, electrostatic fields are conservative in regions where the potential is single-valued and sufficiently smooth. Gauss’s law in differential form is

∇ · 𝐄 = ρe/ε₀

where ρe is charge density in C/m³ and ε₀ is the permittivity of free space in F/m. The integral form is ∯S 𝐄·𝐧̂ dS = Qenclosed/ε₀.

Electromagnetism

A central integral law is Faraday’s law:

∮C 𝐄 · d𝐫 = − d/dt ∬S 𝐁 · 𝐧̂ dS

where 𝐁 is magnetic flux density in teslas. The negative sign expresses Lenz’s law: induced effects oppose the change in magnetic flux. Stokes’ theorem converts this relation into its local differential form, ∇×𝐄=−∂𝐁/∂t, under suitable smoothness assumptions.

11. Applied Case: Thermal Management of a Servo Actuator

Background

Consider an illustrative servo actuator whose motor produces heat in a cylindrical housing. A temperature sensor and controller must determine whether the housing can reject heat safely.

Problem

Suppose the housing has a steady temperature field approximated by

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

within a region where x and y are measured in metres. The thermal conductivity is k=12 W/(m·K). Determine the heat-flux vector and the outward heat rate through a planar face with unit normal 𝐧̂=(1,0,0), area A=0.015 m².

Analysis and Solution

The temperature gradient is

∇T = (−4,−2,0) K/m

Fourier’s law gives

𝐪 = −12(−4,−2,0) = (48,24,0) W/m²

The normal heat flux is

𝐪 · 𝐧̂ = (48,24,0) · (1,0,0) = 48 W/m²

Assuming the face is planar and the flux is uniform, the heat rate is

Q̇ = (𝐪 · 𝐧̂)A = 48(0.015) = 0.72 W

Outcome and Engineering Interpretation

The face rejects 0.72 W outward. The negative gradient in x and y means temperature decreases as x and y increase, while heat flows in the positive x and y directions. A complete actuator design would also include convection, radiation, contact resistance, transient heating, sensor uncertainty, and temperature-dependent material properties.

Learning Points

  1. A scalar temperature field produces a vector heat-flux field through its gradient.
  2. The sign in Fourier’s law is physically essential.
  3. A surface integral reduces to multiplication only when the normal flux is uniform.
  4. Mathematical predictions must be checked against material limits and thermal safety requirements.

12. Challenges, Limitations, and Best Practice

Vector-calculus models are idealizations. They may assume continuous fields even though sensors sample discrete points; ignore turbulence, friction, hysteresis, or material anisotropy; and use ideal boundaries. Numerical simulation introduces mesh error, truncation error, round-off error, and boundary-condition uncertainty.

Best practice includes:

  • State the region, orientation, smoothness, and boundary conditions.
  • Check dimensions before and after integration.
  • Confirm whether a surface is open or closed.
  • Draw or mentally visualize the normal direction.
  • Use independent checks, such as direct integration versus a theorem.
  • Preserve sign conventions consistently.
  • Validate field models with sensor data and conservation laws.
  • Report assumptions and uncertainty rather than presenting a computed value as exact.

In automated mechatronic systems, field calculations can support digital twins and model-predictive control. However, AI-based surrogate models should not replace conservation checks. Training data, extrapolation, sensor bias, and unsafe optimization objectives can produce physically invalid results. Engineering responsibility requires interpretable constraints, verification, and human oversight in safety-critical applications.

Chapter Summary

Vector calculus describes quantities distributed over space. Scalar fields represent quantities such as temperature and potential, while vector fields represent velocity, force, electric field, and heat flux. The gradient gives the direction and rate of greatest scalar increase. Line integrals accumulate scalar quantities along curves or calculate work and circulation for vector fields. Surface integrals calculate flux through oriented surfaces.

Divergence measures local net outflow, whereas curl measures local rotational tendency. Conservative fields possess potential functions, have path-independent line integrals, and, under suitable topological conditions, have zero curl. Green’s theorem relates planar circulation or flux to an area integral. Gauss’s theorem relates outward flux through a closed surface to volume-integrated divergence. Stokes’ theorem relates circulation around a boundary to surface-integrated curl.

These tools support analysis of fluid continuity, heat conduction, electrostatics, electromagnetic induction, actuator design, and energy transfer. Correct orientation, smoothness, geometry, units, and assumptions are essential for reliable engineering conclusions.

Key Terms

Scalar field: A scalar value assigned to every point in a region.

Vector field: A vector assigned to every point in a region.

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

Level surface: A surface on which a scalar field is constant.

Line integral: An integral accumulated along a curve.

Circulation: The closed-loop line integral of a vector field.

Flux: The amount of a vector field crossing an oriented surface.

Divergence: A scalar measuring local net outward flow.

Curl: A vector measuring local rotational tendency.

Conservative field: A field expressible as the gradient of a scalar potential.

Potential function: A scalar function whose gradient generates a vector field.

Simply connected region: A region without holes that obstruct continuous contraction of closed curves.

Green’s theorem: A planar relation between boundary circulation or flux and an area integral.

Gauss’s divergence theorem: A relation between closed-surface flux and volume-integrated divergence.

Stokes’ theorem: A relation between boundary circulation and surface-integrated curl.

Orientation: The chosen direction of traversal or normal for an integral.

Vorticity: In fluid mechanics, half the curl of the velocity field.

Heat flux: Heat-transfer rate per unit area.

Continuity equation: A local statement of mass conservation.

Review Questions

Short Answer Questions

  1. What physical information is represented by the gradient of temperature?
  2. Distinguish divergence from curl.
  3. State the condition under which a vector field is conservative in a simply connected region.
  4. Why must the normal direction be specified in a surface integral?
  5. What is the physical meaning of zero divergence in an incompressible velocity field?

Long Answer Questions

  1. Explain line integrals, surface integrals, and volume integrals, including one engineering interpretation of each.
  2. State and explain Green’s, Gauss’s, and Stokes’ theorems, including their geometric conditions and orientations.
  3. Derive the heat-flux vector from Fourier’s law and explain the significance of its negative sign.
  4. Explain how a potential function leads to path-independent work.
  5. Compare direct integration with theorem-based integration and discuss when each approach is preferable.

Analytical / Application Questions

  1. For 𝐅=(x²,2xy,3z²), calculate ∇·𝐅 and ∇×𝐅. Interpret both results.
  2. A fluid has velocity field 𝐯=(2x,−2y,0). Determine whether it is incompressible and explain the physical meaning of your result.
  3. A rectangular sensor surface has uniform heat flux 𝐪=(30,−10,0) W/m² and outward normal 𝐧̂=(0,1,0). For area 0.20 m², determine the outward heat-transfer rate and interpret its sign.

Multiple Choice Questions with Answers

Question 1

Which operation converts a scalar field into a vector field?

A. Divergence

B. Gradient

C. Curl

D. Laplacian

Correct Answer: B. Gradient

Question 2

For a conservative field in a suitable simply connected region, which quantity is zero?

A. The gradient

B. The divergence everywhere

C. The curl

D. The field magnitude

Correct Answer: C. The curl

Question 3

Gauss’s divergence theorem relates volume-integrated divergence to what quantity?

A. Flux through a closed surface

B. Circulation along an open curve

C. Work along a path

D. Area of a level curve

Correct Answer: A. Flux through a closed surface

Question 4

The positive orientation in Green’s theorem keeps the enclosed region on which side of the traversal?

A. Right

B. Top

C. Bottom

D. Left

Correct Answer: D. Left

Question 5

If 𝐅=(x,y,z), what is ∇·𝐅?

A. 0

B. 1

C. 2

D. 3

Correct Answer: D. 3

Question 6

For heat conduction, Fourier’s law is

A. 𝐪=k∇T

B. 𝐪=−k∇T

C. 𝐪=−T∇k

D. 𝐪=k/T

Correct Answer: B. 𝐪=−k∇T

Question 7

Stokes’ theorem equates circulation around a boundary curve with

A. The volume integral of divergence

B. The surface integral of curl

C. The line integral of divergence

D. The area of the boundary

Correct Answer: B. The surface integral of curl

Question 8

For 𝐅=(−y,x,0), what is the z-component of curl?

A. −2

B. −1

C. 1

D. 2

Correct Answer: D. 2

Question 9

A closed surface is required directly for which theorem?

A. Fundamental theorem for line integrals

B. Green’s theorem

C. Gauss’s divergence theorem

D. Stokes’ theorem

Correct Answer: C. Gauss’s divergence theorem

Question 10

If a uniform heat flux is 𝐪=(30,−10,0) W/m² and the unit normal is 𝐧̂=(0,1,0), the normal heat flux is

A. −30 W/m²

B. −10 W/m²

C. 10 W/m²

D. 30 W/m²

Correct Answer: B. −10 W/m²

Engineering Mathematics II
Chapter 4 of 15