Expression for $\int_0^1 x^n(1-x)^{n}/(1+x^2) \ dx$

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.)


Solution 1:

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.

Solution 2:

$\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}