# Vector Calculus

## Vector Fields

A vector field is an assignment of a vector to each point in a subset of Euclidean space.### Learning Objectives

Describe construction of vector fields### Key Takeaways

#### Key Points

- A vector field in the plane, for instance, can be visualized as a collection of arrows with a given magnitude and direction each attached to a point in the plane.
- Vector fields can be constructed out of scalar fields using the gradient operator.
- Vector fields can be thought to represent the velocity of a moving flow in space, and this physical intuition leads to notions such as the divergence (the rate of change of volume of a flow) and curl (the rotation of a flow).

#### Key Terms

**vector field**: a construction in which each point in a Euclidean space is associated with a vector; a function whose range is a vector space**bijective**: both injective and surjective

The elements of differential and integral calculus extend to vector fields in a natural way. When a vector field represents force, the line integral of a vector field represents the work done by a force moving along a path, and, under this interpretation, conservation of energy is exhibited as a special case of the fundamental theorem of calculus. Vector fields can be thought to represent the velocity of a moving flow in space, and this physical intuition leads to notions such as the divergence (the rate of change of volume of a flow) and curl (the rotation of a flow).

Gradient field: Vector fields can be constructed out of scalar fields using the gradient operator (denoted by the del: ∇). A vector field V defined on a set S is called a gradient field or a conservative field if there exists a real-valued function (a scalar field) f on S such that:

$\displaystyle{V = \nabla f = \left(\frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \frac{\partial f}{\partial x_3}, \dots,\frac{\partial f}{\partial x_n}\right)}$

The associated flow is called the gradient flow.

### Examples

- A vector field for the movement of air on Earth will associate for every point on the surface of the Earth a vector with the wind speed and direction for that point.
- A gravitational field generated by any massive object is a vector field. For example, the gravitational field vectors for a spherically symmetric body would all point towards the sphere's center, with the magnitude of the vectors reducing as radial distance from the body increases.
- Magnetic field lines can be revealed using small iron filings.
- In the case of the velocity field of a moving fluid, a velocity vector is associated to each point in the fluid.

## Conservative Vector Fields

A conservative vector field is a vector field which is the gradient of a function, known in this context as a scalar potential.### Learning Objectives

Identify properties of conservative vector fields### Key Takeaways

#### Key Points

- Conservative vector fields have the following property: The line integral from one point to another is independent of the choice of path connecting the two points; it is path-independent.
- Conservative vector fields are also irrotational, meaning that (in three dimensions) they have vanishing curl.
- A vector field $\mathbf{v}$is said to be conservative if there exists a scalar field$\varphi$such that$\mathbf{v}=\nabla\varphi$.

#### Key Terms

**vector field**: a construction in which each point in a Euclidean space is associated with a vector; a function whose range is a vector space**bijective**: both injective and surjective

*The line integral from one point to another is independent of the choice of path connecting the two points; it is path-independent.*

Conversely, path independence is equivalent to the vector field's being conservative. Conservative vector fields are also irrotational, meaning that (in three dimensions) they have vanishing curl. In fact, an irrotational vector field is necessarily conservative provided that a certain condition on the geometry of the domain holds: it must be simply connected.

Definition: A vector field

$\mathbf{v}$

is said to be *conservative*if there exists a scalar field

$\varphi$

such that $\mathbf{v}=\nabla\varphi$

. Here $\nabla\varphi$

denotes the gradient of $\varphi$

. When the above equation holds, $\varphi$

is called a scalar potential for $\mathbf{v}$

.For any scalar field

$\varphi$

: $\nabla \times \nabla \varphi=0$

. Therefore, the curl of a conservative vector field $\mathbf{v}$

is always $0$

. A vector field $\mathbf{v}$

, whose curl is zero, is called irrotational.### Path Independence

A key property of a conservative vector field is that its integral along a path depends only on the endpoints of that path, not the particular route taken. Suppose that$S\subseteq\mathbb{R}^3$

is a region of three-dimensional space, and that $P$

is a rectifiable path in $S$

with start point $A$

and end point $B$

. If $\mathbf{v}=\nabla\varphi$

