# Multidimensional integral involving delta functions

The question is to compute the following multidimensional integral:

$$\omega^{(T)}({\bf c}) := \int\limits_{{\mathbb R}^{2 T}} \delta\left( c_{1,1} - \sum\limits_{j=1}^T x_{1,j}^2 \right) \delta\left( c_{2,2} - \sum\limits_{j=1}^T x_{2,j}^2 \right) \delta\left( c_{1,2} - \sum\limits_{j=1}^T x_{1,j} x_{2,j} \right) \prod\limits_{j=1}^T d x_{1,j} d x_{2,j}$$

This is the density of states'' of the estimator of covariances in a random matrix ensemble. Using the definition of delta function and elementary integration I have checked that :

\begin{eqnarray} \omega^{(1)}({\bf c}) &=& \delta\left(\det(c)\right) \\ \omega^{(2)}({\bf c}) &=& \pi (\det(c))^{-1/2} \\ \omega^{(3)}({\bf c}) &=& \pi^2 1_{\det(c) >0} \\ \omega^{(4)}({\bf c}) &=& \pi^3 \left(\det(c)\right)^{1/2} \end{eqnarray}

where $${\bf c} := \left(\begin{array}{cc} c_{1,1} & c_{1,2} \\ c_{1,2} & c_{2,2} \end{array} \right)$$

The question is what is the result for generic values of $T$. I suspect that the result depends only on the determinant of the matrix ${\bf c}$.

-
Is the fourth case you checked supposed to be for $T=3$ or for $T=4$? –  Semiclassical Aug 15 '14 at 18:39
Sorry, there was a typo. Of course the bottom case is related to T=4. In general the result goes like det(c)^(T/2-3/2). i will try to demonstrate it today. –  Przemo Aug 18 '14 at 9:37

To simplify our task, note that WLOG we can choose the coordinates to set $c_{11},c_{22}$ to unity. (The overall dimensionful factor lost by this redefinition will be dealt with at the end of the calculation.) This renders the first two $\delta$-functions as $$\delta(1-\mathbf{x}_1^2)\delta(1-\mathbf{x}_2^2)=\frac{1}{4}\delta(1-\Vert\mathbf{x}_1\Vert)\delta(1-\Vert\mathbf{x}_2\Vert).$$ We furthermore may take the third constraint to be $\cos\Theta=\mathbf{x}_1\cdot\mathbf{x}_2=\cos\theta_{12}$ where $\theta_{12}$ is the angle between the two vectors in $\mathbb{R}^T$. This conveniently expresses the determinant as $1-\cos^2\Theta = \sin^2\Theta$. Integrating out the first two $\delta$-functions, we may write our integral of interest as

