hypervolume under the square of an n-simplex I posted this question at math.stackexchange.com, reformulated and posted again both times without much luck. I also asked a math professor at my uni who suggested I post it here. Hopefully, it is appropriate for this site.
Question: What is the general form of the equation that gives the hypervolume under the square of an $n$-simplex in an $n+1$ dimensional space? The equation should be in terms of the area of the projection of the simplex and the distance between the vertices of the simplex and its projection.
I think an example and some figures would help.
2-D Case
In the figure, we have a 1-simplex.  The projection of the simplex is $S=(x_{i},x_{i+1})$. The distances between the vertices of the simplex and its projection are $e_{i}$, and $e_{i+1}$.
If the distance between the simplex and a point $p$ on its projection is $d(p)$  ( so that $d(x_{i})=e_{i}$), then the hypervolume of the square distance under the simplex (area in the 2d case) is$$
V=\int_{p \epsilon S} d(p)^2 dS ,
$$
If we shift everything so that $x_{i}$ is at the origin then$$
V=\frac{|S|}{3}[e_{i}^2 + e_{i+1}^2 + e_{i}e_{i+1}]
$$
where $|S|$ is the hypervolume (length in the 2d case) of $S$

3-D Case
Again, the projection of the simplex is $S=(x_{i,j},x_{i+1,j},x_{i,j+1})$ and the distance between the vertices of the simplex and its projection are $e_{i,j}, e_{i+1,j}$, and $e_{i,j+1}$
The hypervolume of the square distance between the simplex and its projection is$$
V=\int\int_{p \epsilon S} d(p)^2 dS ,
$$
where $d(p)$ is the vertical distance between the simplex and a point $p$ on its projection (so that $d(x_{i,j+1})=e_{i,j+1}$). Again, if we shift $x_{i,j}$ to the origin (and possibly some other transformations, I'm not sure) $$
V=\frac{|S|}{6}[e_{i,j}^2 + e_{i+1,j}^2 + e_{i,j+1}^2 + e_{i,j}e_{i+1,j}+ e_{i,j}e_{i,j+1} + e_{i+1,j}e_{i,j+1}]
$$
Again $|S|$ is the hypervolume (area in the 3d case) of the simplex projection.

I got the last equation from this paper but it doesn't say how they derived it. So my question is how to generalize equation for $V$ to the $n$-D case? 
Any suggestions on where to look are much appreciated. 
Thanks
 A: I am too lazy to do this but I am quite sure that this result will follow from the following (using Fubini's theorem):

*

*Notice that $[(1-s)e_1 + se_2$, $(1-s)e_1 + se_3]$ are the heights of the endpints of the simplex $[(1-s)x_1 + sx_2$, $(1-s)x_1 + sx_3]$ which is parallel to the simplex defined by $[x_2$, $x_3]$.


*Notice that, using the result for 1D simplices, the integral we want will therefore be given by:
$ \int_o^1 s\frac{|V|}{3} ( ((1-s)e_1 + se_2)^2 + $
$\hspace{1.5in}((1-s)e_1 + se_3)^2 + ((1-s)e_1 + se_2)((1-s)e_1 + se_3)) ds$
where $|V|$ is the volume of the simplex $[x_2$, $x_3]$.


*Now we need to correct for the (usually) incorrect scale, implicit in the integration: Even though we integrated over parallel simplices, the integration assumes that the distance from $x_1$ to $[x_2$, $x_3]$ is one. Notice that if we try to calculate $|S|$ the volume of the simplex $[x_1,x_2,x_3]$ in the same way, we are off by the same factor. But that calculation yields $\frac{|V|}{2}$. so we need to correct by a factor $\frac{2|S|}{|V|}$.


*Therefore we will get:
$ \frac{2|S|}{3}\int_o^1 s( ((1-s)e_1 + se_2)^2 + $
$\hspace{1.5in}((1-s)e_1 + se_3)^2 + ((1-s)e_1 + se_2)((1-s)e_1 + se_3)) ds$

Note that this works in any dimension to give us the $n+1$-th case from the $n$-th case.