is a conservative vector field, then the gradient theorem states that $\int_P \mathbf{v}\cdot d\mathbf{r}=\varphi(B)-\varphi(A)$

. This holds as a consequence of the Chain Rule and the Fundamental Theorem of Calculus. An equivalent formulation of this is to say that $\oint \mathbf{v}\cdot d\mathbf{r}=0$

for every closed loop in $S$

.## Line Integrals

A line integral is an integral where the function to be integrated is evaluated along a curve.### Learning Objectives

Calculate the value of a line integral### Key Takeaways

#### Key Points

- The value of the line integral is the sum of the values of the field at all points on the curve, weighted by some scalar function on the curve (commonly arc length or, for a vector field, the scalar product of the vector field with a differential vector in the curve).
- Many simple formulae in physics (for example, $W=F·s$) have natural continuous analogs in terms of line integrals ($W= \int_C F\cdot ds$). The line integral finds the work done on an object moving through an electric or gravitational field, for example.
- In qualitative terms, a line integral in vector calculus can be thought of as a measure of the total effect of a given field along a given curve.

#### Key Terms

**vector field**: a construction in which each point in a Euclidean space is associated with a vector; a function whose range is a vector space**bijective**: both injective and surjective

The function to be integrated may be a scalar field or a vector field. The value of the line integral is the sum of the values of the field at all points on the curve, weighted by some scalar function on the curve (commonly arc length or, for a vector field, the scalar product of the vector field with a differential vector in the curve). This weighting distinguishes the line integral from simpler integrals defined on intervals. Many simple formulae in physics (for example,

$W=F·s$

) have natural continuous analogs in terms of line integrals ($W= \int_C F\cdot ds$

). The line integral finds the work done on an object moving through an electric or gravitational field, for example.In qualitative terms, a line integral in vector calculus can be thought of as

*a measure of the total effect of a given field along a given curve*. More specifically, the line integral over a scalar field can be interpreted as the area under the field carved out by a particular curve. This can be visualized as the surface created by

$z = f(x,y)$

and a curve $C$

in the $xy$

-plane. The line integral of $f$

would be the area of the "curtain" created when the points of the surface that are directly over $C$

are carved out.### Line Integral of a Scalar Field

For some scalar field$f:U \subseteq R^n \to R$

, the line integral along a piecewise smooth curve $C \subset U$

is defined as:$\int_C f\, ds = \int_a^b f(\mathbf{r}(t)) |\mathbf{r}'(t)|\, dt$

where

$r: [a, b] \to C$

is an arbitrary bijective parametrization of the curve $C$

such that $r(a)$

and $r(b)$

give the endpoints of $C$

and $a$

.### Line Integral of a Vector Field

For a vector field$\mathbf{F}: U \subseteq R^n \to R^n$

, the line integral along a piecewise smooth curve $C \subset U$

, in the direction of $r$

, is defined as:$\displaystyle{\int_C \mathbf{F}(\mathbf{r})\cdot\,d\mathbf{r} = \int_a^b \mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,dt}$

where

$\cdot$

is the dot product and $r: [a, b] \to C$

is a bijective parametrization of the curve $C$

such that $r(a)$

and $r(b)$

give the endpoints of $C$

.## Fundamental Theorem for Line Integrals

Gradient theorem says that a line integral through a gradient field can be evaluated from the field values at the endpoints of the curve.### Learning Objectives

Discuss application of the gradient theorem in physics### Key Takeaways

#### Key Points

- The gradient theorem implies that line integrals through irrotational vector fields are path-independent.
- Work done by conservative forces, described by a vector field, does not depend on the path followed by the object, but only the end points, as the above equation shows.
- Any conservative vector field can be expressed as the gradient of a scalar field.

#### Key Terms

**differentiable**: having a derivative, said of a function whose domain and co-domain are manifolds**vector field**: a construction in which each point in a Euclidean space is associated with a vector; a function whose range is a vector space**conservative force**: a force with the property that the work done in moving a particle between two points is independent of the path taken

Let

$\varphi: U \subseteq \mathbb{R}^n \to \mathbb{R}$