$$\Omega^{(T)}(\Theta):=\frac{\omega^{(T)}(\Theta))}{V(S_{T-1}}= \frac{1}{4V(S_{T-1})}\int\!\!\!\int_{R} \delta\left(\cos\Theta-\cos\theta_{12}\right)\,d\Omega_1 \,d\Omega_2$$ where $R=S_{T-1}\times S_{T-1}$.

The switch to $\Omega$ may seem superfluous. But we may take the coordinates of $\mathbf{x_2}$ to have $\mathbf{x_1}$ as its azimuthal axis so that the constraint is simply $\cos\Theta=\cos\theta_2$. Then the integration over $x_1$ simply gives as an overall factor the volume of $S_{n-1}$ and we may write

$$\Omega^{(T)}(\Theta)=\frac{1}{4}\int_{S_{T-1}} \delta(\cos\Theta-\cos\theta)\,d\Omega$$ where we have dropped the now-superfluous subscript.

To evaluate this integral, we reintroduce the $r$-integration to return to an integral over $\mathbb{R}^n$ i.e.

\begin{align} \frac{1}{4}\int_{\mathbb{R}^n}d^n \! x \, \delta(\cos\Theta-\cos\theta)\delta(1-\Vert \mathbb{x}\Vert) &=\frac{1}{2}\int_{\mathbb{R}^n}d^n\!x \, \delta(\cos\Theta-\cos\theta)\delta(1-\Vert \mathbb{x}\Vert^2)\\ &=\frac{1}{2}\int_{\mathbb{R}^n}d^n\!x \, \delta(\cos\Theta-x_n)\delta(1-\Vert \mathbb{x}\Vert^2) \end{align} where we have taken $\cos\theta$ to denote the $n$-th coordinate restricted to the unit $(n-1)$-sphere. Writing $\mathbf{y}=\mathbf{x}-x_n \hat{e}_n$, we can use the first $\delta$-function to express the second as $$\delta(1-\Vert \mathbb{x}\Vert^2)=\delta(1-x_n^2- \Vert \mathbb{y}\Vert^2)=\delta(1-\cos^2\theta-\Vert \mathbb{y}\Vert^2)=\delta(\sin^2\Theta-\Vert \mathbb{y}\Vert^2)$$ We can thus integrate out the $n$-th coordinate entirely to obtain

$$\frac{1}{2}\int_{\mathbb{R}^{n-1}}d^{n-1}\!x \, \delta(\sin^2\Theta-\Vert \mathbb{x}\Vert^2) =\frac{1}{4|\sin\Theta|}\int_{\mathbb{R}^{n-1}}d^{n-1}\!x \, \delta(|\sin\Theta|-\Vert \mathbb{x}\Vert)=\frac{1}{4}V(S_{n-2})|\sin\Theta|^{n-2}$$ from which we conclude that $\omega^{(T)}(\Theta)=\frac{1}{4}|\sin\Theta|^{n-2}V(S_{n-1})V(S_{n-2})$. All that remains is to express this in terms of $\det(\mathbf{c})$ and restore the overall constants lost in setting $c_{11}=c_{22}=1$...

-
@Przemo: Can you check your calculation of the $T=2$ case, actually? Doing it directly by hand is giving me the answer I found above. –  Semiclassical Aug 19 '14 at 15:47
I show the calculations for $T=2$ below. I think they are correct. .. –  Przemo Aug 19 '14 at 17:14
There is a typo in the last equation in your answer.The middle integral is a surface of a sphere of radius $|\sin(\Theta)|$ in $n-1$ dimensions. Including the denominator the final result is $\omega^{(T)}(\Theta) = \frac{1}{4} |\sin(\Theta)|^{n-3} V(S_{n-1}) V(S_{n-2})$ at $n=T$. Here by $V(S_{n-1})$ you mean the surface of a unit sphere in $n$ dimensions. Now the normalization factor is just $\left(\sqrt{c_{1,1} c_{2,2}}\right)^{T-3}$. Bringing all this together we get $\omega^{(T)}(\Theta) = 2^{T-2} \pi^{T-1}/(T-2)! \left(\det(c)\right)^{(T-3)/2}$ which is half of my result. –  Przemo Oct 7 '14 at 12:57
It is your result that is correct. Mine was too small by a factor of one half. –  Przemo Oct 7 '14 at 12:58

I will present the answer for $T=5$. I hope that it will be clear how to generalize that answer to an arbitrary value of $T$. Let us go a polar coordinates'' in the $2 T$-dimensional space. Therefore we write: $$\left(\begin{array}{c} x_{j,1} \\ x_{j,2} \\ x_{j,3} \\ x_{j,4} \\ x_{j,5} \end{array}\right) = \left( \begin{array}{l} r_j \cos(\theta_1^{(j)}) \cos(\theta_2^{(j)}) \cos(\theta_3^{(j)}) \cos(\phi^{(j)}) \\ r_j \cos(\theta_1^{(j)}) \cos(\theta_2^{(j)}) \cos(\theta_3^{(j)}) \sin(\phi^{(j)}) \\ r_j \cos(\theta_1^{(j)}) \cos(\theta_2^{(j)}) \sin(\theta_3^{(j)}) \\ r_j \cos(\theta_1^{(j)}) \sin(\theta_2^{(j)}) \\ r_j \sin(\theta_1^{(j)}) \end{array} \right)$$ Here $\phi^{(j)} \in \left(0,2\pi\right)$ and $\theta_j^{(1)} \in \left(-\pi/2,\pi/2\right)$ and $j=1,2$. The Jacobian of the transformation is equal to $\prod\limits_{j=1}^2 r_j^{T-1} \cos(\theta_1^{(j)})^3 \cos(\theta_2^{(j)})^2 \cos(\theta_3^{(j)})^1$. Now the integrand reads: \begin{eqnarray} &&\left[\prod\limits_{j=1}^2 r_j^{T-1} \delta\left(c_{j,j} - r_j^2\right)\right] \cdot \left[\prod\limits_{l=1}^{T-2} \cos(\theta_l^{(1)})^{T-l-1} \cos(\theta_l^{(2)})^{T-l-1} \right]\\ && \delta\left(c_{1,2} - r_1 r_2\left( \cos(\phi^{(1)}-\phi^{(2)}) \cdot\prod\limits_{l=1}^{T-2} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)}) +\sum\limits_{p=3}^T \sin(\theta_{T-p+1}^{(1)}) \sin(\theta_{T-p+1}^{(2)}) \cdot \prod\limits_{l=1}^{T-p} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right) \right) \end{eqnarray} Let us integrate over $(\phi^{(1)},\phi^{(2)}) \in (0,2 \pi)^2$ first. The result reads: \begin{eqnarray} \left(2\pi\right) \frac{\prod\limits_{l=1}^{T-2} \cos(\theta_l^{(1)})^{T-l-1} \cos(\theta_l^{(2)})^{T-l-1}} {\sqrt{\left(r_1 r_2\prod\limits_{l=1}^{T-2} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2 - \left(c_{1,2} - r_1 r_2\sum\limits_{p=3}^T \sin(\theta_{T-p+1}^{(1)}) \sin(\theta_{T-p+1}^{(2)}) \cdot \prod\limits_{l=1}^{T-p} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2}} \end{eqnarray} Now we integrate over $\left(\theta_{T-2}^{(1)},\theta_{T-2}^{(2)}\right) \in \left(-\pi/2,\pi/2\right)^2$. This integral is readily done by substituting for sinuses of those angles. We have: \begin{eqnarray} &&\frac{\left(2\pi\right)^2}{r_1 r_2} \cdot \left[\prod\limits_{l=1}^{T-3} \cos(\theta_l^{(1)})^{T-l-2} \cos(\theta_l^{(2)})^{T-l-2}\right] \cdot\\ &&1_{r_1 r_2 \cos(\theta_{T-3}^{(1)} - \theta_{T-3}^{(2)})\prod\limits_{l=1}^{T-4} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})> c_{1,2} - r_1 r_2\sum\limits_{p=5}^T \sin(\theta_{T-p+1}^{(1)}) \sin(\theta_{T-p+1}^{(2)}) \cdot \prod\limits_{l=1}^{T-p} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)}) } \end{eqnarray} Now we integrate over $\left(\theta_{T-3}^{(1)},\theta_{T-3}^{(2)}\right) \in \left(-\pi/2,\pi/2\right)^2$. Again, the integral is readily done by substituting for sinuses of those angles.We have: \begin{eqnarray} \frac{(2 \pi)^2}{(r_1 r_2)^2} \pi \cdot \prod\limits_{l=1}^{T-4} \cos(\theta_l^{(1)})^{T-l-3} \cos(\theta_l^{(2)})^{T-l-3} \cdot \sqrt{ \left(r_1 r_2\prod\limits_{l=1}^{T-4} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2 - \left(c_{1,2} - r_1 r_2\sum\limits_{p=5}^T \sin(\theta_{T-p+1}^{(1)}) \sin(\theta_{T-p+1}^{(2)}) \cdot \prod\limits_{l=1}^{T-p} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2 } \end{eqnarray} now, we finally integrate over $\left(\theta_{T-4}^{(1)},\theta_{T-4}^{(2)}\right) \in \left(-\pi/2,\pi/2\right)^2$. Like in all cases before the integral is readily done by substituting for sinuses of those angles. We have: \begin{eqnarray} \frac{1}{6} \frac{(2 \pi)^4}{(r_1 r_2)^3} \cdot \prod\limits_{l=1}^{T-5} \cos(\theta_l^{(1)})^{T-l-4} \cos(\theta_l^{(2)})^{T-l-4} \cdot \left( \left(r_1 r_2\prod\limits_{l=1}^{T-5} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2 - \left(c_{1,2} - r_1 r_2\sum\limits_{p=6}^T \sin(\theta_{T-p+1}^{(1)}) \sin(\theta_{T-p+1}^{(2)}) \cdot \prod\limits_{l=1}^{T-p} \cos(\theta_l^{(1)}) \cos(\theta_l^{(2)})\right)^2 \right)^1 \end{eqnarray} Since we assumed that $T=5$ the above expression does not depend on any angles anymore and it simply reads: $$\frac{1}{6} \frac{(2 \pi)^4}{(r_1 r_2)^3} \cdot \left((r_1 r_2)^2 - c_{1,2}^2\right)$$ After combining the expression above with the term $\prod\limits_{j=1}^2 r_j^{T-1} \delta\left(c_{j,j} - r_j^2\right)$ and integrating over the radiuses we get: $$\omega^{(5)}({\bf c}) = \frac{2}{3} \pi^4 \det({\bf c})$$ From the derivation above it is clearly seen that the generic result will be: $$\omega^{(T)}({\bf c}) = \frac{2^{T-3}}{(T-2)!} \pi^{T-1} \det({\bf c})^{\frac{T-3}{2}}$$ for $T\ge 3$.

-

Below is the result for $T=2$. We have: \begin{eqnarray} \int\limits_{{\mathcal R}^4} \delta\left(c_{1,1} - x_{1,1}^2 - x_{1,2}^2\right) \delta\left(c_{2,2} - x_{2,1}^2 - x_{2,2}^2\right) \delta\left(c_{1,2} - x_{1,1}x_{2,1} - x_{1,2}x_{2,2}\right) d x_{1,1} d x_{1,2} d x_{2,1} d x_{2,2} = \\ \int\limits_{{\mathcal R}^3} \delta\left(c_{1,1} x_{2,1}^2 - \left({c_{1,2} - x_{1,2} x_{2 2}}\right)^2 - x_{1,2}^2 x_{2,1}^2\right) \delta\left(c_{2,2} - x_{2,1}^2 - x_{2,2}^2\right) {x_{2,1}}d x_{1,2} d x_{2,1} d x_{2,2} = \\ \frac{1}{2} \int\limits_{{\mathcal R}^2} \delta\left((c_{1,1}-x_{1,2}^2)(c_{2,2}-x_{2,2}^2) - (c_{1,2}-x_{1,2} x_{2,})^2\right) d x_{1,2} d x_{2,2} = \\ \frac{1}{2} \frac{1}{\det(c)} \int\limits_{{\mathcal R}^2} \delta\left(1 - \vec{x}^T c^{-1} \vec{x}\right) d^2 x = \\ \frac{\pi}{2} \frac{1}{\sqrt{\det(c)}} \end{eqnarray} In the second line we have integrated over $x_{1,1}$ using the definition of the delta function.In the third line we integrated over $x_{2,1}$.In the fourth line we took out the determinant from the inside of the delta function and we wrote the remaining terms as a quadratic form.Finally, we diagonalized the quadratic form and computed the integral by going to radial coordinates.

-
Not entirely convinced about that integration over $x_{2,1}$ since it involved a product of $\delta's$ which each contain $x_{2,1}$. But I'll add my computation of the $T=2$ case to my answer for comparison. –  Semiclassical Aug 19 '14 at 17:19
I think I see an error which (taking into account the mistake I made in my answer) will make our answers match: When you do the integration over $x_{2,1}$, you do pick up a factor of $\frac12$ from the quadratic argument of the $\delta$-function, but you also get a factor of $2$ overall because $x_{2,1}$ can be positive or negative. (This doesn't show up in radial calculations because $r<0$ isn't integrated, but it's definitely present in Cartesian coordinates.) So I think your answer should be $\pi / \sqrt{\det(\mathbf{c})}$. –  Semiclassical Aug 19 '14 at 19:52
@Semiclassical: Thank you very much for all those comments. In other words you are saying that $\int\limits_{\mathcal R} f(x) \delta(x^2 - a) 2 x d x = \sum\limits_{\epsilon=\pm} f(\epsilon \sqrt{a})$. In my calculation over $x_{2,1}$ I have taken the $\epsilon=+$ term only. As such the result should be bigger by a factor of two. –  Przemo Aug 20 '14 at 9:44
Right. I didn't run into that subtlety in my answers because I always worked in spherical coordinates; on the other hand, I forgot the factors of $1/2$ from the first two $\delta$-functions. So that gave an overall factor of $8$ discrepancy between our answers. I've since fixed that in my first answer, and so have been able to get a rather nice looking final result (though I still need to translate it a bit). –  Semiclassical Aug 20 '14 at 13:46
@Semiclassical: That is great. I think that the final answer is $\frac{2^{T-3}}{(T-2)!} \pi^{T-1} \det({\bf c})^{\frac{T-3}{2}}$ for $T\ge 3$. I am looking forward to seeing your result :). –  Przemo Aug 20 '14 at 13:50

For comparison with Przemo's additional answer, here is my calculation of the $T=2$ case. I'll compute in polar coordinates from the start:

$$\omega^{(2)}=\frac{1}{4}\int\limits_0^\infty d(r_1^2)\int\limits_{-\pi}^{\pi} d\phi_1\int\limits_0^\infty d(r_2^2)\int\limits_{-\pi}^{\pi} d\phi_2 \;\delta(c_{11}-r_1^2)\;\delta(c_{22}-r_2^2)\;\delta(c_{12}-r_1 r_2 \cos(\phi_2-\phi_1))$$ I've written the area element in a non-standard form to make the next step obvious: Since we're integrating over $r^2$'s, the delta functions simplify the integral to

$$\frac{1}{4}\int_{-\pi}^{\pi}\int_{-\pi}^{\pi} d\phi_1 d\phi_2\,\delta(c_{12}-\sqrt{c_{11}c_{22}} \cos(\phi_2-\phi_1))$$

Note that the integrand is periodic, and so we may substitute $\phi=\phi_2+\phi_1$ in place of $\phi_2$ without altering the bounds of integration. But then the delta function doesn't involve $\phi_1$ at all, and we may integrate immediately over $\phi_1$ to obtain

$$\frac{\pi}{2}\int_{-\pi}^{\pi} d\phi\,\delta(c_{12}-\sqrt{c_{11}c_{22}} \cos\phi)=\pi \int_{0}^\pi d\phi \,\delta(c_{12}-\sqrt{c_{11}c_{22}}\cos\phi)$$ where we have used the symmetry of the integrand on $[-\pi,\pi]$.The substitution $\mu=c_{12}-\sqrt{c_{11}c_{22}} \cos\phi$ then yields

\begin{align} \pi \int_{c_{12}-\sqrt{c_{11}c_{22}}}^{c_{12}+\sqrt{c_{11}c_{22}}} \frac{\delta(\mu)\,d\mu}{\sqrt{c_{11}c_{22}}\sin\phi(\mu)} &=\frac{\pi}{\sqrt{c_{11}c_{22}}}\cdot\left(1-\frac{c_{12}^2}{c_{11}c_{22}}\right)^{-1/2}\\ &=\frac{\pi}{\sqrt{c_{12}^2-c_{11}c_{22}}}\\&=\pi \det{(\mathbf{c})}^{-1/2} \end{align}

This differs from Przemo's answer---but by a factor of $2$, not $8$. So I'm a bit perplexed.

-
Possible resolution: I think I missed an overall factor of $1/4$ in my answer below (from the first two delta-functions). So that would only leave a single factor of two difference between our answers. @Przemo –  Semiclassical Aug 19 '14 at 18:14