For any $n \geq 2$, let $$D_n [r , (a_1, b_1 ) , \ldots , (a_n, b_n) ] = \{ (x_1 , \ldots , x_n ) \in \mathbb R^n \mid \sum_i x_i = r \mbox{ and } b_i \geq x_i \geq a_i \, \forall i \},$$ where $r \geq b_i \geq a_i \geq 0$ for all $i$, and all are real numbers.

Question: What is the 'volume' of $D_n [r , (a_1, b_1 ) , \ldots , (a_n, b_n) ]$?

So for example for $n=2$, this set is either empty or it is some short line, and the purpose would be to calculate the length of that line (in terms of the parameters $r, a_i, b_i$). This is easy, I've done that already. Also the case $n=3$ would in principle still be doable to do by hand: it would be either zero (in case the set is empty) or part of a plane in $\mathbb R^3$, the area of which we desire to compute.

Now to come up with a formula for the case $n=3$ (and higher) in a smarter way, my idea was to reason inductively from the case $n=2$, so basically reducing the three dimensional case to the two dimensional one, etc. I obviously tried to use integrals.

The problem I run into, is that in order to compute the volume we want with integrals, we have to view this set as (a subset of) an $n-1$-dimensional space. (Indeed, the integral of the constant function $1$ over the region $D_n [r , (a_1, b_1 ) , \ldots , (a_n, b_n) ]$ *seen as part of $\mathbb R^n$* (rather than $\mathbb R^{n-1}$), is equal to $0$. That's not what we want.) But to do that, it seems to me that we would need a concrete isometric embedding of $D_n [r , (a_1, b_1 ) , \ldots , (a_n, b_n) ]$ into $\mathbb R^{n-1}$, and I can't really find a nice one.

Do you have an idea about how to approach this problem best?

(This question was previously posted on Math.StackExchange, see https://math.stackexchange.com/questions/3135606/computing-hyper-area-of-a-contrained-simplex.)