. This holds that:$\displaystyle{\varphi\left(\mathbf{q}\right)-\varphi\left(\mathbf{p}\right) = \int_{\gamma[\mathbf{p},\,\mathbf{q}]} \nabla\varphi(\mathbf{r})\cdot d\mathbf{r}}$

It is a generalization of the fundamental theorem of calculus to any curve in a plane or space (generally

$n$

-dimensional) rather than just the real line.The gradient theorem implies that line integrals through irrotational vector fields are path-independent. In physics this theorem is one of the ways of defining a "conservative force." By placing

$\varphi$

as potential, $\nabla$

is a conservative field. Work done by conservative forces does not depend on the path followed by the object, but only the end points, as the above equation shows.The gradient theorem also has an interesting converse: any conservative vector field can be expressed as the gradient of a scalar field. Just like the gradient theorem itself, this converse has many striking consequences and applications in both pure and applied mathematics

### Proof

If$\varphi$

is a differentiable function from some open subset $U$

(of $R^n$

) to $R$

, and if $r$

is a differentiable function from some closed interval $[a,b]$

to $U$

, then by the multivariate chain rule, the composite function $\circ r$

is differentiable on $(a,b)$

and $\frac{d}{dt}(\varphi \circ \mathbf{r})(t)=\nabla \varphi(\mathbf{r}(t)) \cdot \mathbf{r}'(t)$

for for all $t$

in $(a,b)$

. Here the $\cdot$

denotes the usual inner product.Now suppose the domain

$U$

of $\varphi$

contains the differentiable curve $\gamma$

with endpoints $p$

and $q$

(oriented in the direction from $p$

to $q$

). If $r$

parametrizes for $t$

in $[a,b]$

, then the above shows that$\begin{align} \int\text{\textunderscore}{\gamma} \nabla\varphi(\mathbf{u}) \cdot d\mathbf{u} &=\int\text{\textunderscore}a^b \nabla\varphi(\mathbf{r}(t)) \cdot \mathbf{r}'(t)dt \\
&=\int\text{\textunderscore}a^b \frac{d}{dt}\varphi(\mathbf{r}(t))dt \\
&=\varphi(\mathbf{r}(b))-\varphi(\mathbf{r}(a))\\
&=\varphi\left(\mathbf{q}\right)-\varphi\left(\mathbf{p}\right) \end{align}$

where the definition of the line integral is used in the first equality and the fundamental theorem of calculus is used in the third equality.

## Green's Theorem

Green's theorem gives relationship between a line integral around closed curve$C$

and a double integral over plane region $D$

bounded by $C$

.### Learning Objectives

Explain the relationship between the Green's theorem, the Kelvin–Stokes theorem, and the divergence theorem### Key Takeaways

#### Key Points

- Green's theorem is a special case of the Kelvin–Stokes theorem, when applied to a region in the $xy$-plane.
- Considering only two-dimensional vector fields, Green's theorem is equivalent to the two-dimensional version of the divergence theorem.
- Green's theorem can be used to compute area by line integral.

#### Key Terms

**double integral**: An integral extended to functions of more than one real variable**line integral**: An integral the domain of whose integrand is a curve.

$C$

and a double integral over the plane region $D$

bounded by $C$

.Let

$C$

be a positively oriented, piecewise smooth, simple closed curve in a plane, and let $D$

be the region bounded by $C$

. If $L$

and $M$

are functions of $(x,y)$

defined on an open region containing $D$

and have continuous partial derivatives there, then:$\displaystyle{\oint_{C} (L\, \mathrm{d}x + M\, \mathrm{d}y) = \iint_{D} \left(\frac{\partial M}{\partial x} - \frac{\partial L}{\partial y}\right)\, \mathrm{d}x\, \mathrm{d}y}$

where the path of integration along

$C$

is counterclockwise.In physics, Green's theorem is mostly used to solve two-dimensional flow integrals, stating that the sum of fluid outflows at any point inside a volume is equal to the total outflow summed about an enclosing area. In plane geometry and area surveying, Green's theorem can be used to determine the area and centroid of plane figures solely by integrating over the perimeter.

Green's theorem is a special case of the Kelvin–Stokes theorem, when applied to a region in the

$xy$

-plane. Considering only two-dimensional vector fields, Green's theorem is equivalent to the two-dimensional version of the divergence theorem.## Curl and Divergence

