# $\int_{0}^{\infty} \frac{1}{1 + x^r}\:dx = \frac{1}{r}\Gamma\left( \frac{r - 1}{r}\right)\Gamma\left( \frac{1}{r}\right)$ [duplicate]

As part of a recent question I posted, I decided to try and generalise for a power of $$2$$ to any $$r \in \mathbb{R}$$. As part of the method I took, I had to solve the following integral:

$$$$I = \int_{0}^{\infty} \frac{1}{1 + x^r}\:dx$$$$

I believe what I've done is correct, but I'm concerned that I may missed something (in particular whether it holds for all $$r \neq 0$$). So, here I have two questions (1) Is what I've done correct? and (2) What other methods can be employed that doesn't rely on complex analysis?

Here is the method I took:

First make the substitution $$u = x^{\frac{1}{r}}$$ to arrive at

$$$$I = \frac{1}{n} \int_{0}^{\infty} \frac{1}{1 + u} \cdot u^{1 -\frac{1}{r}}\:du$$$$

We now substitute $$t = \frac{1}{1 + u}$$ to arrive at:

\begin{align} I &= \frac{1}{r} \int_{1}^{0} t \cdot \left(\frac{1 - t}{t}\right)^{\frac{1}{r} -1}\frac{1}{t^2}\:dt = \frac{1}{r}\int_{0}^{1}t^{-\frac{1}{r}}\left(1 - t\right)^{ \frac{1}{r} - 1}\:dt \\ &= \frac{1}{r}B\left(1 - \frac{1}{n}, 1 + \frac{1}{r} - 1\right) = \frac{1}{r} B\left(\frac{r - 1}{r},\frac{1}{r}\right) \\ &= \frac{1}{r} B\left(\frac{r - 1}{r},\frac{1}{r}\right) \end{align}

Wheer $$B(a,b)$$ is the Beta function. Using the relationship between the Beta and Gamma function we arrive at:

$$$$I = \frac{1}{r} \frac{\Gamma\left( \frac{r - 1}{r}\right)\Gamma\left( \frac{1}{r}\right)}{\Gamma\left(\frac{r - 1}{r} + \frac{1}{r}\right)} = \frac{1}{r}\Gamma\left( \frac{r - 1}{r}\right)\Gamma\left( \frac{1}{r}\right)$$$$

And so, we arrive at:

$$$$I = \int_{0}^{\infty} \frac{1}{1 + x^r}\:dx = \frac{1}{r}\Gamma\left( \frac{r - 1}{r}\right)\Gamma\left( \frac{1}{r}\right)$$$$

for $$r > 1$$

As per KemonoChen's comment and others, we can employ Euler's Reflection Formula to position this result for $$\frac{1}{r} \not \in \mathbb{Z}$$ Here, as $$r \in \mathbb{R}, r > 1 \rightarrow \frac{1}{r} \not \in \mathbb{Z}$$ and so our formula holds.

$$$$I = \int_{0}^{\infty} \frac{1}{1 + x^r}\:dx = \frac{1}{r}\Gamma\left( \frac{r - 1}{r}\right)\Gamma\left( \frac{1}{r}\right) = \frac{\pi}{r\sin\left(\frac{\pi}{r} \right)}$$$$

Thank you also to Winther, Jjagmath, and MrTaurho's for their comments and corrections/clarifications.

• You can simplify the $\Gamma$ part by using the reflection formula of gamma function. – Kemono Chen Dec 16 '18 at 6:08
• Cheers @KemonoChen!! - Just in the middle of playing the WiiU with my Niece and Nephew - will apply that later and add to the question) – user150203 Dec 16 '18 at 6:16
• "in particular whether it holds for all $n$": The integral clearly diverges when $n \leq 1$ – Winther Dec 16 '18 at 10:27
• For the reflexion formula, in this case you need $1/n \not\in \mathbb{Z}$, which is true for ALL $n>1$ (and, as @Winther observed, this is necessary for the integral to converge) – jjagmath Dec 16 '18 at 11:10
• @DavidG It's funny that you post a link to the ISO standard. You are right, using $n$ to denote an integer is NOT part of the standard. However, in all the examples of the link, $f$ denotes a function, lowercase letters are used for elements and capital letters for sets, $x$ is used for real numbers, $z$ for complex numbers and, of course, $n$ for integers. ;) – jjagmath Dec 17 '18 at 15:26

Your given integral is closely related to the Mellin transform and can be evaluated by using Ramanujan's Master Theorem.

Ramanujan's Master Theorem

