# Integrate: $\int_0^1 \mathrm{d}x_1 \int_0^1 \mathrm{d}x_2 \ldots \int_0^1 \mathrm{d}x_n \delta\left( \sum_{i=1}^n k_i x_i \right)$

Is there a closed form formula for this integral:

$$\int_0^1 \mathrm{d}x_1 \int_0^1 \mathrm{d}x_2 \ldots \int_0^1 \mathrm{d}x_n \delta\left( \sum_{i=1}^n k_i x_i \right)$$

where $\delta(x)$ is the Dirac delta function, and the $k_i$ are real numbers.

Here's how far I've got. Doing the integral on $k_n$ gives:

$$\frac{1}{|k_n|}\int_0^1 \mathrm{d}x_1 \int_0^1 \mathrm{d}x_2 \ldots \int_0^1 \mathrm{d}x_{n-1} \left[0\leq -\frac{1}{k_n}\sum_{i=1}^{n-1} k_i x_i \leq 1 \right]$$

where the brackets are Iverson brackets:

$$\left[P\right]= \begin{cases} 1 & \text{if }P\text{ is true }\\ 0 & \text{otherwise} \end{cases}$$

From here, I could calculate the appropriate limits of integration of $x_{n-1}$. But that seems like too much work, and I am not sure that I will get a closed form formula eventually as I keep going to $x_{n-2}$ and so on. I wonder if there is a simpler approach...

• Similar integrals (Dirichlt integrals) are dealt with in Jeffreys, Harold, and Bertha Jeffreys. Methods of mathematical physics. Cambridge university press, 1999., Sec. 15.08. – becko Jan 5 '18 at 16:48

$\delta(x)$ is not really a function in classical sense. For the purpose of deriving an expression without involving the concept of distribution, we will treat it as some sort of derivative of a step function. Assume all $k_i \ne 0$, let

$$\lambda_i = |k_i|,\quad y_i = \begin{cases}x_i,& k_i > 0\\1-x_i,& k_i < 0\end{cases}, \quad K = \left|\prod_{i=1}^n k_i \right| \quad\text{ and }\quad L = \sum_{k_i < 0} |k_i|$$

We have $$\delta\left( \sum_{i=1}^n k_i x_i \right) = \delta\left(\sum_{i=1}^n\lambda_i y_i - L\right) = \frac{d}{dL} \theta\left(L - \sum_{i=1}^n\lambda_i y_i\right)$$ where $\quad \displaystyle \theta(x) = \begin{cases} 1, &x > 0\\0, & x \le 0\end{cases}\quad$ is the step function. We can evaluate the integral as

\begin{align}\mathcal{I} =& \frac{d}{dL} \left[ \int_0^1 dy_1 \cdots \int_0^1 dy_n \theta\left( L - \sum_{i=1}^n \lambda_i y_i\right) \right]\\ =& \frac{d}{dL} \left[ \left( \int_0^\infty - \int_1^\infty \right) dy_1 \cdots \left( \int_0^\infty - \int_1^\infty \right) dy_n \theta\left( L - \sum_{i=1}^n \lambda_i y_i\right) \right]\\ =& \frac{d}{dL} \left[ \int_0^\infty dy_1 \cdots \int_0^\infty dy_n \sum_{0\le \epsilon_1, \ldots, \epsilon_n \le 1 } (-1)^{\sum_{i=1}^n \epsilon_i} \theta\left( \left(L - \sum_{i=1}^n\lambda_i\epsilon_i\right) - \sum_{i=1}^n \lambda_i y_i\right) \right] \end{align}

Notice the integral

$$\int_0^\infty dy_1\cdots\int_0^\infty dy_n \theta\left( X - \sum_{i=1}^n \lambda_i y_i\right)$$ is the volume of a simplex and equal to $\begin{cases}\frac{X^n}{n!K},& X > 0\\ \\0, &\text{otherwise}\end{cases}$, we have

\begin{align}\mathcal{I} =& \frac{1}{n!K} \frac{d}{dL} \left[ \sum_{0\le \epsilon_1, \ldots, \epsilon_n \le 1 } (-1)^{\sum_{i=1}^n \epsilon_i} \left(L - \sum_{i=1}^n\lambda_i\epsilon_i\right)^n \right]\\ =& \frac{1}{(n-1)!K} \sum_{0\le \epsilon_1, \ldots, \epsilon_n \le 1 } (-1)^{\sum_{i=1}^n\epsilon_i} \left(L - \sum_{i=1}^n\lambda_i\epsilon_i\right)^{n-1}\\ =& \frac{1}{(n-1)!K} \sum_{\stackrel{0\le \epsilon_1,\ldots,\epsilon_n \le 1;}{L - \sum_{i=1}^n \lambda_i\epsilon_i > 0} } (-1)^{\sum_{i=1}^n\epsilon_i} \left(L - \sum_{i=1}^n\lambda_i\epsilon_i\right)^{n-1} \end{align} A the end, $\mathcal{I}$ is a sum of polynomials of the form $\left(L - \text{ ???}\right)^{n-1}$ and the sum only runs over those $???$ which is smaller than $L$.

• The $\epsilon$ variables only take the values 0 and 1? They are not allowed to take fractional values in between, right? – becko Dec 18 '13 at 0:07
• @becko, right, the $\epsilon$ variables only take the values 0 or 1. – achille hui Dec 18 '13 at 6:13