The four most important differential operators are gradient, curl, divergence, and Laplacian.### Learning Objectives

Calculate the direction and the magnitude of the curl, and the magnitude of the divergence### Key Takeaways

#### Key Points

- The curl is a vector operator that describes the infinitesimal rotation of a three-dimensional vector field.
- The direction of the curl is the axis of rotation, as determined by the right-hand rule, and the magnitude of the curl is the magnitude of rotation.
- Divergence is a vector operator that measures the magnitude of a vector field's source or sink at a given point in terms of a signed scalar.

#### Key Terms

**gradient**: of a function$y = f(x)$or the graph of such a function, the rate of change of$y$with respect to$x$; that is, the amount by which$y$changes for a certain (often unit) change in$x$

$\nabla$

). The four most important differential operators are gradient ($\nabla f$

), curl ($\nabla \times \mathbf{F}$

), divergence ($\nabla \cdot \mathbf{F}$

), and Laplacian ($\nabla^2 f = \nabla \cdot \nabla f$

).### Curl

The curl is a vector operator that describes the infinitesimal rotation of a 3-dimensional vector field. At every point in the field, the curl of that field is represented by a vector. The attributes of this vector—length and direction—characterize the rotation at that point.The direction of the curl is the axis of rotation, as determined by the right-hand rule, and the magnitude of the curl is the magnitude of rotation. If the vector field represents the flow velocity of a moving fluid, then the curl is the circulation density of the fluid. A vector field whose curl is zero is called irrotational. The curl is a form of differentiation for vector fields. The corresponding form of the fundamental theorem of calculus is Stokes' theorem, which relates the surface integral of the curl of a vector field to the line integral of the vector field around the boundary curve.

The curl of a vector field

$\mathbf{F}$

, denoted by $\nabla \times \mathbf{F}$

, is defined at a point in terms of its projection onto various lines through the point. If $\hat{\mathbf{n}}$

is any unit vector, the projection of the curl of $\mathbf{F}$

onto $\hat{\mathbf{n}}$

is defined to be the limiting value of a closed line integral in a plane orthogonal to $\hat{\mathbf{n}}$

as the path used in the integral becomes infinitesimally close to the point, divided by the area enclosed.Curl is defined by:

$\displaystyle{(\nabla \times \mathbf{F}) \cdot \mathbf{\hat{n}} \\ \overset{\underset{\mathrm{def}}{}}{=} \lim_{A \to 0}\left( \frac{1}{|A|}\oint_{C} \mathbf{F} \cdot d\mathbf{r}\right)}$

### Divergence

Divergence is a vector operator that measures the magnitude of a vector field's source or sink at a given point in terms of a signed scalar. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point.In physical terms, the divergence of a three-dimensional vector field is the extent to which the vector field flow behaves like a source or a sink at a given point. It is a local measure of its "outgoingness"—the extent to which there is more exiting an infinitesimal region of space than entering it. If the divergence is nonzero at some point, then there must be a source or sink at that position. (Note that we are imagining the vector field to be like the velocity vector field of a fluid (in motion) when we use the terms flow, sink, and so on.)

More rigorously, the divergence of a vector field

$\mathbf{F}$

at a point $p$

is defined as the limit of the net flow of $\mathbf{F}$

across the smooth boundary of a three-dimensional region $V$

divided by the volume of $V$

as $V$

shrinks to $p$

. Formally:$\displaystyle{\nabla \cdot \mathbf{F}(p) = \lim_{V \rightarrow \{p\}} \iint_{S(V)} \frac{\mathbf{F}\cdot\mathbf{n}}{\left|V\right| } dS}$

where

$\left|V\right|$

is the volume of $V$

, $S(V)$

is the boundary of $V$

, and the integral is a surface integral with n being the outward unit normal to that surface.## Parametric Surfaces and Surface Integrals

A parametric surface is a surface in the Euclidean space$R^3$

which is defined by a parametric equation.### Learning Objectives

Define the surface integral and identify a parametric surface### Key Takeaways

#### Key Points

