# Integration of Dirac delta over finite interval

I'm trying to compute two integrals involving the Dirac delta, namely \begin{align} I_1&=\int^{1}_0\!\!\!\! dx_1\!\cdots\!\int^{1}_0\!\!\!\! dx_{8}\,\delta(x_1-x_2+x_3-x_4+x_5-x_6+x_7-x_8)\,,\\ I_2&=\int^{1}_0\!\!\!\! dx_1\!\cdots\!\int^{1}_0\!\!\!\! dx_{8}\,\delta(x_1-x_2+x_4-x_5)\delta(x_3-x_4+x_6-x_7)\,\delta(x_5-x_6+x_8-x_1)\,, \end{align} but I don't seem to have the right approach. I try to do case differentiations to find the individual contributions, but I havne't made much progress this way.

Is there a systematic method to evaluate such integrals? I also tried to evaluate them in Mathematica, but I didn't succeed with getting the exact fraction - however, I could approximate the integrals numerically and found $I_1\approx .50\pm.02$ and $I_2\approx .38\pm.02$.

I'd be happy about any suggestions!

• How do you integrate a form of degree $8$ (I mean $dx_1\dots dx_8$) over an interval? – Warlock of Firetop Mountain May 19 '18 at 8:02
• It's shorthand notation for the $8$-dimensional square $[0,1]^8$... – LFH May 19 '18 at 8:47

If one accepts the nth antiderivative of Dirac delta as $$\int^{(n)}\delta(x-a)(dx)^n=x^{n-1}H(x-a)$$ the first integral can be done by (tediously) applying the fundamental theorem of calculus eight times.
Set $$x_{2 k} = 1 - x_{2 k}$$, then $$I_1 = \int_{[0, 1]^7} [0 < 4 - x_1 - \ldots - x_7 < 1 ] \, dx_1 \cdots dx_7 = \\ \int_{[0, 1]^7} \big[ \hspace {1px} \lfloor x_1 + \ldots + x_7 \rfloor = 3 \hspace {1px} \big] \, dx_1 \cdots dx_7 = \frac {A(7, 3)} {7!} = \frac {151} {315},$$ where $$A(7, 3)$$ is the Eulerian number.
For the second integral, $$I_2 = \int_{[0, 1]^5} [0 < x_4 - x_6 + x_7 < 1 \land 0 < x_4 - x_6 + x_8 < 1 \land \\ 0 < x_5 - x_6 + x_8 < 1] \, dx_4 \cdots dx_8,$$ which can be brute-forced to give $$I_2 = 11/30$$.