# Prove $\int_0^{\infty}\! \frac{\mathbb{d}x}{1+x^n}=\frac{\pi}{n \sin\frac{\pi}{n}}$ using real analysis techniques only

I have found a proof using complex analysis techniques (contour integral, residue theorem, etc.) that shows $$\int_0^{\infty}\! \frac{\mathbb{d}x}{1+x^n}=\frac{\pi}{n \sin\frac{\pi}{n}}$$ for $$n\in \mathbb{N}^+\setminus\{1\}$$

I wonder if it is possible by using only real analysis to demonstrate this "innocent" result?

Edit A more general result showing that $$\int\limits_{0}^{\infty} \frac{x^{a-1}}{1+x^{b}} \ \text{dx} = \frac{\pi}{b \sin(\pi{a}/b)}, \qquad 0 < a can be found in another math.SE post

$$\int_{0}^{\infty}\frac{1}{1+x^n}\ dx =\int_{0}^{\infty}\int_{0}^{\infty}e^{-(1+x^{n})t}\ dt\ dx$$

$$=\int_{0}^{\infty}\int_{0}^{\infty}e^{-t}e^{-tx^{n}}\ dx\ dt =\frac{1}{n}\int_{0}^{\infty}\int_{0}^{\infty}e^{-t}e^{-u}\Big(\frac{u}{t}\Big)^{\frac{1}{n}-1}\frac{1}{t}\ du\ dt$$

$$=\frac{1}{n}\int_{0}^{\infty}t^{-\frac{1}{n}}e^{-t}\int_{0}^{\infty}u^{\frac{1}{n}-1}e^{-u}\ du\ dt =\frac{1}{n}\int_{0}^{\infty}t^{-\frac{1}{n}}e^{-t}\ \Gamma\Big(\frac{1}{n}\Big)\ dt$$

$$=\frac{1}{n}\ \Gamma\Big( 1-\frac{1}{n}\Big)\Gamma\Big(\frac{1}{n}\Big) =\frac{\pi}{n}\csc\Big(\frac{\pi}{n}\Big)$$

• :nice approach but why ? $$\frac{1}{n}\ \Gamma\Big( 1-\frac{1}{n}\Big)\Gamma\Big(\frac{1}{n}\Big)=\frac{\pi}{n}\csc\Big(\frac{\pi}{n}\Big)$$ – M.H Jun 29 '13 at 15:00
• @MaisamHedyelloo $\Gamma(z)\Gamma(1-z)=\dfrac{\pi}{\sin (\pi z)}$, for $0<z<1$. – Cortizol Jun 29 '13 at 15:02
• @Cortizol :thanks – M.H Jun 29 '13 at 15:04
• @RandomVariable This is by $\Gamma(z)\Gamma(1-z)=\pi/\sin(\pi z)$, but how do you get it using only real analysis? – Sungjin Kim May 31 '14 at 14:14
• @i707107 By using the Weierstrass infinite product representation of the gamma function, which can be derived without using complex analysis from Euler's limit definition of the gamma function. planetmath.org/eulerreflectionformula – Random Variable May 31 '14 at 14:30

Here is another method. Let $\varphi: x\mapsto \displaystyle\int_0^{+\infty}\dfrac{dt}{1+t^x}$ and $\psi:x\mapsto\dfrac{\dfrac {\pi}{x}}{\sin\left(\dfrac{\pi}{x}\right)}$

