Skip to main content

Section 6.4 Applications of the divergence theorem

In this section we study a few applications of the divergence theorem in \(\mathbb{R}^n\text{.}\)

Subsection 6.4.1 The divergence theorem in \(\mathbb{R}^3\) and the heat equation

Our first application concerns heat flow in \(\mathbb{R}^3\text{.}\) First, we recall the divergence theorem in \(\mathbb{R}^3\text{.}\) Let \(\mathbf{F}\) be a smooth vector field, \(\partial E\) a closed surface with normal vector pointing outward, and \(E\) the solid region consisting of \(\partial E\) and its interior with canonical orientation. The divergence theorem in \(\mathbb{R}^3\) is the statement that

\begin{equation*} \iiint_E (\boldsymbol{\nabla} \cdot \mathbf{F})\ dV = \iint_{\partial E} (\mathbf{F} \cdot \mathbf{n} ) d A. \end{equation*}

We consider the case where the vector field \(\mathbf{F}\) is the heat flow. Recall the context from Subsection 5.9.2. Suppose that the temperature at a point \((x,y,z)\) in an object (or substance) is given by the function \(T(x,y,z)\text{.}\) The heat flow is given the gradient of the temperature function, rescaled by a constant \(K\) known as the conductivity of the substance:

\begin{equation*} \mathbf{F} = - K \boldsymbol{\nabla} T. \end{equation*}

Now consider any closed surface \(\partial E\text{,}\) with the surface \(\partial E\) and its interior within the object. The amount of heat flowing across the surface \(\partial E\) is given by the flux of the vector field \(\mathbf{F}\) across \(\partial E\text{:}\)

\begin{equation*} \iint_{\partial E} (\mathbf{F} \cdot \mathbf{n}) d A = - K \iint_{\partial E} \left( \boldsymbol{\nabla} T \cdot \mathbf{n} \right) d A. \end{equation*}

If we are interested in the amount of heat entering the solid region \(E\) (instead of flowing across the surface in the outward direction), we change the sign of the flux integral. Then, by the divergence theorem, the amount of heat entering the solid region \(E\) can be rewritten as a volume integral:

\begin{align*} K \iint_{\partial E} \left( \boldsymbol{\nabla} T \cdot \mathbf{n} \right) d A =\amp K \iiint_E \left( \boldsymbol{\nabla} \cdot \boldsymbol{\nabla} T \right)\ dV\\ =\amp K \iiint_E \nabla^2 T \ dV, \end{align*}

where \(\nabla^2 T\) is the Laplacian of the temperature function \(T\text{.}\)

Now we want to consider the situation where the temperature function \(T\) is also changing in time. So we think of \(T\) as a function of four variables \(T = T(x,y,z,t)\text{.}\) But \(t\) is just a “spectator variable” here; we still consider the operator \(\nabla^2\) in \(\mathbb{R}^3\text{,}\) in terms of the variables \((x,y,z)\text{.}\) So we can go through all the steps above, and we obtain that the amount of heat entering the solid region \(E\) during a small (infinitesimal) amount of time \(d t\) is

\begin{equation*} K d t \iiint_E \nabla^2 T \ dV. \end{equation*}

Here the Laplacian is only in the variables \((x,y,z)\text{,}\) that is, \(\nabla^2 = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\text{.}\)

To proceed further, we need a little bit of physics. It is known in physics that the amount of heat energy required to raise the temperature of an object by \(\Delta T\) is given by \(C M \Delta T\text{,}\) where \(M\) is the mass of the object and \(C\) is constant known as the “specific heat” of the material. Now consider the object consisting of the solid region \(E\text{.}\) In a small (infinitesimal) amount of time \(d t\text{,}\) the temperature changes by \(\frac{\partial T(x,y,z,t)}{\partial t}\ dt\text{.}\) If we consider an infinitesimal volume element \(d V\) in \(E\text{,}\) and \(\rho(x,y,z)\) is the mass density of the solid region, then the mass of the volume element is \(\rho dV\text{.}\) Thus the heat energy required to change the temperature of the object in the time interval \(dt\) is

\begin{equation*} C \rho \frac{\partial T}{\partial t}\ dV dt. \end{equation*}

We then sum over all volume elements, i.e. integrate over \(E\text{,}\) to get that the total heat energy required to change the temperature during the time interval \(dt\) is

