# Dimension of the boundary of a polytope for applying divergence theorem in $\Bbb{R}^n$

Let's use the unit hypercube in $\Bbb{R}^n$ as an example. The unit $n$-cube is formed by the intersection of $2n$ half-spaces, $n$ of them being defined by $x_i \ge 0$ and the other $n$ of them being defined by $x_i \le 1$. I want to use the divergence theorem to calculate the following integral:

$$\int_V \vec{\nabla} \cdot \vec{F} \, \mathrm{d}V = \int_{\partial V} \vec{F} \cdot \hat{n} \, \mathrm{d}S$$

where $V$ is the 'volume' of the $n$-cube and $dS$ denotes an integral over the 'surface,' its boundary. My question is this:

What dimension is the boundary, $\partial V$?

Here's my attempt at answering it:

Since we are evaluating an $n$-polytope, every facet (of dimension $n-1$), is determined by the polytope's intersection with a supporting hyperplane. In our example, this region is where the weak inequality constraint imposed by one half-space now holds with equality. Put another way, the hyperplane is the $(n-1)$ dimensional set where $x_i = 1$ or $x_i = 0$. As a result, the boundary is given by the union of these facets, and so is $(n-1)$-dimensional.

The only reason I ask the question is my initial intuition was that the boundary was the collection of all $2$-faces of the polytope, because it is often said that 'the boundary of the boundary is empty'. However, the divergence operator only reduces the dimensionality by one, so it seems more reasonable to have an $(n-1)$-dimensional boundary. Does this then mean that the boundary has its own, non-empty, $(n-2)$-dimensional boundary?

Substantial Edit:

To summarize answers, I am being told that repeated application of the divergence theorem will lead to things canceling in such a way that the integral will be zero. I believe there may be an exception using strategically chosen degenerate vector fields, according to the below example in $\Bbb{R}^3$. Can you show me where this is wrong?

Consider attempting to integrate the function $f(x,y,z) = xyz$ over the domain of $[0,1]^3$. We can evaluate this integral directly as a check: $$\int_0^1 \int_0^1 \int_0^1 xyz \,\mathrm{d}x\mathrm{d}y\mathrm{d}z = \int_0^1 \int_0^1 \frac{1}{2}yz \,\mathrm{d}y\mathrm{d}z = \int_0^1 \frac{1}{4}z \,\mathrm{d}z = \frac{1}{8}.$$

Now for the counterexample. Let $\vec{F} = (\frac{1}{2}x^2 yz,0,0)$ and let $V = [0,1]^3$. Then, $$\iiint_V f(x,y,z) \mathrm{d}V = \iiint_V \vec{\nabla} \cdot \vec{F} \mathrm{d}V = \iint_S \vec{F} \cdot \hat{n} \mathrm{d}S = \sum_{i=1}^6 \iint_{S_i} \vec{F} \cdot \hat{n}_i \mathrm{d}S$$ where $i$ denotes each face of the cube, $S_i$. The faces are described as follows: $$S_1: x = 0, S_2: y = 0, S_3: z = 0, S_4: x = 1, S_5: y = 1, S_6: z = 1.$$

The normal vectors are given by, e.g., $(-1,0,0)$ for $S_1$ and $(1,0,0)$ for $S_4$. Since $\vec{F}$ is zero outside the first element, all but $S_1$ and $S_4$ are zeroed out, so we obtain: $$\sum_{i=1}^6 \iint_{S_i} \vec{F} \cdot \hat{n}_i \mathrm{d}S = - \iint_{S_1} \frac{1}x^2 y z \mathrm{d}S + \iint_{S_4} \frac{1}x^2 y z \mathrm{d}S.$$

Here is the trick: in order to apply the divergence theorem again, we cannot generate a new vector field by integrating w.r.t. $x$. However, we can do so with respect to $y$ and things will not cancel. Let $\hat{G} = (0, \frac{1}{4}x^2 y^2 z, 0)$. Then for each face,

$$\iint_{S_i} \vec{\nabla}\cdot\vec{G} \mathrm{d}S = \oint_{C} \vec{G} \cdot \hat{n}_C \mathrm{d}\vec{r} = \sum_{j = 1}^4 \int_{e_j} \vec{G} \cdot \hat{n}_j \mathrm{d}\vec{r}.$$

The edges, $e_i$, are now given by $e_1: y = 0, e_2: z = 0, e_3: y = 1, e_4: z = 1$, and the normal vectors are, e.g., $\hat{n}_1 = (0,-1,0), \hat{n}_3 = (0,1,0)$. Once again, since $\vec{G}$ is zero outside the second element, we obtain:

$$\sum_{j = 1}^4 \int_{e_j} \vec{G} \cdot \hat{n}_j \mathrm{d}\vec{r} = - \int_{e_1} \frac{1}{4}x^2 y^2 z \mathrm{d}\vec{r} + \int_{e_3} \frac{1}{4}x^2 y^2 z \mathrm{d}\vec{r} = - \int_{e_1} \frac{1}{4}x^2 y^2 z \mathrm{d}z + \int_{e_3} \frac{1}{4}x^2 y^2 z \mathrm{d}z.$$ because the path of integration for these edges is with respect to $z$ only.