You can easily prove that $\varphi$ and $\psi$ are both defined and continuous on $\mathscr I=\mathbb ]1,+\infty[$.

Let $\mathscr{A}=\left\{\dfrac pq : p\in2\mathbb Z, q\in2\mathbb Z+1 \right\}$ and $\mathscr A^*_+=\mathscr A \cap \mathscr I$. Then $\mathscr A^*_+$ is a dense subset of $\mathscr I$.

Now let $p$ be an even integer and $q$ an odd one such that $p>q>0$. We have :

$$\varphi\left(\frac{p}{q}\right)=\int_0^{+\infty}\frac{dt}{1+t^\frac{p}{q}}=\int_0^{+\infty}\frac{qu^{q-1}}{1+u^p}du= \frac{q}{2}\int_{-\infty}^{+\infty}\frac{u^{q-1}}{1+u^p}du=\frac{q}{2}\lim_{t\rightarrow+\infty}\int_{-t}^t\frac{u^{q-1}}{1+u^p}du$$

We can write : $\displaystyle{\frac{u^{q-1}}{1+u^p}=\sum_{k=0}^{p-1}\frac{a_k}{u-b_k}}$ with $\displaystyle{b_k=e^{i\frac{(2k+1)\pi}{p}}}$ and $\displaystyle{a_k=\frac{-b_k^q}{p}=-\frac{e^{i\frac{(2k+1)\pi q}{p}}}{p}}$

Now let $x$ be a real number such that $\sin(x)\neq 0$.

We can then write : $\displaystyle{\frac{1}{u-e^{ix}}=\frac{u-\cos(x)+i\sin(x)}{u²-2u\cos(x)+1}}$

Now if $t>0$ we get : $\displaystyle{\int_{-t}^t\frac{u-\cos(x)}{u²-2u\cos(x)+1}du=\frac{1}{2}\ln\left(\frac{t²-2t\cos(x)+1}{t²+2t\cos(x)+1}\right)}$ and this integral tends to $0$ as $t$ tends to $+\infty$.

We have as well : $\displaystyle{\int_{-t}^t\frac{\sin(x)}{u²-2u\cos(x)+1}du=\mathrm{Arctan}\left(\frac{t+\cos(x)}{\sin(x)}\right)-\mathrm{Arctan}\left(\frac{-t+\cos(x)}{\sin(x)}\right)}$ and this integral tends to $\pi$ if $\sin(x)>0$ and $-\pi$ if $\sin(x)<0$ (when $t$ tends to $+\infty$).

So we get : $$\lim_{t\to +\infty} \int_{-t}^t \dfrac{du}{u-e^{ix}}=\left\{\begin{array}{lr} i\pi & \text{if}\ \sin(x)>0\\ -i\pi & \text{if}\ \sin(x)<0\end{array}\right.$$

Now let's go back to our little integral :

$$\dfrac q2 \lim_{t\to +\infty}\int_{-t}^t \dfrac{u^{q-1}}{1+u^p} du=i\pi\dfrac q2\left(\sum_{k=0}^{\frac p2-1}a_k-\sum_{k=\frac p2}^{p-1} a_k\right)=-q\pi\mathrm{Im}\left(\sum_{k=0}^{\frac p2-1} a_k\right) \ (\text{because}\ a_k=\overline{a_{p-1-k}})$$

But this last sum is just a simple geometric sum :

$$\sum_{k=0}^{\frac p2-1} a_k=-\dfrac 1p e^{i\pi\frac qp}\frac{1-e^{i\pi q}}{1-e^{2i\pi\frac qp}}=-\frac{i}{p\sin\left(\pi\frac qp\right)}$$

And finally we get :

$$\varphi\left(\frac pq\right)=-q\pi\left(-\frac1{p\sin\left(\pi\frac qp\right)}\right)=\frac{\dfrac{\pi}{\frac pq}}{\sin\left(\dfrac{\pi}{\frac pq}\right)}=\psi\left(\frac pq\right)$$

$\varphi$ and $\psi$ are both continuous and they agree on the dense subset $\mathscr A^*_+$ of $\mathscr I$. Hence they're equal.

• It is a bit longer but I like this answer because it is self contained; that is, it does not rely on the reflection property of $\Gamma(t)$. – Mark Fischler Mar 31 '15 at 19:37

We can use the geometric series $\frac{1}{1-x}=\sum_{k=0}^\infty x^n$ for $|x|<1$ to evaluate: \begin{eqnarray} \int_0^\infty\frac{1}{1+x^n}dx&=&\int_0^1\frac{1+x^{n-2}}{1+x^n}dx\\ &=&\sum_{k=0}^\infty(-1)^k\int_0^1(1+x^{n-2})x^{nk}dx\\ &=&\sum_{k=0}^\infty(-1)^k\left(\frac{1}{nk+1}+\frac{1}{nk+n-1}\right)\\ &=&\sum_{k=-\infty}^\infty(-1)^k\frac{1}{nk+1}\\ &=&\frac{\pi}{n\sin\frac{\pi}{n}}. \end{eqnarray}

• The upper limit is infinity, not $1$. – Tunk-Fey Jul 23 '14 at 19:07
• Monotone Convergence Theorem at line 2? – Rrjrjtlokrthjji Oct 14 '14 at 19:53
• In line 1: $\int_0^\infty \frac {1} {1+x^2} = \int_0^1 \frac {1} {1+x^2}+\int_1^\infty \frac {1} {1+x^2}$ and in the second integral $x\to\frac {1}{y}$ – Dr. Wolfgang Hintze Apr 2 at 9:48

In general, let $$y=\dfrac{1}{1+x^b}\quad\Rightarrow\quad x=\left(\dfrac{1-y}{y}\right)^{\large\frac1b}\quad\Rightarrow\quad dx=-\left(\dfrac{1-y}{y}\right)^{\large\frac1b-1}\ \dfrac{dy}{by^2}\ ,$$ then \begin{align} \int_0^\infty\dfrac{x^{\large a-1}}{1+x^b}\ dx&=\int_0^1 y\left(\dfrac{1-y}{y}\right)^{\large\frac{a-1}b}\left(\dfrac{1-y}{y}\right)^{\large\frac1b-1}\ \dfrac{dy}{by^2}\\&=\frac1b\int_0^1y^{\large1-\frac{a}{b}-1}(1-y)^{\large\frac{a}{b}-1}\ dy, \end{align} where the integral in RHS is Beta function. $$\text{B}(x,y)=\int_0^1t^{\ \large x-1}\ (1-t)^{\ \large y-1}\ dt=\frac{\Gamma(x)\cdot\Gamma(y)}{\Gamma(x+y)}.$$ Hence \begin{align} \int_0^\infty\dfrac{x^{\large a-1}}{1+x^b}\ dx&=\frac1b\int_0^1y^{\large1-\frac{a}{b}-1}(1-y)^{\large\frac{a}{b}-1}\ dy\\&=\frac1b\cdot\Gamma\left(1-\frac{a}{b}\right)\cdot\Gamma\left(\frac{a}{b}\right)\\&=\large{\color{blue}{\frac{\pi}{b\sin\left(\frac{a\pi}{b}\right)}}}. \end{align} The last part uses Euler's reflection formula for Gamma function provided $0<a<b$. Thus $$\large\int_0^\infty\dfrac{1}{1+x^n}\ dx=\color{blue}{\frac{\pi}{n\sin\left(\frac{\pi}{n}\right)}}.$$

$$\Large\color{blue}{\text{# }\mathbb{Q.E.D.}\text{ #}}$$

• What does Q.E.D. mean? – jeanne clement Jan 12 '17 at 11:20
• QED is Latin for quod erat demonstrandum meaning "that which was to be demonstrated, shown, or proved." Less formally, one often hears QED as corresponding to "Quite Easily Done." – omegadot Nov 7 '17 at 10:33