Let $$f(x)$$ be an analytic function with a MacLaurin Expansion of the form $$f(x)=\sum_{k=0}^{\infty}\frac{\phi(k)}{k!}(-x)^k$$then the Mellin Transform of this function is given by $$\int_0^{\infty}x^{s-1}f(x)dx=\Gamma(s)\phi(-s)$$

In order to get there we can expand the fraction as a geometric series

\begin{align} I=\int_0^{\infty}\frac1{1+x^n}dx&=\int_0^{\infty}\sum_{k=0}^{\infty}(-1)^k x^{kn}dx \end{align}

Now by applying the substitution $$t=x^n$$ followed by a little bit of reshaping yields to

\begin{align} I&=\int_0^{\infty}\sum_{k=0}^{\infty}(-1)^k x^{kn}dx\\ &=\frac1n\int_0^{\infty}t^{1/n-1}\sum_{k=0}^{\infty}(-1)^k\frac{k!}{k!}t^{k}dt\\ &=\frac1n\int_0^{\infty}t^{1/n-1}\sum_{k=0}^{\infty}(-1)^k\frac{\phi(k)}{k!}t^{k}dt \end{align}

Now we can apply Ramanujan's Master Theorem with $$s=1/n$$ and $$\phi(k)=\Gamma(k+1)$$ to get

\begin{align} I=\frac1n\int_0^{\infty}t^{1/n-1}\sum_{k=0}^{\infty}(-1)^k\frac{\phi(k)}{k!}t^{k}dt&=\frac1n\Gamma\left(\frac1n\right)\Gamma\left(1-\frac1n\right) \end{align}

And finally this can be simplified, as already pointed out, by using Euler's Reflection Formula $$($$as long as it holds i.e. for all $$1/n\notin\mathbb Z)$$ to get

$$I=\int_0^{\infty}\frac1{1+x^n}dx=\frac1n\frac{\pi}{\sin\left(\frac{\pi}{n}\right)}$$

• This is my first dance with Ramanujan's Master Theorem. Only last week I was blown away learning 'Glassers Master Theorem'! now this! two mathgasms in two weeks! ..... Thanks for the post! – user150203 Dec 17 '18 at 8:42
• @DavidG I appreciate that I have sparked you in favor of Ramanujan's Master Theorem. To be honest it is my favourite Theorem right now due the capability of it $($seefor example [here](math.stackexchange.com/q/3012122), [here](math.stackexchange.com/q/2937122) and [here](math.stackexchange.com/questions/2945796/…. – mrtaurho Dec 17 '18 at 20:05
• In light of spending the last week absorbed with tricky series and integrals, Ramanujan's Master Theorem seems almost too good to be true. We are certainly very lucky to have his contributions. – user150203 Dec 19 '18 at 4:22
• @DavidG But it is true! ^^ One of the most asthonishing proofs of Ramanujan's Master Theorem for me was the one proposed by the user Count Iblis here using a technique known as "Umbral calculus". Moreover he also gave another possible proof which does not invoke the Mellin Inversion Theorem aswell. – mrtaurho Dec 19 '18 at 12:15

NOT A FULL SOLUTION:

I've been working with special cases of the integral.

Here we will consider $$r = 2m$$ where $$m \in \mathbb{N}$$. In doing so, we observe that the roots of the denominator are $$m$$ pairs of complex roots $$(z, c(z))$$ where $$c(z)$$ is the conjugate of $$z$$. To verify this:

\begin{align} x^{2m} + 1 = 0 \rightarrow x^{2m} = e^{\pi i} \end{align}

By De Moivre's formula, we observe that:

\begin{align} x = \exp\left({\frac{\pi + 2\pi j}{2m} i} \right) \mbox{ for } j = 0\dots 2m - 1 \end{align}

Which we can express as the set

\begin{align} S &= \Bigg\{ \exp\left({\frac{\pi + 2\pi \cdot 0}{2m} i} \right) , \:\exp\left({\frac{\pi + 2\pi \cdot 1}{2m} i} \right),\dots,\:\exp\left({\frac{\pi + 2\pi \cdot (2m - 2)}{2m} i} \right)\\ &\qquad\:\exp\left({\frac{\pi + 2\pi \cdot (2m - 1)}{2m} i} \right)\Bigg\} \\ \end{align}

Which can be expressed as the set of 2-tuples