\begin{equation*} C dt \iiint_E \rho \frac{\partial T}{\partial t}\ dV. \end{equation*}

Assuming that the object is not creating heat energy itself, this heat energy should be equal to the amount of heat entering the solid region \(E\) through the boundary surface \(\partial E\) during the time interval \(dt\text{,}\) which is what we calculated previously. We thus obtain the equality:

\begin{equation*} C dt \iiint_E \rho \frac{\partial T}{\partial t}\ dV = K d t \iiint_E \nabla^2 T \ dV. \end{equation*}

We can cancel the time interval \(dt\) on both sides. Rewriting both terms on the same side of the equality, we get:

\begin{equation*} \iiint_E \left(K \nabla^2 T - C \rho \frac{\partial T}{\partial t} \right)\ dV = 0. \end{equation*}

But this must be true for all solid regions \(E\) within the object, and for all times \(t\text{.}\) From this we can conclude that the integrand must be identically zero:

\begin{equation*} K \nabla^2 T = C \rho \frac{\partial T}{\partial t}. \end{equation*}

This equation is generally rewritten as

\begin{equation*} \frac{\partial T(x,y,z,t)}{\partial t} = \alpha \nabla^2 T(x,y,z,t), \end{equation*}

where \(\alpha = \frac{K}{C \rho}\) is called the “thermal diffusivity”, and \(\nabla^2 = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\text{.}\)

This equation is very famous: it is known as the heat equation. As mentioned in the Wikipedia page on “Heat equation”,

As the prototypical parabolic partial differential equation, the heat equation is among the most widely studied topics in pure mathematics, and its analysis is regarded as fundamental to the broader field of partial differential equations.
The importance of the heat equation goes beyond physics and heat flow. It has a wide range of applications, from the physics of heat flow of course, to probability theory, to financial mathematics, to quantum mechanics, to image analysis in computer science. A generalization of the heat equation is also behind the famous proof of the Poincare conjecture by Pereleman in 2003 (the only Millenium Prize Problem that has been solved so far). I encourage you to have a look at the wikipedia page on the heat equation!

Subsection 6.4.2 The divergence theorem in \(\mathbb{R}^n\) and Green's first and second identities

We now consider the divergence theorem in \(\mathbb{R}^n\text{.}\) Let \(\mathbf{F}\) be a vector field, \(\partial E\) a closed \((n-1)\)-dimensional subspace with normal vector pointing outward, and \(E\) the region of \(\mathbb{R}^n\) consisting of \(\partial E\) and its interior with canonical orientation. The divergence theorem in \(\mathbb{R}^n\) is the statement that

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}} (\boldsymbol{\nabla} \cdot \mathbf{F}) dV_n = \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} (\mathbf{F} \cdot \mathbf{n}) dV_{n-1}. \end{equation*}

Using this theorem, we can prove the following two identities, known as Green's first and second identities.

We consider the divergence theorem in \(\mathbb{R}^n\) with vector field \(\mathbf{F} = f \boldsymbol{\nabla} g\text{.}\) By the third identity in Lemma 4.4.9, we know that

\begin{equation*} \boldsymbol{\nabla} \cdot (f \mathbf{F} ) = (\boldsymbol{\nabla} f) \cdot \mathbf{F} + f \boldsymbol{\nabla} \cdot \mathbf{F}. \end{equation*}

Thus

\begin{align*} \boldsymbol{\nabla} \cdot (f \boldsymbol{\nabla} g) =\amp \boldsymbol{\nabla} f \cdot \boldsymbol{\nabla} g + f \boldsymbol{\nabla} \cdot \boldsymbol{\nabla} g\\ =\amp \boldsymbol{\nabla} f \cdot \boldsymbol{\nabla} g + f \nabla^2 g. \end{align*}

Therefore, the divergence theorem applied to \(\mathbf{F} = f \boldsymbol{\nabla} g\) becomes:

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}}\left( \boldsymbol{\nabla} f \cdot \boldsymbol{\nabla} g + f \nabla^2 g \right)\ dV_n = \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} f \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1}, \end{equation*}

which is the statement of Green's first identity.

This may not be obvious at first, but Green's first identity is essentially the equivalent of integration by parts in higher dimension. Basically, integration by parts can be written as

\begin{equation*} \int_a^b f\ dg = f g \Big|_a^b - \int_a^b g\ df. \end{equation*}