- Parametric representation is the most general way to specify a surface. The curvature and arc length of curves on the surface can both be computed from a given parametrization.
- The same surface admits many different parametrizations.
- A surface integral is a definite integral taken over a surface. It can be thought of as the double integral analog of the line integral.

#### Key Terms

**electric potential**: the potential energy per unit charge at a point in a static electric field; voltage**gradient**: of a function$y = f(x)$or the graph of such a function, the rate of change of$y$with respect to$x$; that is, the amount by which$y$changes for a certain (often unit) change in$x$**curl**: the vector field denoting the rotationality of a given vector field

### Parametric Surface

A parametric surface is a surface in the Euclidean space$R^3$

which is defined by a parametric equation with two parameters: $\vec r: \Bbb{R}^2 \rightarrow \Bbb{R}^3$

. Parametric representation is the most general way to specify a surface. Surfaces that occur in two of the main theorems of vector calculus, Stokes' theorem and the divergence theorem, are frequently given in a parametric form. The curvature and arc length of curves on the surface can both be computed from a given parametrization.### Examples

- The simplest type of parametric surfaces is given by the graphs of functions of two variables: $z=f(x,y)$;$\vec{r}(x,y)=(x,y,f(x,y))$.
- Using the spherical coordinates, the unit sphere can be parameterized by $\vec r(\theta,\phi) = (\cos\theta \sin\phi, \sin\theta \sin \phi, \cos\phi), 0 \leq \theta < 2\pi, 0 \leq \phi \leq \pi$.
- The straight circular cylinder of radius $R$about the$x$-axis has the following parametric representation:$\vec{r}(x,\phi)=(x,R \cos \phi, r \sin \phi)$.

The same surface admits many different parametrizations. For example, the coordinate

$z$

-plane can be parametrized as $\vec r(u,v)=(au+bv,cu+dv, 0)$

for any constants $a$

, $b$

, $c$

, $d$

such that $ad - bc \neq 0$

, i.e. the matrix $\begin{bmatrix}a & b\\ c & d\end{bmatrix}$

is invertible.### Surface integral

A surface integral is a definite integral taken over a surface. It can be thought of as the double integral analog of the line integral. Given a surface, one may integrate over its scalar fields (that is, functions which return scalars as values), and vector fields (that is, functions which return vectors as values). Surface integrals have many applications in physics, particularly within the classical theory of electromagnetism. We will study surface integral of vector fields and related theorems in the following atoms.## Surface Integrals of Vector Fields

The surface integral of vector fields can be defined component-wise according to the definition of the surface integral of a scalar field.### Learning Objectives

Explain relationship between surface integral of vector fields and surface integral of a scalar field### Key Takeaways

#### Key Points

- The flux is defined as the quantity of fluid flowing through $S$in unit amount of time.
- To find the flux, we need to take the dot product of $\mathbf{v}$with the unit surface normal to$S$at each point, which will give us a scalar field, and integrate the obtained field.
- This is expressed as $\int_S {\mathbf v}\cdot \,d{\mathbf {S}} = \int_S {\mathbf v}\cdot {\mathbf n}\,dS=\iint_T {\mathbf v}(\mathbf{x}(s, t))\cdot \left({\partial \mathbf{x} \over \partial s}\times {\partial \mathbf{x} \over \partial t}\right) ds\, dt$.

#### Key Terms

**vector field**: a construction in which each point in a Euclidean space is associated with a vector; a function whose range is a vector space**parametrization**: Is the process of deciding and defining the parameters necessary for a complete or relevant specification of a model or geometric object.**flux**: the rate of transfer of energy (or another physical quantity) through a given surface, specifically electric flux, magnetic flux

$\mathbf{v}$

on $S$

; that is, for each $\mathbf{x}$

in $S$

, $\mathbf{v}(\mathbf{x})$

is a vector. The surface integral of vector fields can be defined component-wise according to the definition of the surface integral of a scalar field; the result is a vector. This applies, for example, in the expression of the electric field at some fixed point due to an electrically charged surface, or the gravity at some fixed point due to a sheet of material.Alternatively, if we integrate the normal component of the vector field, the result is a scalar. Imagine that we have a fluid flowing through

$S$

, such that $\mathbf{v}(\mathbf{x})$