$\newcommand{\+}{^{\dagger}}% \newcommand{\angles}[1]{\left\langle #1 \right\rangle}% \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}% \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}% \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}% \newcommand{\dd}{{\rm d}}% \newcommand{\ds}[1]{\displaystyle{#1}}% \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}% \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}% \newcommand{\fermi}{\,{\rm f}}% \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}% \newcommand{\half}{{1 \over 2}}% \newcommand{\ic}{{\rm i}}% \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow}% \newcommand{\isdiv}{\,\left.\right\vert\,}% \newcommand{\ket}[1]{\left\vert #1\right\rangle}% \newcommand{\ol}[1]{\overline{#1}}% \newcommand{\pars}[1]{\left( #1 \right)}% \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}}% \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}% \newcommand{\sech}{\,{\rm sech}}% \newcommand{\sgn}{\,{\rm sgn}}% \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}}% \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ \begin{align} &\color{#0000ff}{\large\int_{0}^{1}\dd x_{1}\int_{0}^{1}\dd x_{2}\ldots\int_{0}^{1}\dd x_{n}\,\delta\pars{\sum_{i = 1}^{n}k_{i}x_{i}}} \\[3mm]&=\int_{0}^{1}\dd x_{1}\int_{0}^{1}\dd x_{2}\ldots\int_{0}^{1}\dd x_{n} \int_{-\infty}^{\infty}\expo{\ic q\sum_{i = 1}^{n} k_{i}x_{i}}\,{\dd q \over 2\pi} \\[3mm]&= \int_{-\infty}^{\infty}{\dd q \over 2\pi}\prod_{i = 1}^{n}\int_{0}^{1} \expo{\ic qk_{i}x_{i}}\,\dd x_{i} = \int_{-\infty}^{\infty}{\dd q \over 2\pi}\prod_{i = 1}^{n} {\expo{\ic qk_{i}} - 1 \over \ic qk_{i}} = \int_{-\infty}^{\infty}{\dd q \over 2\pi}\prod_{i = 1}^{n} \expo{\ic qk_{i}/2}\,{2\ic\sin\pars{qk_{i}/2} \over \ic qk_{i}} \\[3mm]&=\color{#0000ff}{\large% {2^{n - 1} \over \pi}\int_{-\infty}^{\infty}{\dd q \over q^{n}}\prod_{i = 1}^{n} {\expo{\ic qk_{i}/2}\sin\pars{qk_{i}/2} \over k_{i}}} \end{align} I don't see any further reduction unless we know something else about the $\braces{k_{i}}$.

• +1 Very nice! This reduces an $n$ variable integration to a single integration. It's not a closed formula, but at least is now numerically tractable. – becko Dec 18 '13 at 13:16
• Every integral from the second line on is divergent. – Did Jan 20 '14 at 18:37
• Understood in the sense of an oscillatory integral, right? en.wikipedia.org/wiki/Oscillatory_integral – Calvin Khor Jan 5 '18 at 15:42
• @CalvinKhor They seem related. My expression is useful whenever you want to get an asymptotic expression as $n \to \infty$. – Felix Marin Jan 5 '18 at 17:31
• For large $n$ this can probably be simplified more by the method of steepest descents? – becko Dec 4 '18 at 17:07

The integral looks like it's related to box splines. The idea of box splines is to express b-spline basis functions as areas of planar slices of hypercubes. John's comment has a good explanation of the quadratic case. As he said, you get a piecewise quadratic function which is (I think) a b-spline basis function. Look up box splines. You'll find papers by Carl deBoor, among others. The Wikipedia page here looks like a good introduction, and it has a long list of references.

Perhaps it's best to just look at what the integral expresses: does the image of the unit cube under the map $(x_1, \ldots, x_n) \mapsto \sum_i k_i x_k$ miss the origin (the answer is zero), or hit the origin, in which case the answer is the measure of the preimage of the origin under this map, i.e., the size of a certain hyperplane slice of the unit cube.

Sizes of slices of cubes are closely related to B-splines, so you might find that the resulting value is something related to the value (at the origin?) of some uniform B-spline whose control values are the $k_i$s, but the expression for that value is typically given recursively (by something like the deBoor algorithm), which isn't a "closed form" formula.

• The integral expresses the "volume" of the intersection of the hypercube $[0,1]^n$ with the hyperplane $\mathbf{x}\cdot\mathbf{k} = 0$.... Where can I find more information about the relation of B-splines to the measure of slices of cubes? – becko Dec 17 '13 at 19:01
• I have no idea. I picked it up on the streets. The main idea is this: Slice a unit cube with a plane perpendicular to the (0,0,0) to (1,1,1) axis. As you move from the plane hitting the origin only, to hitting three verts, the area of the slices grows like $t^2$, where $t$ is distance along the diagonal axis. Then you move more, towards hitting the next 3 verts, and the area rises and then falls, sort of like the graph of $1 - t^2$ between $-1/2$ and $1/2$. Then as you move towards (1,1,1), it falls off quadratically. You've built a 3-part piecewise quadratic curve that's $C^1$. Generalize. :) – John Hughes Dec 17 '13 at 23:02