I am wondering whether there is a closed form for the following integral for $n\in\mathbb{N}$:


Particular values which I am aware of include:



Both of these values were obtained by evaluating different integrals to the above which solved the same problem (see below), and I am not sure how to attack $(*)$ directly; I can see no good way of solving this integral. I am wondering especially about the value of $\gamma(3)$; does it also have a simple closed form? Is there a closed form for all $n$?

Background: I posted a question here about calculating the proportion $p(n)$ of an $n$-cube closer to the centre than to the outside, which seems to me like an interesting problem. The $n=2$ case is simple to solve in terms of the following integral:


I was able to write $p(3)$ as follows:


and I managed to evaluate this to $\frac{5}{4}-\frac{9\sqrt{3}}{8}+\frac{\pi}{4}$, but I was not able to use my method to solve the problem for higher dimensions. In the comments, however, achille hui made a proposition that we have $p(n)=\gamma(n-1)$ for all $n$ and although I still do not perfectly understand his reasoning, the claim does check out numerically for the two values I know already. Furthermore, the new integral is in a nice simple symmetric form (unlike the methods I had been using which required a case-by-case analysis for every dimension, with ugly bounds on the integrals), which makes me hope for a solution method. However, I really cannot see how to go about it. Thus I ask, is there a method for computing the integral $(*)$?

  • $\begingroup$ We can use "spherical coordinates" integrating first wrt the radius and then wrt the surface measure on the sphere $\endgroup$ Feb 2, 2017 at 6:59
  • 1
    $\begingroup$ Nice question! @Omnomnomnom Will that work out? The domain is not a ball. $\endgroup$
    – mickep
    Feb 2, 2017 at 6:59
  • $\begingroup$ @mickep wow, totally missed that! I'm not so sure anymore. $\endgroup$ Feb 2, 2017 at 7:00
  • 2
    $\begingroup$ For whatever it is worth, Mathematica gives the value $$\frac{1}{360} \bigl(170-1827 \sqrt{2} \text{arccot}\,\sqrt{2}+2979 \sqrt{2} \text{arccot}\,2 \sqrt{2}\bigr)\approx 0.032$$ for $n=3$. $\endgroup$
    – mickep
    Feb 2, 2017 at 7:41
  • 1
    $\begingroup$ If you are interested in the limit at $n \to \infty$, then for a similar case, @SangchulLee suggested using Strong law of large numbers. $\endgroup$
    – Yuriy S
    Feb 2, 2017 at 10:39

2 Answers 2