determines the velocity of the fluid at $\mathbf{x}$

. The flux is defined as the quantity of fluid flowing through $S$

in unit amount of time.This illustration implies that if the vector field is tangent to

$S$

at each point, then the flux is zero, because the fluid just flows in parallel to $S$

, and neither in nor out. This also implies that if $\mathbf{v}$

does not just flow along $S$

—that is, if $\mathbf{v}$

has both a tangential and a normal component—then only the normal component contributes to the flux. Based on this reasoning, to find the flux, we need to take the dot product of $\mathbf{v}$

with the unit surface normal to $S$

, at each point, which will give us a scalar field, and integrate the obtained field as above. We find the formula:$\displaystyle{\int_S {\mathbf v}\cdot \,d{\mathbf {S}} = \int_S {\mathbf v}\cdot {\mathbf n}\,dS=\iint_T {\mathbf v}(\mathbf{x}(s, t))\cdot \left({\partial \mathbf{x} \over \partial s}\times {\partial \mathbf{x} \over \partial t}\right) ds\, dt}$

The cross product on the right-hand side of this expression is a surface normal determined by the parametrization. This formula

*defines*the integral on the left (note the dot and the vector notation for the surface element).

### Example

An electric field from a point charge ($Q$

) is given as:$\displaystyle{\mathbf{E} = \frac{Q}{4\pi\varepsilon_0} \frac{\mathbf{\hat{r}}}{|\mathbf{r}|^2}}$

where

$r$

is the position vector and $\hat{r}$

is a unit vector in radial direction. If the charge is located at the center of a sphere with a radius $R$

, the surface integral of the electric field over the surface is calculated at the following:$\displaystyle{\int_S {\mathbf{E}} \cdot d\mathbf{S} = \frac{Q}{4\pi\varepsilon_0} \int_S \frac{1}{\left|\mathbf{r}\right|^2} dS = \frac{Q}{\varepsilon_0}}$

## Stokes' Theorem

Stokes' theorem relates the integral of the curl of a vector field over a surface to the line integral of the field around the boundary.### Learning Objectives

Describe application of Stokes' theorem in electromagnetism### Key Takeaways

#### Key Points

- The generalized Stokes' theorem says that the integral of a differential form ω over the boundary of some orientable manifold $\Omega$is equal to the integral of its exterior derivative$d \omega$over the whole of$\Omega$.
- Given a vector field, the Kelvin-Stokes theorem relates the integral of the curl of the vector field over some surface to the line integral of the vector field around the boundary of the surface. The Kelvin–Stokes theorem is a special case of the generalized Stokes' theorem.
- By applying the Stokes' theorem, you can show that the work done by electric field is path-independent.

#### Key Terms

**curl**: the vector field denoting the rotationality of a given vector field**electric potential**: the potential energy per unit charge at a point in a static electric field; voltage**gradient**: of a function$y = f(x)$or the graph of such a function, the rate of change of$y$with respect to$x$; that is, the amount by which$y$changes for a certain (often unit) change in$x$

$\omega$

over the boundary of some orientable manifold $\Omega$

is equal to the integral of its exterior derivative $d\omega$

over the whole of $\Omega$

, i.e.:$\displaystyle{\int_{\partial \Omega}\omega=\int_{\Omega}\mathrm {d}\omega}$

The Kelvin–Stokes theorem, also known as the curl theorem, is a theorem in vector calculus on

$R^3$

. Given a vector field, the theorem relates the integral of the curl of the vector field over some surface to the line integral of the vector field around the boundary of the surface. The Kelvin–Stokes theorem is a special case of the "generalized Stokes' theorem." If $\mathbf{F}$

is a smooth vector field on $R^3$

, then:$\displaystyle{\oint_{\Gamma} \mathbf{F}\, d\Gamma = \iint_{S} \nabla\times\mathbf{F}\, dS}$

### Application in Electromagnetism

Electric field is a conservative vector field. Therefore, electric field can be written as a gradient of a scalar field:$\mathbf{E} = - \nabla {\varphi}$

Applying the Kelvin-Stokes theorem and substituting in