To summarize, we now have: $$\iiint_V f(x,y,z) \mathrm{d}V = -\left( \left( - \int_{e_1} \frac{1}{4}x^2 y^2 z \mathrm{d}z \right)_{y=0} + \left(\int_{e_3} \frac{1}{4}x^2 y^2 z \mathrm{d}z \right)_{y=1} \right)_{x=0} + \left( \left( - \int_{e_1} \frac{1}{4}x^2 y^2 z \mathrm{d}z \right)_{y=0} + \left(\int_{e_3} \frac{1}{4}x^2 y^2 z \mathrm{d}z \right)_{y=1} \right)_{x=1}$$

where each edge then goes from $z=0$ to $z=1$ using the same logical process as before. Everything goes to zero except the last term, so:

$$\iiint_V f(x,y,z) \mathrm{d}V = \int_0^1 \frac{1}{4}(1)^2 (1)^2 z \mathrm{d}z = \frac{1}{8}.$$

Sorry this is so long, but I feel it does represent a legitimate counterexample. Any ideas? Basically, I am not arguing that this works in the general case, just that there may exist specific polytopes and functions for which it works.

• FWIW, I know this example is not really integrating a vector field, and it is also trivial. My actual application is less trivial but I want to make sure that the method is sound as presented without asking you all to do my actual work for me! :) – user1166202 Jan 1 '14 at 19:18

The boundary of your $n$-dimensional cube is indeed $(n-1)$-dimensional. As you said, in a comment, each of the $2n$ facets of your cube has a nonempty, $(n-2)$-dimensional boundary; that consists of $2(n-1)$ cubes (all of dimension $n-2$). But each of these $(n-2)$-dimensional cubes $X$ is part of the boundary of two facets of your original cube, which fit together so that $X$ is not on the boundary of the boundary of the original cube.

If this is hard to imagine in $n$ dimensions, look at the case $n=2$. You have a square $S$, whose boundary $B$ consists of $4$ edges. Each of those edges has two endpoints, at two of the corners of $S$. But each corner is an endpoint of two edges, and does not contribute to the boundary of $B$. Indeed, $B$ is one single, continuous, closed curve, and it has no boundary.

You might similarly consider the next case, $n=3$, where you can still see what's going on (as opposed to higher, unvisualizable dimensions).

Also, note that the principle "boundary of boundary is $0$" refers to the chain complex notion of boundary, not the topological notion (closure minus interior) which depends on the ambient space.

• I explicitly consider $n=3$ in substantial edits to the original question... and I believe I have a counterexample. Thoughts? – user1166202 Jan 1 '14 at 19:05
• @user1166202 I don't see much of a connection between your substantial edit, which is all about integrals, and my answer, which didn't mention integrals. If you were to take a single vector field, integrate it over the boundaries of all $6$ faces, and add the results, you'd get $0$. If, instead, you integrate a vector field over the boundary of just one face, as you did with $\vec G$, there's no reason to expect an answer of $0$. – Andreas Blass Jan 1 '14 at 20:52
• I guess I just thought the integration procedure was evidence that the boundary of the boundary can still produce an integral in a meaningful way. Clearly, I missed the general point. Thank you for this insight! – user1166202 Jan 2 '14 at 4:04

Yes, the boundary of an $n$-dimensional object has dimension $n-1$. In your example, it is the union of the $(n-1)$-dimensional faces indeed.

But sometimes an object has no boundary at all (a circle, the surface of a sphere, the surface of a torus...). In particular, "the boundary of the boundary" is always empty indeed (including the boundary of your polytope, it has no boundary).

• So the boundary of my polytope has no boundary, but the following question arises... if I am integrating over all the facets, this is the sum of the integrals over each facet. These clearly do have boundaries, right? I mean, essentially, each $(n-1)$-dimensional facet is just an $(n-1)$-cube. If this reasoning is not correct, can you tell me precisely how? – user1166202 Jan 1 '14 at 17:12
• Yes, each facet has a boundary. But the union of them has no boundary. If you use somehow a Green-type integration formula again on the facets and their boundaries, the integrals over the boundaries of the facets will cancel. – Seub Jan 1 '14 at 17:56
• Please see my edits. I believe I may have found a very specific counterexample. – user1166202 Jan 1 '14 at 19:05

Perhaps you should check "integration over chains" (eg Spivak´s book). Indeed, the faces of a cube are lower dimensional cubes, which have boundaries, but their orientation is defined in such a way that their boundaries cancel out.

• I will. Thank you for this. Please see my edit above re: a potential counterexample. Is this related to what you mean by 'integration over chains'? – user1166202 Jan 1 '14 at 19:07