\begin{align} S &= \left\{ \left( \exp\left({\frac{\pi + 2\pi j}{2m} i} \right) , \:\exp\left({\frac{\pi + 2\pi(2m - 1 - j )}{2m} i} \right)\right)\: \bigg|\: j = 0 \dots m - 1\right\}\\ & = \left\{ (z_j, c\left(z_j\right)\:|\: j = 0 \dots m - 1 \right\} \end{align}

From here, we can factor $$x^{2m} + 1$$ into the form

\begin{align} x^{2m} + 1 &= \prod_{r \in S} \left(x + r_j\right)\left(x + c(r_j)\right) \\ &= \prod_{r \in S} \left(x^2 + \left(r_j + c(r_j)\right)x + r_j c(r_j)\right) \\ &= \prod_{r \in S} \left(x^2 + 2\Re\left(r_j\right)x + \left|r_j \right|^2\right) \end{align}

For our case here $$\left|r_j \right|^2 = 1$$ and $$\Re\left(r_j\right) = \cos\left({\frac{\pi + 2\pi j}{2m} } \right)$$. Hence,

\begin{align} \frac{1}{x^{2m} + 1} = \prod_{j = 0}^{m - 1}\frac{1}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1} \end{align}

From here, to evaluate the integral we must employ Partial Fraction Decomposition:

\begin{align} \frac{1}{x^{2m} + 1} = \prod_{j = 0}^{m - 1}\frac{1}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1} = \sum_{j = 0}^{m - 1}\frac{\alpha_j + \beta_jx}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1} \end{align}

And solve for $$\alpha_j$$ and $$\beta_j$$. Putting the coefficents to the side we can find general expressions for the integral:

\begin{align} \frac{1}{x^{2m} + 1} = \prod_{j = 0}^{m - 1}\frac{1}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1} \end{align}

From here, to evaluate the integral we must employ Partial Fraction Decomposition:

\begin{align} \int_{0}^{\infty}\frac{1}{x^{2m} + 1}\:dx &= \int_{0}^{\infty}\sum_{j = 0}^{m - 1}\frac{\alpha_j + \beta_jx}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1}\:dx \\ &= \sum_{j = 0}^{m - 1}\left[ \int_{0}^{\infty}\frac{\alpha_j}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1}\:dx + \int_{0}^{\infty}\frac{\beta_jx}{ x^2 + 2\cos\left({\frac{\pi + 2\pi j}{2m} } \right)x + 1}\:dx\right] \\ &=\sum_{j = 0}^{m - 1}\left[ I_1 + I_2\right] \end{align}

Evaluating each individually: \begin{align} \int_{0}^{\infty} \frac{\alpha_j}{ x^2 + 2\cos\left(\frac{\pi + 2\pi j}{2m} \right)x + 1}\:dx &= \left[ \csc\left(\frac{\pi + 2\pi j}{2m} \right)\arctan\left(\frac{(x - 1)\tan\left(\frac{\pi + 2\pi j}{4m} \right)}{x + 1} \right)\right]_{0}^{\infty} \\ &= \csc\left(\frac{\pi + 2\pi j}{2m} \right)\left( \frac{\pi + 2\pi j}{2m}\right) \end{align}

Now if we consider the second integral on it's own we find that as a general expression the integral doesn't converge. This doesn't take away from this method, but to proceed we must solve for the unknown coefficients to proceed.

Once again I will offer up a method that first converts the integral to a double integral.

For $$r > 0$$, we begin by enforcing a substitution of $$x \mapsto x^{1/r}$$. Doing so yields $$I = \frac{1}{r} \int_0^\infty \frac{x^{1/r - 1}}{1 + x} \, dx.$$

Now noting that $$\frac{1}{1 + x} = \int_0^\infty e^{-u(1 + x)} \, du,$$ our integral can be rewritten as $$I = \frac{1}{r} \int_0^\infty x^{1/r - 1} \int_0^\infty e^{-u (1 + x)} \, du \, dx,$$ or $$I = \frac{1}{r} \int_0^\infty e^{-u} \int_0^\infty x^{1/r - 1} e^{-ux} \, dx \, du,$$ after changing the order of integration.

Next we enforce a substitution of $$x \mapsto x/u$$. This gives \begin{align} I &= \frac{1}{r} \int_0^\infty u^{- 1/r} e^{-u} \, du \int_0^\infty x^{1/r - 1} e^{-x} \, dx\\ &= \frac{1}{r} \Gamma \left (1 - \frac{1}{r} \right ) \Gamma \left (\frac{1}{r} \right )\\ &= \frac{\pi}{r \sin \left (\frac{\pi}{r} \right )}, \end{align} where in the last line we have made use of Euler's reflexion formula for the gamma function.

• You and your double integrals!!!!!!!! no, love it mate, thanks heaps. Great to see it used in many ways. – user150203 Dec 17 '18 at 9:26