10

An answer to this question makes clever use of an integral of this form:

$$\int_0^1 \frac{x^n(1-x)^n}{1+x^2} dx$$

Is there a closed form for this for arbitrary positive integer $n$?

(I expect this question has been asked before, but I couldn't find it. So perfectly happy if you can find it and close this question out.)

Simon S
  • 26,524

4 Answers4

10

Can I get a quarter of an upvote for finding the formula for every positive integer divisible by 4?

$$\frac{1}{2^{2n-2}}\int_0^1 \frac{x^{4n}(1-x)^{4n}}{1+x^2}dx = \\ \sum_{j=0}^{2n-1}\frac{(-1)^j}{2^{2n-j-2}(8n-j-1){8n - j - 2 \choose 4n + j}} + (-1)^n\left(\pi - 4 \sum_{j=0}^{3n-1}\frac{(-1)^j}{2j+1}\right)$$

The original question links to a question posed on the 1968 Putnam Competition. For $4n=4$ the value of the integral is $(22/7) - \pi$. Larger values of $4n$ lead to better approximations of $\pi$ expressed as ratios of smallish positive integers.

John
  • 26,319
9

$\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{\dsc}[1]{\displaystyle{\color{red}{#1}}} \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{\Li}[1]{\,{\rm Li}_{#1}} \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert} \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]{\vphantom{\large A}\,#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}$

With $\ds{0 < z < 1}$:

\begin{align}&\sum_{n\ =\ 0}^{\infty}z^{n} \int_{0}^{1}{x^{n}\pars{1 - x}^{n} \over 1 + x^{2}}\,\dd x =\int_{0}^{1}{1 \over 1 + x^{2}}\,{1 \over 1 - zx\pars{1 - x}}\,\dd x \\[5mm]&={1 \over z}\int_{0}^{1} {\dd x \over \pars{1 + x^{2}}\pars{x^{2} - x + z^{-1}}} \\[5mm]&={8\root{z}\pars{3z - 2}\,{\rm arccsc}\pars{2/\root{z}} -\root{4 - z}\braces{\bracks{\pi - 2\ln\pars{2}}z - \pi} \over 4\root{4 - z}\pars{2z^{2} - 2z + 1}} \end{align}

\begin{align} &\color{#66f}{\large\int_{0}^{1}{x^{n}\pars{1 - x}^{n} \over 1 + x^{2}}\,\dd x} \\[5mm]&=\bracks{z^{n}}\pars{{8\root{z}\pars{3z - 2}\,{\rm arccsc}\pars{2/\root{z}} -\root{4 - z}\braces{\bracks{\pi - 2\ln\pars{2}}z - \pi} \over 4\root{4 - z}\pars{2z^{2} - 2z + 1}}} \end{align}

Felix Marin
  • 89,464
  • It took quite a bit of staring to see what you did on the first line, but I finally did (geometric series). Very clever. But once you have the integral (on the third line), what lets you recover the integral for a particular $n$? – John Dec 24 '14 at 20:42
  • In addition to what @John said, how come the result depends on $z$? – Mr. G Dec 31 '14 at 04:25
  • @Mr.G: notation: $z^n$ is the coefficient of $z^n$ in the series expansion of $f(z)$. This means that what Felix has provided is a Generating Function for the sequence of values depending on $n$. – robjohn Jan 09 '15 at 18:02
7

Warning: incoming eyesore.

Introduction

Using the binomial theorem,

\begin{align*} \int_{0}^{1} \frac{x^n (1 - x)^n}{1 + x^2}\,\text{d}x &= \int_{0}^{1} \frac{x^n}{1+x^2}\sum_{m = 0}^{n} {n \choose m}(-1)^{m}x^m\,\text{d}x \\ &= \sum_{m = 0}^{n} {n \choose m}(-1)^{m} \int_{0}^{1} \frac{x^{n+m}}{1+x^2} \,\text{d}x \end{align*}

Suppose first that $n + m = 2q$ for some $q$ then

$$ \frac{x^{2q}}{1+x^2} = \frac{(-1)^{q}}{1 + x^2} - \sum_{\ell = 0}^{q - 1}(-1)^{\ell + q}x^{2\ell} $$

Therefore,

$$ \int_{0}^{1} \frac{x^{2q}}{1+x^2} = (-1)^{q}\frac{\pi}{4} - \sum_{\ell = 0}^{q - 1} \frac{(-1)^{\ell + q}}{2\ell + 1} $$

Now suppose that $n + m = 2p + 1$ for some $p$ then

$$ \frac{x^{2p + 1}}{1+x^2} = \frac{(-1)^{p}x}{1 + x^2} - \sum_{\ell = 0}^{p - 1}(-1)^{\ell + p}x^{2\ell + 1} $$

Therefore,

$$ \int_{0}^{1} \frac{x^{2p + 1}}{1+x^2} \,\text{d}x =\frac{(-1)^{p}}{2}\ln(2) - \sum_{\ell = 0}^{p - 1} \frac{(-1)^{\ell + p}}{2\ell + 2} $$

Case: $n$ even

If $n$ is even then write $n = 2n'$ and then

\begin{align*} \int_{0}^{1} \frac{x^{2n'} (1 - x)^{2n'}}{1 + x^2}\,\text{d}x &= \sum_{m = 0}^{2n'} {2n' \choose m}(-1)^{m} \int_{0}^{1} \frac{x^{2n'+m}}{1+x^2} \,\text{d}x \\ &= \sum_{m = 0}^{n'} {2n' \choose 2m} \int_{0}^{1} \frac{x^{2(n'+m)}}{1+x^2} \,\text{d}x \\ &- \sum_{m = 0}^{n' - 1} {2n' \choose 2m + 1} \int_{0}^{1} \frac{x^{2(n'+m) + 1}}{1+x^2} \,\text{d}x \end{align*}

Use the previous results

\begin{align*} \int_{0}^{1} \frac{x^{2n'} (1 - x)^{2n'}}{1 + x^2}\,\text{d}x &= \sum_{m = 0}^{n'} {2n' \choose 2m}\left[(-1)^{n' + m}\frac{\pi}{4} - \sum_{\ell = 0}^{n' + m - 1} \frac{(-1)^{\ell + n' + m}}{2\ell + 1} \right] \\ &- \sum_{m = 0}^{n' - 1} {2n' \choose 2m + 1} \left[ \frac{(-1)^{n' + m}}{2}\ln(2) - \sum_{\ell = 0}^{n' + m - 1} \frac{(-1)^{\ell + n' + m}}{2\ell + 2} \right] \end{align*}

Case: $n$ odd

If $n$ is odd then write $n = 2n' + 1$ and then

\begin{align*} \int_{0}^{1} \frac{x^{2n' + 1} (1 - x)^{2n' + 1}}{1 + x^2}\,\text{d}x &= \sum_{m = 0}^{2n' + 1} {2n' + 1 \choose m}(-1)^{m} \int_{0}^{1} \frac{x^{2n'+m + 1}}{1+x^2} \,\text{d}x \\ &= \sum_{m = 0}^{n'} {2n' + 1\choose 2m} \int_{0}^{1} \frac{x^{2(n'+m) + 1}}{1+x^2} \,\text{d}x \\ &- \sum_{m = 0}^{n'} {2n' + 1 \choose 2m + 1} \int_{0}^{1} \frac{x^{2(n'+m + 1)}}{1+x^2} \,\text{d}x \end{align*}

Again, using the previous results,

\begin{align*} \int_{0}^{1} \frac{x^{2n' + 1} (1 - x)^{2n' + 1}}{1 + x^2}\,\text{d}x &= \sum_{m = 0}^{n'} {2n' + 1 \choose 2m}\left[\frac{(-1)^{n' + m}}{2}\ln(2) - \sum_{\ell = 0}^{n' + m - 1} \frac{(-1)^{\ell + n' + m}}{2\ell + 2} \right] \\ &- \sum_{m = 0}^{n' - 1} {2n' + 1 \choose 2m + 1} \left[ (-1)^{n' + m + 1}\frac{\pi}{4} - \sum_{\ell = 0}^{n' + m} \frac{(-1)^{\ell + n' + m + 1}}{2\ell + 1} \right] \end{align*}

Those sums are all finite, so in principle that's the solution. I can't immediately see how to simplify it though.

Mr. G
  • 1,058
4

By using the Euler Beta function: $$ I = \int_{0}^{1} \frac{x^n(1-x)^n}{1+x^2} \, dx = \sum_{k=0}^{+\infty} (-1)^k \int_{0}^{1} x^{n+2k}(1-x)^n \, dx $$

$$ = \sum_{k=0}^{+\infty} (-1)^k \frac{\Gamma(n+2k+1)\Gamma(n+1)}{\Gamma(2n+2k+2)} =\sum_{k=0}^{+\infty} \frac{(-1)^k}{(2n+2k+1)\binom{2n+2k}{n}}. $$

Gahawar
  • 768
Jack D'Aurizio
  • 353,855