Integral of Binomials

311 Views Asked by At

Is there a way to integrate a binomial coefficient? I've tried to put the following into Wolfram Alpha, but it doesn't return a result. I have a small suspicion that I'm going a bit over my head here, but does anyone know if this is even possible?

$$F(n) = \int_1^n \binom{n}{x} \,dx$$

3

There are 3 best solutions below

4
On BEST ANSWER

For integer $n, x$ we have $${n \choose x} = \frac{n!}{x! (n - x)!} = \frac{\Gamma(n + 1)}{\Gamma(x + 1) \Gamma(n - x + 1)},$$ where $\Gamma$ is the Gamma function, and the rightmost expression is defined for most values of $n, x$, including for all values of $x$ in the interval $[1, n]$ of integration, when $n$ is a positive integer, so we can interpret $n \choose x$ as taking on that value.

If $n$ is a nonnegative integer, using the identity $\Gamma(z + 1) = z \Gamma(z)$ (cf. the factorial identity $n! = n (n - 1)!$) and the Euler Reflection Formula, $$\Gamma(1 - z) \Gamma(z) = \frac{\pi}{\sin \pi z} ,$$ gives that $${n \choose x} = - \frac{n! \sin \pi (x + 1)}{\pi x (1 - x) \cdots (n - x)} .$$ Now, decomposing using the method of partial fractions lets us rewrite this expression as $$\frac{\sin \pi (x + 1)}{\pi} \sum_{k = 0}^n (-1)^k {n \choose k} \frac{1}{k - x} ,$$ so that the original integral is $$\int_1^n {n \choose x} \,dx = \frac{1}{\pi} \sum_{k = 0}^n (-1)^k {n \choose k} \int_1^n \frac{\sin \pi (x + 1) \,dx}{k - x}.$$

Now, substituting $u = k - x$ gives $$\int_1^n \frac{\sin \pi (x + 1) \,dx}{k - x} = (-1)^{k + 1} \int_{k - 1}^{k - n} \frac{\sin \pi u}{u} \,du = (-1)^k [\operatorname{Si}(\pi (k - n)) - \operatorname{Si}(\pi (k - 1))],$$ where $\operatorname{Si}$ is the sine integral function. After reorganizing and applying a binomial identity we get $$\boxed{\int_1^n {n \choose x} \,dx = \frac{1}{\pi} \left[\left(\frac{1}{2} n (n + 1) - 1\right) \operatorname{Si}(\pi) + \sum_{j = 2}^n {{n + 1} \choose {j + 1}} \operatorname{Si}(\pi j) \right]}.$$

For example, for $n = 2$ we have $$\int_1^2 {2 \choose x} \,dx = \frac{2 \operatorname{Si}(\pi) + \operatorname{Si}(2 \pi)}{\pi} = 1.63039\ldots,$$ and for $n = 3$, $$\int_1^3 {3 \choose x} \,dx = \frac{5 \operatorname{Si}(\pi) + 4 \operatorname{Si}(2 \pi) + \operatorname{Si} (3 \pi)}{\pi} = 5.28618\ldots.$$

Remark 1 It would be more symmetric to consider $\int_0^n {n \choose x} \,dx$, since $n \choose x$ and hence the integral is fixed under the change $x \mapsto n - x$, yielding the simpler formula $$\int_0^n {n \choose x} \,dx = \frac{2}{\pi} \sum_{j = 1}^n {n \choose j} \operatorname{Si}(\pi j) .$$ Notice that for $n = 1$ we get $\int_0^1 {1 \choose x} \,dx = 2 \operatorname{Si}(\pi)$, so twice the Wilbraham-Gibbs constant, which arises in the Gibbs phenomenon in Fourier analysis and signal processing.

Remark 2 Heuristically, we should expect that for large $n$, $\int_1^n {n \choose x} \,dx \approx \sum_{k = 0}^n {n \choose k} = 2^n$. Already for $n = 16$ we have $F(n) = 65529.67158\ldots \approx 65536 = 2^{16}$, a relative error of $< 10^{-4}$.