Just for reference, here is the derivation of the formula $p(n) = \gamma(n-1)$ proposed by @achille hui.

  • Consider the cube $\mathcal{C} = [-1, 1]^n$ and define $\mathcal{D} = \{x \in \mathcal{C} : |x| < \operatorname{dist}(x, \partial \mathcal{C}) \}$. Then for each point $x \in \partial\mathcal{C}$, we can find the unique point $q(x) \in \partial\mathcal{D}$ that lies on the line segment joining $0$ and $x$.

    $\hspace{7.5em}$ Point $q(x)$

    Using this, define $r(x)$ as the ratio

    $$ r(x) = \frac{\text{[length of the line segment from $0$ to $q(x)$]}}{\text{[length of line segment from $0$ to $x$]}} = \frac{|q(x)|}{|x|}. $$

  • Let me first give a geometric argument. Let $d\mathcal{S}$ be an infinitesimally small portion of the surface $\partial\mathcal{C}$ near $x$ and consider the cone $d\mathcal{V}$ with the base $d\mathcal{S}$ and the vertex $0$.

    $\hspace{7.5em}$ Infinitesimal cone $d\mathcal{V}$

    Then roughly speaking, the portion of $d\mathcal{V}$ that intersects $\mathcal{D}$ is similar to the cone $d\mathcal{V}$ with ratio $r(x)$. Thus their volume roughly satisfies

    $$ |\mathcal{D} \cap d\mathcal{V}| \approx r(x)^n |d\mathcal{V}| = r(x)^n \cdot \frac{1}{n}|d\mathcal{S}|. $$

    From this, we have

    $$ p(n) = \frac{|\mathcal{D}|}{|\mathcal{C}|} = \frac{\int |\mathcal{D} \cap d\mathcal{V}|}{\int |d\mathcal{V}|} = \frac{\int_{\partial \mathcal{C}} r(x)^n \frac{1}{n} \, dA}{\int_{\partial \mathcal{C}} \frac{1}{n} \, dA}. \tag{*} $$

  • Here is a rigorous justification of the argument above. Write

    \begin{align*} |\mathcal{D}| = \int_{\mathcal{C}} \mathbf{1}_{\mathcal{D}}(x) \, dx &= \int_{0}^{1} \int_{\partial[-s,s]^n} \mathbf{1}_{\mathcal{D}}(y) \, dyds \\ &= \int_{0}^{1} \int_{\partial\mathcal{C}} \mathbf{1}_{\mathcal{D}}(s\omega) \, s^{n-1}d\omega ds \\ &= \int_{\partial\mathcal{C}} \int_{0}^{1} s^{n-1} \mathbf{1}_{\mathcal{D}}(s\omega) \, ds d\omega. \end{align*}

    The note that $s\omega \in \mathcal{D}$ if and only if $s|\omega| < |q(\omega)|$, or equivalently, $s < r(\omega)$. From this, we have

    $$ |\mathcal{D}| = \int_{\partial\mathcal{C}} \int_{0}^{r(\omega)} s^{n-1} \, ds d\omega = \int_{\partial\mathcal{C}} \frac{1}{n} r(\omega)^n \, d\omega. $$

    Replacing $\mathbf{1}_{\mathcal{D}}$ by $\mathbf{1}$ from the above computation, we also get

    $$ |\mathcal{C}| = \int_{\partial\mathcal{C}} \frac{1}{n} \, d\omega. $$

    This proves $\text{(*)}$.

  • Now we give an explicit formula for $\text{(*)}$. Consider the top face of $\partial\mathcal{C}$. This face can be written as $[-1,1]^{n-1}\times\{1\}$. Then for each point $x = (x',1) \in [-1, 1]^{n-1}\times\{1\}$, it is not hard to verify that

    $$ r(x) = \frac{1}{1 + \sqrt{|x'|^2+1}}. $$

    (Using the rotational symmetry, it boils down to proving this when the dimension is $n = 2$.) Plugging this back and exploiting the symmetry, we finally have

    $$ p(n) = \int_{[0,1]^{n-1}} r(x',1)^n \, dx' = \int_{[0,1]^{n-1}} \frac{1}{\left( 1 + \sqrt{|x'|^2+1} \right)^n} \, dx' = \gamma(n-1). $$

  • $\begingroup$ +1. Thank you for this nice argument; that nicely explains why the formula is true. What do you use to make those pictures? $\endgroup$
    – Anon
    Feb 2, 2017 at 22:19
  • 1
    $\begingroup$ @Anon, I'm glad it was helpful. Anyway, I used Mathematica to draw them. $\endgroup$ Feb 2, 2017 at 23:23

Not a full solution, and too long for a comment, but perhaps a plausible strategy forward. The final formula is written in terms of a finite sum of double integrals, which may (or may not) be cracked.

First, rationalize by multiplying up and down by $\left(1-\sqrt{1+x_1^2+...+x_n^2}\right)^{n+1}$ $$ \gamma(n)=(-1)^{n+1}\int_0^1...\int_0^1\frac{\left(1-\sqrt{1+x_1^2+...+x_n^2}\right)^{n+1}}{\left(x_1^2+...+x_n^2\right)^{n+1}}\;dx_1...dx_n\ . $$ Next, use the identity $$ \frac{1}{X^{n+1}}=\int_0^\infty d\xi\frac{\xi ^n \exp (-\xi X)}{\Gamma (n+1)} $$ to rewrite your integral as $$ \gamma(n)=\frac{(-1)^{n+1}}{\Gamma(n+1)}\int_0^\infty d\xi\ \xi^n \int_0^1...\int_0^1\left(1-\sqrt{1+x_1^2+...+x_n^2}\right)^{n+1} e^{-\xi \left(x_1^2+...+x_n^2\right)}\;dx_1...dx_n\ $$ $$ =\frac{(-1)^{n+1}}{\Gamma(n+1)}\int_{1}^{n+1} dr\ (1-\sqrt{r})^{n+1}\int_0^\infty d\xi\ \xi^n \int_0^1...\int_0^1\delta(r-(1+x_1^2+...+x_n^2)) e^{-\xi \left(x_1^2+...+x_n^2\right)}\;dx_1...dx_n $$ $$ =\frac{1}{\Gamma(n+1)}\int_{1}^{n+1} dr\ (\sqrt{r}-1)^{n+1}\int_0^\infty d\xi\ \xi^n F_n(r,\xi)\ , $$ where $$ F_n(r,\xi)=\int_0^1...\int_0^1\delta(r-(1+x_1^2+...+x_n^2)) e^{-\xi \left(x_1^2+...+x_n^2\right)}\;dx_1...dx_n\ . $$ Therefore $$ F_n(r,\xi)=e^{-\xi (r-1)}\int_0^1...\int_0^1\delta(r-(1+x_1^2+...+x_n^2)) \;dx_1...dx_n $$ $$ =e^{-\xi (r-1)}\int_{-\infty}^\infty\frac{dk}{2\pi}e^{\mathrm{i}k(r-1)}\left[\int_0^1 dx\ e^{-\mathrm{i}kx^2}\right]^n\ , $$ using the integral representation of Dirac delta.

Writing $\exp(-\mathrm{i}kx^2)=\cos(kx^2)-\mathrm{i}\sin(kx^2)$ and using $$ \int_0^1 dx\cos(k x^2)=\frac{\sqrt{\frac{\pi }{2}} C\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)}{\sqrt{|k|}} $$ and $$ \int_0^1 dx\sin(k x^2)=\mathrm{sign}(k)\frac{\sqrt{\frac{\pi }{2}} S\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)}{\sqrt{|k|}}\ , $$ in terms of Fresnel integrals [Mathematica notation], and using the binomial theorem we get $$ F_n(r,\xi)=e^{-\xi (r-1)}\sum_{\ell=0}^n{n\choose \ell}(-\mathrm{i})^{n-\ell} \int_{-\infty}^\infty\frac{dk}{2\pi}e^{\mathrm{i}k(r-1)}\left(\frac{\pi}{2|k|}\right)^{n/2}C^\ell\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)S^{n-\ell}\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)(\mathrm{sign}(k))^{n-\ell}\ . $$ Putting everything together $$ \gamma(n)=\frac{1}{\Gamma(n+1)}\sum_{\ell=0}^n{n\choose \ell}(-\mathrm{i})^{n-\ell} \int_{-\infty}^\infty\frac{dk}{2\pi}\left(\frac{\pi}{2|k|}\right)^{n/2}C^\ell\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)S^{n-\ell}\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)(\mathrm{sign}(k))^{n-\ell}\times\int_1^{n+1}dr (\sqrt{r}-1)^{n+1} e^{\mathrm{i}k(r-1)}\int_0^\infty d\xi\ \xi^n e^{-\xi (r-1)}\ . $$ Performing the $\xi$-integral first $$ \gamma(n)=\frac{1}{\Gamma(n+1)}\sum_{\ell=0}^n{n\choose \ell}(-\mathrm{i})^{n-\ell} \int_{-\infty}^\infty\frac{dk}{2\pi}\left(\frac{\pi}{2|k|}\right)^{n/2}C^\ell\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)S^{n-\ell}\left(\sqrt{|k|} \sqrt{\frac{2}{\pi }}\right)(\mathrm{sign}(k))^{n-\ell}\times\int_1^{n+1}dr (\sqrt{r}-1)^{n+1} e^{\mathrm{i}k(r-1)}\frac{1}{(r-1)^{n+1}}\ . $$

  • $\begingroup$ Now that's an interesting way of proceeding. +1. It looks like a beast of a Laplace transform though. $\endgroup$
    – Anon
    Feb 2, 2017 at 22:22
  • $\begingroup$ The inverse transform of $\frac{\operatorname{erf}{\sqrt{s}}}{\sqrt{s}}$ is $\frac{1}{\sqrt{\pi t}}u(1-t)$ (I think) so the inverse transform of the expression in the brackets will be $\phi(t)=\frac{e^{-\xi t}}{2\sqrt{t}}u(1-t)$ or something. Using convolution should (?) then give us $l(t)=\phi(t)*\phi(t)*...*\phi(t)$ for the inverse transform of the product, so then it seems we get the whole inverse transform as $u(t-1)l(t-1)$. I'm not sure if that's entirely correct or whether it will be useful? $\endgroup$
    – Anon
    Feb 2, 2017 at 22:37
  • $\begingroup$ What I said will just bring us back to an $n$-fold integral again, but it seems like it will be a different form. $\endgroup$
    – Anon
    Feb 2, 2017 at 22:46
  • $\begingroup$ Please check if after my edit, the new form looks more promising. $\endgroup$ Feb 3, 2017 at 16:05
  • 1
    $\begingroup$ It is a complicated formula... I wonder whether the integral in $r$ can be evaluated (it looks the most promising). Note that $\frac{(\sqrt{r}-1)^{n+1}}{(r-1)^{n+1}}=\frac{1}{(\sqrt{r}+1)^{n+1}}$ so we are trying to integrate $\frac{e^{ik(r-1)}}{(\sqrt{r}+1)^{n+1}}$ (I don't know if that helps). $\endgroup$
    – Anon
    Feb 7, 2017 at 0:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .