Suppose we have a unit cube (side=1) and a plane with equation $x+y+z=\alpha$. I'd like to compute the volume of the region that results once the plane sections the cube (above the plane). There are three cases to analyze, and I can't quite visualize one of them.
Case 1: $0 \le \alpha < 1$
In this case, the section looks like a triangle, and the volume of interest is 1 minus the volume of the lower left tetrahedron, i.e., $$V = 1 – \int_0^\alpha \int_0^{\alpha-x} \int_0^{\alpha-x-y} dz\,dy\,dx = 1 – \frac{\alpha^3}{6}.$$
Case 3: $2 < \alpha \le 3$.
Here, the section is again a triangle, and the volume of interest is the upper right tetrahedron, i.e., $$V = \int_{\alpha-2}^1 \int_{\alpha-x-1}^1 \int_{\alpha-x-y}^1 dz\,dy\,dx = \frac{(3-\alpha)^3}{6}.$$
Case 2: $1 \le \alpha \le 2$.
This is where I'm sort of stuck. The section is a hexagon, with one of the inequalities being $\alpha-x-y \le z \le 1$, hence the innermost integral should be $\int_{\alpha-x-y}^1 dz$. The projection of the hexagon slice onto the $xy$-plane is described by $y \ge \alpha-1-x$ and $y \le \alpha-x$. Hence, the area of the hexagon projection is $$ A = \int_0^{\alpha-1} \int_{\alpha-x-1}^1 dy\,dx + \int_{\alpha-1}^1 \int_0^{\alpha-x} dy\,dx$$
Question: When I move from $A$ to $V$ am I allowed to distribute the innermost integral between the summing terms, i.e. is it correct to write $$V = \int_0^{\alpha-1} \int_{\alpha-x-1}^1 \int_{\alpha-x-y}^1 dz\,dy\,dx + \int_{\alpha-1}^1 \int_0^{\alpha-x} \int_{\alpha-x-y}^1 dz\,dy\,dx \quad ??$$
If not, what's the approach?
Note that there's a neat connection between this problem and figuring out the CDF of a sum of a random variable that has triangular distribution with support on $[0,2]$ and a random variable with uniform distribution on $[0,1]$ (assuming independence). Hence, I know what the answer should be for Case 2 because I worked out the convolution, but I just want to figure out the answer geometrically as well.
Best Answer
For $1 \le \alpha \le 2$, it is much easier to visualize the integral by subtracting instead of adding pieces of the volume.
As shown in the picture below, when $1 \le \alpha \le 2$, the volume of cube section below intersection of the plane $x + y + z = \alpha$ is the difference of the volume of one big tetrahedron with width/height/depth $= \alpha$ with three smaller ones with width/height/depth $= \alpha-1$. So the volume above the intersection becomes
$$1 - \left( \frac16 \alpha^3 - 3 ( \frac16 (\alpha-1)^3 )\right) = 1 - \frac16 \alpha^3 + \frac12 (\alpha-1)^3$$
Update
About the question whether this argument can be extended to higher dimension, the answer is yes. Let's look at the 3-dimension $2 \le \alpha \le 3$ case first.
As one increases $\alpha$ beyond $2$, the three tetrahedron in first figure start overlap. As shown in second figure, the intersection of the three tetrahedra are now three even smaller tetrahedra of width/height/depth = $\alpha -2$.
Previous way to compute the "volume" of cube section below the plane $x + y + z = \alpha$ now subtract too much from this three even smaller tetrahedron. One need to add them back. As a result, the volume above the plane becomes:
$$\begin{align}&1 - \left( \frac16 \alpha^3 - 3(\frac16 (\alpha-1)^3 + 3(\frac16 (\alpha-2)^3 \right)\\ = & 1 - \frac16 \alpha^3 + \frac12 (\alpha-1)^3 - \frac12 (\alpha-2)^3\\ = & \frac{(3-\alpha)^3}{6} \end{align}$$
Let us switch to the $k$-dimension case. To compute the "volume" of the hypercube section above the hyperplane $x_1 + \ldots + x_k = \alpha$, the first step is to subtract the volume of a $k$-simplex of size $\alpha$ from 1.
Repeat these arguments and notice in the middle of the process, we need to either add or subtract the volumes of $\binom{k}{i}$ $\;k$-simplices of size $\alpha-i$. The "volume" of interest finally becomes:
$$1 -\sum_{i=0}^{\lfloor \alpha \rfloor} (-1)^i \binom{k}{i} \frac{(\alpha-i)^k}{k!}$$