Prove ${2\over \pi}\int_{0}^{\infty}\prod_{k=1}^{n\ge1}{k^2\over k^2+x^2}dx={n\over 2n-1}$

You already did the $95\%$ of the needed work through partial fraction decomposition.
You just need to compute:

$$ J(n) = \sum_{k=0}^{n-1}\binom{n-1}{k}\frac{(-1)^k}{k+1} = \int_{0}^{1}\sum_{k=0}^{n-1}\binom{n-1}{k}(-x)^k\,dx $$ that is: $$ J(n) = \int_{0}^{1}(1-x)^{n-1}\,dx = \int_{0}^{1} x^{n-1}\,dx = \frac{1}{n},$$ no big issue. Restarting from scratch, $$ \int_{-\infty}^{+\infty}\frac{dx}{f_n(x)} = \int_{-\infty}^{+\infty}\prod_{k=1}^{n}\frac{1}{1+\frac{x^2}{k^2}}\,dx =2\pi i\cdot\!\!\!\!\sum_{\substack{z\in[-k,k]\\ z\neq 0}}\!\!\text{Res}\left(\frac{1}{f_n(x)},x=zi\right)\tag{1}$$ but since the singularities of $f_n(x)$ are just simple poles, De L'Hopital theorem gives:

$$ \sum_{\substack{z\in[-k,k]\\ z\neq 0}}\!\!\text{Res}\left(f_n(x),x=zi\right)=\sum_{\substack{z\in[-k,k]\\ z\neq 0}}\frac{1}{f_n'(zi)}\tag{2}$$ and $f_n(x)$ is a product, to it looks like a good idea to use logarithmic differentiation:

$$ f_n'(x) = f_n(x)\cdot\frac{d}{dx}\log f_n(x) = \left(\sum_{h=1}^{n}\frac{2h}{x^2+h^2}\right)\prod_{h=1}^{n}\left(1+\frac{x^2}{h^2}\right)\tag{3}$$

that gives the wanted partial fraction decomposition. It is also interesting to point out that this exercise gives an unusual proof of: $$ \int_{0}^{+\infty}\frac{x}{\sinh x}\,dx = \frac{\pi^2}{4} \tag{4}$$ since the Weierstrass product for the $\sinh $ function is uniformly convergent over any compact subset of $\mathbb{R}$.


I dont know if the follow help you. put $$I_n={2\over \pi}\int_{0}^{\infty}\prod_{k=1}^{n}{k^2\over k^2+x^2}dx$$ By induction we have:

$$I_1={2\over \pi}\int_{0}^{\infty}{1\over 1+x^2}dx={2\over \pi}{ \pi\over2}=1$$ Suppose that it true for $I_n$. Now \begin{align}I_{n+1}&={2\over \pi}\int_{0}^{\infty}\left(\prod_{k=1}^{n}{k^2\over k^2+x^2}\right){(n+1)^2\over (n+1)^2+x^2}dx\\ &={2\over \pi}\int_{0}^{\infty}\left(\prod_{k=1}^{n}{k^2\over k^2+x^2}\right)dx-{2\over \pi}\int_{0}^{\infty}\left(\prod_{k=1}^{n}{k^2\over k^2+x^2}\right){x^2\over (n+1)^2+x^2}dx\\ &=I_n-{2\over \pi}\int_{0}^{\infty}\left(\prod_{k=1}^{n}{(kx)^2\over k^2+x^2}\right){1\over (n+1)^2+x^2}dx \end{align} and so we are able to finish the proof if we can prove that $$\int_{0}^{\infty}\left(\prod_{k=1}^{n}{(kx)^2\over k^2+x^2}\right){1\over (n+1)^2+x^2}dx={\pi\over 2(2n-1)(2n+1)}$$


$\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{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Leftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$

The Question: $\ds{\quad I \equiv {2 \over \pi}\int_{0}^{\infty}\pars{\prod_{k = 1}^{n} {k^{2} \over k^{2} + x^{2}}}\,\dd x = {n \over 2n - 1}\,,\qquad n \geq 1}$.

\begin{align} \color{#f00}{I} & \equiv {2 \over \pi}\,\pars{n!}^{2}\int_{0}^{\infty} {\dd x \over \prod_{k = 1}^{n}\pars{x^{2} + k^{2}}}\,\ \stackrel{x^{2}\ \to\ x}{=}\ {\pars{n!}^{2} \over \pi}\,\int_{0}^{\infty} {x^{-1/2} \over \mathrm{f}\pars{x}}\,\dd x\,,\quad \left\vert\begin{array}{l} \mbox{where} \\ \ds{\mathrm{f}\pars{z} \equiv \prod_{k = 1}^{n}\pars{z + k^{2}}} \end{array}\right. \end{align}


As usual, the integration is performed along a key-hole contour which takes care of the $\ds{z^{-1/2}}$ branch-cut along the 'positive real axis'. Namely, \begin{align} \color{#f00}{I} & = {\pars{n!}^{2} \over \pi}\,\pars{% \half\,2\pi\ic\,\sum_{k = 1}^{n} \lim_{z \to -k^{2}}\braces{\bracks{z - \pars{-k^{2}}}{z^{-1/2} \over \mathrm{f}\pars{z}}}} \\[3mm] & = \pars{n!}^{2}\,\ic\sum_{k = 1}^{n} {\verts{-k^{2}}^{-1/2}\pars{\expo{\pi\ic}}^{-1/2} \over \mathrm{f'}\pars{-k^{2}}} = \pars{n!}^{2}\sum_{k = 1}^{n} {1 \over k\,\mathrm{f'}\pars{-k^{2}}} \end{align}
However, \begin{align} k\,\mathrm{f}'\pars{-k^{2}} & = k\lim_{z\ \to\ -k^{2}}\bracks{% \mathrm{f}\pars{z}\,\totald{\ln\pars{\mathrm{f}\pars{z}}}{z}} = k\lim_{z\ \to\ -k^{2}}\bracks{% \mathrm{f}\pars{z}\,\sum_{\ell = 1}^{n}{1 \over z + \ell^{2}}} = k\prod_{\ell = 1 \atop {\vphantom{\large A}\ell \not= k}}^{n} \pars{-k^{2} + \ell^{2}} \\[3mm] & = \left\lbrace\begin{array}{lcl} \ds{\bracks{\prod_{\ell = 2}^{n}\pars{\ell - 1}} \prod_{\ell = 2}^{n}\pars{\ell + 1}} & \mbox{if} & \ds{k = 1} \\[2mm] \ds{k\bracks{\prod_{\ell = 1}^{k - 1}\pars{\ell - k}} \bracks{\prod_{\ell = k + 1}^{n}\pars{\ell - k}} {\prod_{\ell = 1}^{n}\pars{\ell + k} \over 2k}} & \mbox{if} & \ds{k \geq 2} \end{array}\right. \\[3mm] & = \left\lbrace\begin{array}{lcl} \ds{\pars{n - 1}!\,\pars{3}_{n - 1}} & \mbox{if} & \ds{k = 1} && \\[2mm] \ds{\half\,\pars{-1}^{k - 1}\ \overbrace{\pars{k - 1}!}^{\ds{\Gamma\pars{k}}}\ \,\pars{1}_{n - k}\,\pars{1 + k}_{n}} & \mbox{if} & \ds{k \geq 2} \end{array}\right. \end{align}

where $\pars{a}_{m}$ is a Pochhammer Symbol which satisfies $\ds{\pars{a}_{m} = {\Gamma\pars{a + m} \over \Gamma\pars{a}}}$. Then, \begin{align} k\,\mathrm{f}'\pars{-k^{2}} & = \left\lbrace\begin{array}{lcl} \ds{\pars{n - 1}!\,{\Gamma\pars{n + 2} \over \Gamma\pars{3}}} & \mbox{if} & \ds{k = 1} \\[2mm] \ds{% \half\,\pars{-1}^{k - 1}\Gamma\pars{k}\, {\Gamma\pars{1 + n - k} \over \Gamma\pars{1}}\, {\Gamma\pars{1 + k + n} \over \Gamma\pars{1 + k}}} & \mbox{if} & \ds{k \geq 2} \end{array}\right. \\[3mm] & = \left\lbrace\begin{array}{lcl} \ds{{n + 1 \over 2n}\,\pars{n!}^{2}} & \mbox{if} & \ds{k = 1} \\[2mm] \ds{% \half\,{\pars{-1}^{k - 1} \over k}\,\Gamma\pars{1 + n - k}\Gamma\pars{1 + k + n} } & \mbox{if} & \ds{k \geq 2} \end{array}\right. \end{align}

Indeed, the expression for the case $k = 2$ is $\underline{still\ valid}$ for the value of $k = 1$ such that $\forall\ k \geq 1$ \begin{align} k\,\mathrm{f}'\pars{-k^{2}} & = \half\,{\pars{-1}^{k - 1} \over k}\,{\pars{2n}! \over {2n \choose n - k}} \end{align}

The original integral $\color{#f00}{I}$ is reduced to the finite series $\pars{~\color{#f00}{\mbox{the final result}}~}$ $$ \begin{array}{|c|}\hline\mbox{}\\ \ds{\ \color{#f00}{I} = {2 \over \pi}\int_{0}^{\infty} \pars{\prod_{k = 1}^{n}{k^{2} \over k^{2} + x^{2}}}\,\dd x = {2 \over {2n \choose n}}\sum_{k = 1}^{n}\pars{-1}^{k - 1}{2n \choose n - k}k = 2\,{{2n - 2 \choose n - 1} \over {2n \choose n}} = \color{#f00}{{n \over 2n - 1}}\ } \\ \mbox{}\\ \hline \end{array} $$

The serie can be evaluated as follows: \begin{align} &{2 \over {2n \choose n}}\sum_{k = 1}^{n}\pars{-1}^{k - 1}{2n \choose n - k}k = {2 \over {2n \choose n}}\sum_{k = 0}^{\infty}\pars{-1}^{k - 1}k\ \overbrace{% \oint_{\verts{z} = 1^{-}}{\pars{1 + z}^{2n} \over z^{n - k + 1}} \,{\dd z \over 2\pi\ic}}^{\ds{=\ {2n \choose n - k}}} \\[3mm] & = -\,{2 \over {2n \choose n}} \oint_{\verts{z} = 1^{-}}{\pars{1 + z}^{2n} \over z^{n + 1}}\ \overbrace{\sum_{k = 0}^{\infty}k\pars{-z}^{k}} ^{\ds{-\,{z \over \pars{1 + z}^{2}}}}\ \,{\dd z \over 2\pi\ic} = {2 \over {2n \choose n}} \oint_{\verts{z} = 1^{-}}{\pars{1 + z}^{2n - 2} \over z^{n}} \,{\dd z \over 2\pi\ic} \\[3mm] & = {2 \over {2n \choose n}}\,{2n - 2 \choose n - 1} = 2\,{n\pars{n - 1}!n\pars{n - 1}! \over \pars{2n}\pars{2n - 1}\pars{2n - 2}!} \,{2n - 2 \choose n - 1} = \fbox{$\ds{n \over 2n - 1}$} \end{align}