$\oint_{\Gamma} \mathbf{F}\, d\Gamma = \iint_{S} \nabla\times\mathbf{F}\, dS$

, we get:$\displaystyle{\oint_{\Gamma} \mathbf{E}\, d\Gamma = -\iint_{S} \nabla\times (\nabla \varphi) \, dS}$

Since

$\nabla \times \nabla f = 0$

for an arbitrary function $f$

, we derive:$\displaystyle{\oint_{\Gamma} \mathbf{E}\, d\Gamma = 0}$

As we have seen in our previous atom on gradient theorem, this simply means:

$\displaystyle{\int_P \mathbf{E}\cdot d\mathbf{r}=\varphi(B)-\varphi(A)}$

which is equivalent to saying that work done by the electric field only depends on the initial and final point of the motion. The scalar field

$\varphi$

in the case of electromagnetism is called electric potential.## The Divergence Theorem

The divergence theorem relates the flow of a vector field through a surface to the behavior of the vector field inside the surface.### Learning Objectives

Apply the divergence theorem to evaluate the outward flux of a vector field through a closed surface### Key Takeaways

#### Key Points

- The divergence theorem states that the outward flux of a vector field through a closed surface is equal to the volume integral of the divergence over the region inside the surface.
- In physics and engineering, the divergence theorem is usually applied in three dimensions. However, it generalizes to any number of dimensions.
- Applying the divergence theorem, we can check that the equation $\nabla \cdot \mathbf{E} = \frac {\rho} {\varepsilon_0}$is nothing but an equation describing Coulomb force written in a differential form.

#### Key Terms

**flux**: the rate of transfer of energy (or another physical quantity) through a given surface, specifically electric flux, magnetic flux**divergence**: a vector operator that measures the magnitude of a vector field's source or sink at a given point, in terms of a signed scalar

More precisely, the divergence theorem states that the outward flux of a vector field through a closed surface is equal to the volume integral of the divergence over the region inside the surface. Intuitively, it states that the sum of all sources minus the sum of all sinks gives the net flow out of a region. The divergence theorem is an important result for the mathematics of engineering, in particular for electrostatics and fluid dynamics.

In physics and engineering, the divergence theorem is usually applied in three dimensions. However, it generalizes to any number of dimensions. In one dimension, it is equivalent to the fundamental theorem of calculus. The theorem is a special case of the generalized Stokes' theorem.

### Theorem

Suppose$V$

is a subset of $R^n$

(in the case of $n=3$

, $V$

represents a volume in 3D space) which is compact and has a piecewise smooth boundary $S$

(also indicated with $\partial V=S$

). If $F$

is a continuously differentiable vector field defined on a neighborhood of $V$

, then we have:$\displaystyle{\int \int \int_V \left(\mathbf{\nabla}\cdot\mathbf{F}\right)dV= \oint_S(\mathbf{F}\cdot\mathbf{n})\,dS}$

.The left side is a volume integral over the volume

$V$

; the right side is the surface integral over the boundary of the volume $V$

.### Example

The first equation of the Maxwell's equations is often written as$\nabla \cdot \mathbf{E} = \frac {\rho} {\varepsilon_0}$

in a differential form, where $\rho$

is the electric density. Let's consider a system with a point charge $Q$

located at the origin. We will apply the divergence theorem for a sphere of radius $R$

, whose center is also at the origin. Substituting $E$

for $F$

in the relationship of the divergence theorem, the left hand side (LHS) becomes:$\displaystyle{\int \int \int_V\left(\mathbf{\nabla}\cdot\mathbf{E}\right)dV = \int \int \int_V \left(\frac{\rho}{\varepsilon_0}\right)dV = \frac{Q}{\varepsilon_0}}$

The surface integral on the right hand side (RHS) becomes:

$\displaystyle{\int_S(\mathbf{E}\cdot\mathbf{n})\,dS = 4\pi R^2 E}$

Combining RHS and LHS, we get:

$\displaystyle{E = \frac{Q}{4\pi \varepsilon_0 R^2}}$

This is simply the electric field for the Coulomb force.

### Licenses and Attributions

#### More Study Resources for You

The materials found on Course Hero are not endorsed, affiliated or sponsored by the authors of the above study guide

Show More