5
On

This is not a proof but just an observation.

When $n$ is large, it seems that $$I_n=\int_1 ^n\frac{\Gamma (n+1)}{\Gamma (x+1) \Gamma (n-x+1)}\,dx \sim 2^n$$

$$\left( \begin{array}{cccc} n & 2^n & \text{Round}[I_n] & \Delta_n \\ 10 & 1024 & 1019 & 5 \\ 20 & 1048576 & 1048569 & 7 \\ 30 & 1073741824 & 1073741814 & 10 \\ 40 & 1099511627776 & 1099511627764 & 12 \\ 50 & 1125899906842624 & 1125899906842610 & 14 \\ 60 & 1152921504606846976 & 1152921504606846960 & 16 \\ 70 & 1180591620717411303424 & 1180591620717411303406 & 18 \\ \end{array} \right)$$

The $\Delta_n$ form sequence $A163563$ in $OEIS$.

8
On

Using the Euler-Maclaurin formula, one finds \begin{align*} \int_1^n \binom{n}{x}dx &= \underbrace{\sum_{i=1}^n\binom{n}{i}}_{2^n-1} - \underbrace{\frac{\binom{n}{n}+\binom{n}{1}}{2}}_{(1+n)/2} - \underbrace{\frac{B_2}{2!}}_{(1/6)/2} \left( \left.\frac{d}{dx}\binom{n}{x}\right|_{x=n} -\left.\frac{d}{dx}\binom{n}{x}\right|_{x=1}\right) + \mathrm{h.o.} \\ &= 2^n - 1 -\frac{n+1}{2} -\frac{1}{12}\left( \underbrace{\binom{n}{n}(H_0-H_n)}_{1\cdot(0-H_n)} - \underbrace{\binom{n}{1}(H_{n-1}-H_1)}_{n(H_n-1/n-1)} \right)+\mathrm{h.o.} \end{align*} where $H_n=\sum_{i=1}^n 1/i$ is the $n$th harmonic number and $B_2$ the second Bernoulli number.
Thus, \begin{align*} \int_1^n \binom{n}{x}dx &= \underbrace{2^n - \frac{1}{12}\left(19+7n-(n+1)H_n\right)}_{A_n}+\mathrm{h.o}, \end{align*} We use that \begin{align} \frac{d}{dx}\binom{n}{x} &= \binom{n}{x}(\psi(n+1-x)-\psi(1+x)) & \textrm{$\psi$, digamma function} \\ &= \binom{n}{x}(H_{n-x}-H_x). &\textrm{integral $x$} \end{align} The value $A_n$ is a good approximation even for small $n$. For example, the error for $n=10$ is about five parts in $10^5$. It should be possible to show that the relative error decreases as a function of $n$. $$\begin{array}{ccc} n&\int_1^n\binom{n}{x}dx&A_n \\ \hline 2 & 1.630391411 & 1.625 \\ 3 & 5.286189266 & 5.277777778 \\ 4 & 12.95996138 & 12.95138889 \\ 5 & 28.64741529 & 28.64166667 \\ 6 & 60.34578753 & 60.34583333 \\ 7 & 124.0531664 & 124.0619048 \\ 8 & 251.7681597 & 251.7883929 \\ 9 & 507.489714 & 507.5241402 \\ 10 & 1019.217007 & 1019.268221 \\ 11 & 2042.949383 & 2043.019877 \\ 12 & 4090.686307 & 4090.778478 \\ 13 & 8186.427335 & 8186.543489 \\ 14 & 16378.17209 & 16378.31445 \\ 15 & 32761.92027 & 32762.09097 \\ 16 & 65529.67158 & 65529.8727 \\ 17 & 131065.4258 & 131065.6593 \\ 18 & 262137.1827 & 262137.4506 \\ 19 & 524280.9422 & 524281.2462 \\ 20 & 1048568.704 & 1048569.046 \\ \end{array}$$