Green's first identity generalizes this statement for the \(n\)-tuple integral of the function \(f \nabla^2 g\) over a closed bounded region \(E \subset \mathbb{R}^n\text{.}\)

Green's second identity follows from the first identity. Using the first identity, we know that

\begin{align*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}} (f \nabla^2 g - g \nabla^2 f)\ dV_n =\amp\underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} (f \boldsymbol{\nabla} g -g \boldsymbol{\nabla} f ) \cdot \mathbf{n}\ dV_{n-1} \\ \amp- \underbrace{\int \cdots \int_E}_{\text{$n$ times}} ( \boldsymbol{\nabla} f \cdot \boldsymbol{\nabla} g - \boldsymbol{\nabla} g \cdot \boldsymbol{\nabla} f)\ dV_n. \end{align*}

But \(\boldsymbol{\nabla} f \cdot \boldsymbol{\nabla} g = \boldsymbol{\nabla} g \cdot \boldsymbol{\nabla} f\text{,}\) and hence the last term vanishes. The result is Green's second identity.

Green's identities are quite useful in mathematics. There is in fact also a third Green's identity, but it is beyond the scope of this class. Have a look at the Wikipedia page on “Green's identities” if you are interested!

Exercises 6.4.3 Exercises

1.

Recall that a function \(g: U \to \mathbb{R}\) with \(U \subseteq \mathbb{R}^n\) is harmonic on \(U\) if it is a solution to the Laplace equation, that is, \(\nabla^2 g = 0\) on \(U\text{,}\) where \(\nabla^2 = \sum_{i=1}^n \frac{\partial^2}{\partial x_i^2}\text{.}\) Use Green's first identity to show that if \(g\) is harmonic on \(U\text{,}\) and \(E \subset U\) (with \(E\) and \(\partial E\) as usual), then

\begin{equation*} \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1} = 0. \end{equation*}
Solution.

We consider Green's identity with the constant function \(f=1\text{.}\) It reads:

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}} \nabla^2 g\ dV_n= \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1} - \underbrace{\int \cdots \int_E}_{\text{$n$ times}}( \boldsymbol{\nabla} (1) \cdot \boldsymbol{\nabla} g)\ dV_{n}. \end{equation*}

But \(\boldsymbol{\nabla}(1) = 0\text{,}\) since the gradient of a constant function necessarily vanishes. Furthermore, since we assume that \(g\) is harmonic, we know that \(\nabla^2 g = 0\text{.}\) Therefore we conclude that

\begin{equation*} \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1}=0. \end{equation*}

2.

As in the previous exercise, let \(g\) be a harmonic function on \(U \subseteq \mathbb{R}^n\text{,}\) with \(E \subset U\text{.}\) Use Green's first identity to show that if \(g = 0\) on the boundary space \(\partial E\) (with \(E\) and \(\partial E\) as usual), then

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}} |\boldsymbol{\nabla} g |^2 \ dV_{n} = 0. \end{equation*}
Solution.

We consider Green's first identity again, but now with \(f=g\text{.}\) It reads:

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}}g \nabla^2 g\ dV_n= \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} g \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1} - \underbrace{\int \cdots \int_E}_{\text{$n$ times}}( \boldsymbol{\nabla} g \cdot \boldsymbol{\nabla} g)\ dV_{n}. \end{equation*}

We assume that \(g\) is harmonic, that is, \(\nabla^2 g =0\text{.}\) Furthermore, we assume that the function \(g\) vanishes on the boundary surface \(\partial E\text{,}\) therefore the integral

\begin{equation*} \underbrace{\int \cdots \int_{\partial E}}_{\text{$(n-1)$ times}} g \boldsymbol{\nabla} g \cdot \mathbf{n}\ dV_{n-1} \end{equation*}

vanishes, since the integrand is identically zero on the surface \(\partial E\) over which we are integrating. As a result, Green's first identity becomes

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}}( \boldsymbol{\nabla} g \cdot \boldsymbol{\nabla} g)\ dV_{n} = 0. \end{equation*}

But \(\boldsymbol{\nabla} g \cdot \boldsymbol{\nabla} g = |\boldsymbol{\nabla} (g)|^2\text{,}\) and we obtain

\begin{equation*} \underbrace{\int \cdots \int_E}_{\text{$n$ times}} |\boldsymbol{\nabla} g |^2 \ dV_{n} = 0. \end{equation*}