## Evaluate the Integral $$\int_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x$$

How to evaluate

\int\limits_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x
\tag{1}
\label{eq:mtc-1}

was part of a question posed at Mathematics Stack Exchange. Note that this is the Mellin transform of the indicated cosine function.

The original answer that I provided required some rather questionable steps regarding the limits of integration, so here I provide another solution that avoids such difficulties.

In Volume 2 of Higher Transcendental Functions (Bateman Manuscript), Section 9.10, Equation 1 we have a generalization of the fresnel integrals attributed to Bohmer:
\begin{align}
\mathrm{C}(x,a) &= \int\limits_{x}^{\infty} z^{a-1} \cos(z) \mathrm{d}z \\
&= \frac{1}{2} \Big[\mathrm{e}^{i\pi a/2} \Gamma(a,-ix) + \mathrm{e}^{-i\pi a/2} \Gamma(a,ix)\Big]
\end{align}

Thus

\mathrm{C}(0,a) = \int\limits_{0}^{\infty} z^{a-1} \cos(z) \mathrm{d}z
= \Gamma(a) \cos\left(\frac{\pi}{2}a\right)

For our integral, let $$z=2\pi ax$$:

\int\limits_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x
= (2\pi a)^{-s} \int\limits_{0}^{\infty} z^{s-1} \cos(z) \mathrm{d}z
= (2\pi a)^{-s} \Gamma(s) \cos\left(\frac{\pi}{2}s\right)

## Integrate $$\int_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \mathrm{d}x$$

How to evaluate this integral was a question at Mathematics Stack Exchange. The first method we present was already answered at MSE but here we fill in the missing steps.

## Method 1

Let $$z=x^2$$
\begin{align}
\int\limits_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \mathrm{d}x
&= \frac{1}{2} \int\limits_{0}^{\infty} z^{(a-1)/2} \frac{\mathrm{d}z}{1+z} \\
\tag{a}
&= \frac{1}{2} \mathrm{B}\left(\frac{a+1}{2}, 1-\frac{a+1}{2} \right) \\
\tag{b}
& = \frac{1}{2} \Gamma\left(\frac{a+1}{2}\right) \Gamma\left(1-\frac{a+1}{2}\right) \\
\tag{c}
&= \frac{\pi}{2\sin(\pi(a+1)/2)}
\end{align}
a. We used the following definition of the beta function

\mathrm{B}(a.b)=\int\limits_{0}^{\infty} \frac{z^{a-1}}{1+z^{a+b}} \mathrm{d}z

b. $$\mathrm{B}(a.b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}$$
c. $$\Gamma(1-z)\Gamma(z)=\frac{\pi}{\sin(\pi z)}$$

## Method 2

Let

f(z) = \frac{z^{a}}{1+z^{2}}

Using the keyhole contour, we have first order poles at $$\pm i$$, so the residues are

\mathrm{Res}[f(z),i] = \frac{i^{a}}{i2} = \mathrm{e}^{ia\pi/2} \frac{1}{i2}

\mathrm{Res}[f(z),-i] = \frac{(-i)^{a}}{-i2} = -\mathrm{e}^{ia\pi} \mathrm{e}^{ia\pi/2} \frac{1}{i2}

\begin{align}
\oint\limits_{C} f(z) \mathrm{d}z
&= \pi \mathrm{e}^{ia\pi/2} \left(1 – \mathrm{e}^{ia\pi} \right) \\
&= \lim_{\epsilon,R \to 0,\infty} \int\limits_{\epsilon}^{R} f(x) \mathrm{d}x
+ \int\limits_{\Gamma} f(z)\mathrm{d}z
+ \int\limits_{R}^{\epsilon} f(x) \mathrm{d}x
+ \int\limits_{\gamma} f(z)\mathrm{d}z \\
&= \int\limits_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \mathrm{d}x
\,- \int\limits_{0}^{\infty} \mathrm{e}^{ia2\pi} \frac{x^{a}}{1+x^{2}} \mathrm{d}x \\
&= \left(1 – \mathrm{e}^{ia2\pi} \right) \int\limits_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \mathrm{d}x
\end{align}

Thus we have
\begin{align}
\int\limits_{0}^{\infty} \frac{x^{a}}{1+x^{2}} \mathrm{d}x
&= \pi \mathrm{e}^{ia\pi/2} \left(1 – \mathrm{e}^{ia\pi} \right) \frac{1}{\left(1 – \mathrm{e}^{ia2\pi} \right)} \\
&= \frac{\pi \sin(a\pi/2)}{\sin(a\pi)} \\
&= \frac{\pi}{2\cos(a\pi/2)}
\end{align}

Notes:
1. R is the radius of the large circle $$\Gamma$$.
2. $$\epsilon$$ is the radius of the small circle $$\gamma$$.

## Problems from Chapter 8 (The Normal Integral) of Irresistible Integrals by Boros and Moll

Here I present worked solutions of select problems from Chapter 8 (The Normal Integral) of Irresistible Integrals by Boros and Moll. This book has a plethora of interesting expositions and problems related to evaluating integrals. It also contains a lot of miscellaneous material that is either not related or only tangentially related to the thesis of the book. Thus I only chose problems of personal interest. Note that most of these problems can be found in Gradshteyn and Ryzhik (G & R), 5th Edition.

I will use the same designations of exercise and example as the authors.

We begin with the normal integral,

\int\limits_{0}^{\infty} \mathrm{e}^{-x^{2}} \mathrm{d} x = \frac{\sqrt{\pi}}{2}
\label{eq:ii8-1}
\tag{1}

Proof, begin with the gamma function

\Gamma(z) = \int\limits_{0}^{\infty} t^{z-1} \mathrm{e}^{-t} \mathrm{d} t
= 2\int\limits_{0}^{\infty} x^{2z-1} \mathrm{e}^{-x^{2}} \mathrm{d} x

Where we let $$t=x^{2}$$. Now let $$z=1/2$$

\Gamma\left(\frac{1}{2}\right) = \sqrt{\pi} = 2\int\limits_{0}^{\infty} \mathrm{e}^{-x^{2}} \mathrm{d} x

rearrangement yields our result.

## Exercise 8.1.2.a:

\int\limits_{0}^{\infty} x^{2n+1}\mathrm{e}^{-px^{2}} \mathrm{d} x = \frac{1}{2p^{\,n+1}}\int\limits_{0}^{\infty}z^{n}\mathrm{e}^{-z} \mathrm{d}z
= \frac{\Gamma(n+1)}{2p^{\,n+1}} = \frac{n!}{2p^{\,n+1}}

We let $$z = px^{2}$$ and $$n \in \mathbb{Z}_{0}^{+}$$ and $$p \gt 0$$.

## Exercise 8.1.2.b: (G & R) 3.461.3

\int\limits_{0}^{\infty} x^{2n}\mathrm{e}^{-px^{2}} \mathrm{d} x = \frac{1}{2p^{\,n+1/2}}\int\limits_{0}^{\infty}z^{n-1/2}\mathrm{e}^{-z} \mathrm{d}z
= \frac{\Gamma(n+1/2)}{2p^{\,n+1/2}} = \frac{(2n!)\sqrt{\pi}}{2^{2n+1}n!p^{\,n+1/2}}

with the same substitution.

## Exercise 8.3.1: (G & R) 3.321.3

\int\limits_{0}^{\infty} \mathrm{e}^{-a^{2}x^{2}} \mathrm{d} x
= \frac{1}{a}\int\limits_{0}^{\infty} \mathrm{e}^{-y^{2}} \mathrm{d} y
= \frac{\sqrt{\pi}}{2a}
\label{eq:ii8-2}
\tag{2}

letting $$x=y/a$$ and using equation \eqref{eq:ii8-1}.

## Exercise 8.3.2: (G & R) 3.323.2

\begin{align}
\tag{a}
\int\limits_{-\infty}^{\infty} \mathrm{e}^{-a^{2}x^{2}+bx} \mathrm{d} x
&= \mathrm{e}^{b^{2}/4a^{2}} \int\limits_{-\infty}^{\infty}
\mathrm{e}^{-a^{2}(x-b/2a^{2})^{2}}\mathrm{d} x \\
\tag{b}
&= \mathrm{e}^{b^{2}/4a^{2}} \int\limits_{-\infty}^{\infty} \mathrm{e}^{-a^{2}z^{2}} \mathrm{d}z \\
&= 2\mathrm{e}^{b^{2}/4a^{2}} \int\limits_{0}^{\infty} \mathrm{e}^{-a^{2}z^{2}} \mathrm{d}z \\
&= \mathrm{e}^{b^{2}/4a^{2}} \frac{\sqrt{\pi}}{a}
\tag{c}
\end{align}
a. Complete the square.
b. Let $$z=x-b/2a^{2}$$.
c. Use equation \eqref{eq:ii8-2}.

## Exercise 8.3.3: (G & R) 3.361.2

\int\limits_{-a}^{\infty} \frac{\mathrm{e}^{-bx}}{\sqrt{x+a}}\mathrm{d} x
= \mathrm{e}^{ba} \int\limits_{0}^{\infty} z^{1/2} \mathrm{e}^{-bz}\mathrm{d} z
= \mathrm{e}^{ba} \Gamma\left(\frac{1}{2}\right)\frac{1}{\sqrt{b}}
= \mathrm{e}^{ba} \sqrt{\frac{\pi}{b}}

we let $$x+a = z$$.

## Exercise 8.3.4: (G & R) 2.33

\begin{align}
\tag{a}
\int \mathrm{exp}(-(ax^{2}+2bx+c)) \mathrm{d} x
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \int \mathrm{e}^{-a(x+b/a)^{2}} \mathrm{d} x \\
\tag{b}
& = \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{\sqrt{a}} \int \mathrm{e}^{-z^{2}} \mathrm{d}z \\
\tag{c}
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{erf}(z) \\
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{erf}\left(x\sqrt{a}+\frac{b}{\sqrt{a}}\right) + \mathrm{constant}
\label{eq:ii8-3}
\tag{3}
\end{align}
a. Complete the square.
b. Let $$z^{2} = a(x+b/a)^{2}$$
c. From the definition of the error function

\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int\limits_{0}^{x} \mathrm{exp}(-t^{2}) \mathrm{d} x

we have

\int \mathrm{exp}(-t^{2}) \mathrm{d} x = \frac{\sqrt{\pi}}{2} \mathrm{erf}(x)

Note that the book is missing the exponential term in the answer.

## Exercise 8.3.5: (G & R) 3.462.7

The first step is to use equation \eqref{eq:ii8-3}, setting $$c=0$$ and integrating from 0 to $$\infty$$

\int\limits_{0}^{\infty} \mathrm{exp}(-(ax^{2}+2bx)) \mathrm{d} x
= \frac{1}{2}\sqrt{\frac{\pi}{a}} \,\mathrm{e}^{b^{2}/a} \Big[1-\mathrm{erf}(b/\sqrt{a})\Big]

Now we differentiate both sides with respect to $$a$$

\int\limits_{0}^{\infty} x^{2}\mathrm{exp}(-(ax^{2}+2bx)) \mathrm{d} x
= -\frac{\sqrt{\pi}}{2} a^{-3/2} \mathrm{e}^{b^{2}/a} \Big[1-\mathrm{erf}(b/\sqrt{a})\Big] \left(\frac{1}{2}+\frac{b^{2}}{a} \right)
-\frac{b}{2a^{2}}

this result does match that of Boros and Moll.

## Exercise 8.3.6: (G & R) 3.468.2

\begin{align}
\tag{a}
\int\limits_{0}^{\infty} \frac{x\,\mathrm{exp}(-bx^{2})}{\sqrt{a^{2}+x^{2}}}\mathrm{d} x
&= \frac{1}{2\sqrt{b}} \int\limits_{0}^{\infty} \frac{\mathrm{e}^{-w}}{\sqrt{w+a^{2}b}}\mathrm{d}w \\
\tag{b}
&= \frac{\mathrm{exp}(a^{2}b)}{2\sqrt{b}} \int\limits_{a^{2}b}^{\infty} \mathrm{e}^{-z} z^{-1/2} \mathrm{d}z \\
\tag{c}
&= \frac{\mathrm{exp}(a^{2}b)}{2\sqrt{b}} \Gamma\left(\frac{1}{2},a^{2}b \right)
\end{align}
a. $$w=bx^{2}$$
b. $$z=w+a^{2}b$$
c.

\Gamma(a,x) = \int\limits_{x}^{\infty} t^{a-1} \mathrm{e}^{-t} \mathrm{d}t

is the upper incomplete gamma function. We also have,

\mathrm{erf}(x) = \frac{1}{x}\sqrt{x^{2}} \left(1 -\frac{1}{\sqrt{\pi}}\Gamma\left(\frac{1}{2},x^{2} \right) \right)

for $$x \gt 0$$ and $$x \in \mathbb{R}$$. So that

\Gamma\left(\frac{1}{2},x^{2} \right) = \sqrt{\pi}[1-\mathrm{erf}(x)]

and our result matches that of the book.

## Example 8.4.1: (G & R) 3.325

Prove

\int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x = \frac{1}{2}\sqrt{\frac{\pi}{a}}\mathrm{e}^{-2\sqrt{ab}}

Let

\mathrm{L}(a,b) := \int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
\label{eq:841-1}
\tag{1}

Making the substitution $$t=x\sqrt{a}$$ yields

\int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x = \frac{1}{\sqrt{a}} \int\limits_{0}^{\infty}
\mathrm{exp}(-t^{2}-\frac{ab}{t^{2}}) \mathrm{d} t
\label{eq:841-2}
\tag{2}

Letting $$ab=c$$ we call the integral in equation \eqref{eq:841-2} $$f(c)$$,

f(c) = \int\limits_{0}^{\infty} \mathrm{exp}(-t^{2}-\frac{c}{t^{2}}) \mathrm{d} t
\label{eq:841-3}
\tag{3}

so that

\mathrm{L}(a,b) = \frac{f(ab)}{\sqrt{a}}
\label{eq:841-4}
\tag{4}

In equation \eqref{eq:841-3} we let $$y=\sqrt{c}/t$$

f(c) = \sqrt{c} \int\limits_{0}^{\infty} \mathrm{exp}(-y^{2}-\frac{c}{y^{2}}) y^{-2} \mathrm{d} y
\label{eq:841-5}
\tag{5}

Combining equations \eqref{eq:841-3} and \eqref{eq:841-5}, we have

f(c) = \frac{1}{2} \int\limits_{0}^{\infty} \mathrm{exp}(-t^{2}-\frac{c}{t^{2}}) \left(1+\frac{\sqrt{c}}{t^{2}} \right) \mathrm{d} t
\label{eq:841-6}
\tag{6}

Now we let $$s = t – \sqrt{c}/t$$

f(c) = \frac{\mathrm{e}^{- 2\sqrt{c}}}{2} \int\limits_{-\infty}^{\infty} \mathrm{exp}(-s^{2}) \mathrm{d} s = \frac{\sqrt{\pi}}{2} \mathrm{e}^{- 2\sqrt{c}} \lim_{z \to \infty} \mathrm{erf}(z) = \frac{\sqrt{\pi}}{2} \mathrm{e}^{- 2\sqrt{c}}
\label{eq:841-7}
\tag{7}

Combining equations \eqref{eq:841-1}, \eqref{eq:841-4}, and \eqref{eq:841-7} yields our result.

I posted this solution and inquired about different solution methods at Mathematics Stack Exchange. There are two very interesting solutions there.

## Exercise 8.4.1

\begin{align}
\label{a}
\int\limits_{0}^{\infty} \mathrm{e}^{-(ax+b/x)} \frac{1}{\sqrt{x}} \mathrm{d}x
&= 2\int\limits_{0}^{\infty} \mathrm{e}^{-(ay^{2}+b/y^{2})} \mathrm{d}y \\
\label{b}
&= \sqrt{\frac{\pi}{a}} \mathrm{e}^{-2\sqrt{ab}}
\end{align}
a. $$x=y^{2}$$
b. Use the result from Example 8.4.1 above.

## Exercise 8.4.2.a

\begin{align}
\tag{a}
\int\limits_{0}^{\infty} \mathrm{exp}\left(-\mu x^{2} – \frac{a}{x^{2}}\right) – \mathrm{exp}(-\mu x^{2}) \mathrm{d}x
&= \frac{1}{2} \sqrt{\frac{\pi}{\mu}} \mathrm{e}^{-2\sqrt{a\mu}} \,-\, \frac{1}{\mu} \int\limits_{0}^{\infty} \mathrm{e}^{-z^{2}} \mathrm{d}z \\
\tag{b}
&= \frac{1}{2} \sqrt{\frac{\pi}{\mu}} \mathrm{e}^{-2\sqrt{a\mu}} \,-\, \frac{1}{2} \sqrt{\frac{\pi}{\mu}}
\end{align}
a. Use the result from Example 8.4.1 above.
b. The integral equals $$\mathrm{erf}(\infty) = 1$$.

## Exercise 8.4.2.b

Differentiate the result from Example 8.4.1 with respect to $$a$$

\int\limits_{0}^{\infty} x^{2} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{\sqrt{\pi}}{2a} \mathrm{e}^{-2\sqrt{ab}} \left( \frac{1}{2\sqrt{a}} + \sqrt{b}\right)

## Exercise 8.4.2.c

Differentiate the result from Example 8.4.1 with respect to $$b$$

\int\limits_{0}^{\infty} x^{-2} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{1}{2} \sqrt{\frac{\pi}{b}} \, \mathrm{e}^{-2\sqrt{ab}}

## Exercise 8.4.2.d

Differentiate the result from Exercise 8.4.2.c with respect to $$b$$

\int\limits_{0}^{\infty} x^{-4} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{\sqrt{\pi}}{2b} \mathrm{e}^{-2\sqrt{ab}} \left( \frac{1}{2\sqrt{b}} + \sqrt{a} \right)

Note that the problems in Exercise 8.4.2 are in G & R Section 3.472.

## Integrate $$\int_{0}^{\infty} \frac{x^{4}}{(\mathrm{e}^{x}-1)^{2}} \mathrm{d} x$$

How to evaluate

\int\limits_{0}^{\infty} \frac{x^{4}}{(\mathrm{e}^{x}-1)^{2}} \mathrm{d} x

was a question on Mathematics Stack Exchange which for some inexplicable reason has been closed. Here is another solution.

Let

f(x) = \frac{1}{(\mathrm{e}^{x}-1)^{2}}

Then the Mellin transform of the function is

\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} \frac{x^{s-1}}{(\mathrm{e}^{x}-1)^{2}} \mathrm{d} x
= \Gamma(s)[\zeta(s-1) – \zeta(s)]

For $$s=5$$, we have

\int\limits_{0}^{\infty} \frac{x^{4}}{(\mathrm{e}^{x}-1)^{2}} \mathrm{d} x = \Gamma(5)[\zeta(4) – \zeta(5)]
= \frac{4\pi^{4}}{15} – 24\zeta(5)

## Integrate $$\int_{0}^{\infty} (\sqrt{x^{4}+a^{4}} + \sqrt{x^{4}+b^{4}})^{-1} \mathrm{d} x$$

How to evaluate

\int\limits_{0}^{\infty} \frac{1}{\sqrt{x^{4}+a^{4}} + \sqrt{x^{4}+b^{4}}} \mathrm{d} x
\label{eq:160824-1}
\tag{1}

was a question on Mathematics Stack Exchange. One of the answers outlined a way to convert the integral into beta functions but did not work out the solution. To do so requires a clever trick to ensure convergence of the integral, which is my reason for posting a full solution here.

We begin by multiplying the integrand by

\frac{\sqrt{x^{4}+a^{4}} – \sqrt{x^{4}+b^{4}}}{\sqrt{x^{4}+a^{4}} – \sqrt{x^{4}+b^{4}}}

so that we now have

\frac{1}{a^{4}-b^{4}} \int\limits_{0}^{\infty} \sqrt{x^{4}+a^{4}} – \sqrt{x^{4}+b^{4}} \, \mathrm{d} x
\label{eq:160824-2}
\tag{2}

The problem here is that

\int\limits_{0}^{\infty} \sqrt{x^{4}+a^{4}} \, \mathrm{d} x

does not converge. Here is where we invoke the clever trick I referred to. Let us consider

\int\limits_{0}^{\infty} (x^{4}+a^{4})^{p} \mathrm{d} x
\label{eq:160824-3}
\tag{3}

Making the successive substitutions $$x^{4} = a^{4}y^{4}$$ and $$y^{4} = z$$ yields
\begin{align}
\int\limits_{0}^{\infty} (x^{4}+a^{4})^{p} \mathrm{d} x & = \frac{a^{4p+1}}{4} \int\limits_{0}^{\infty} z^{-3/4} (z+1)^{p} \mathrm{d} z \\
& = \frac{a^{4p+1}}{4} \mathrm{B}\left(\frac{1}{4},\frac{-1}{4}-p\right)
\label{eq:160824-4}
\tag{4}
\end{align}

Putting it all together and letting $$p = 1/2$$, we have
\begin{align}
\int\limits_{0}^{\infty} \frac{1}{\sqrt{x^{4}+a^{4}} + \sqrt{x^{4}+b^{4}}} \mathrm{d} x & = \frac{1}{a^{4}-b^{4}} \int\limits_{0}^{\infty} \sqrt{x^{4}+a^{4}} – \sqrt{x^{4}+b^{4}} \mathrm{d} x \\
& = \frac{1}{4} \frac{a^{3}-b^{3}}{a^{4}-b^{4}} \mathrm{B}\left(\frac{1}{4},\frac{-3}{4}\right) \\
& \approx \frac{a^{3}-b^{3}}{a^{4}-b^{4}} 1.23605
\end{align}

## Integrate $$\int_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x$$

How to evaluate

\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x

was a question on Mathematics Stack Exchange. The original post asked for a contour integral solution and there is a good one among the answers. However, this integral can be evaluated trivially by recognizing an integral definition of the Dirichlet eta function or use of the Mellin transform.

We have

\eta(s) = \frac{1}{\Gamma(s)}\int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{x}+1} \mathrm{d} x

thus our integral is

\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x = \eta(2)\Gamma(2) = \frac{\pi^{2}}{12}

Also
\begin{align}
\mathcal{M}\left[(\mathrm{e}^{ax}+1)^{-1}\right](s) & = \int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{ax}+1} \mathrm{d} x \\
& = a^{-s}\Gamma(s)(1-2^{1-s})\zeta(s) \\
& = a^{-s}\Gamma(s)\eta(s)
\end{align}
With $$a=1$$ and $$s=2$$ we arrive at our result.

## Integrate $$\int_{0}^{\infty} \frac{x}{\sqrt{\mathrm{e}^{x}-1}} \mathrm{d} x$$

How to evaluate

\int\limits_{0}^{\infty} \frac{x}{\sqrt{\mathrm{e}^{x}-1}} \mathrm{d} x

was a question on Mathematics Stack Exchange. Here is another solution method.

Let $$z=\mathrm{e}^{x}-1$$, so that we have

\int\limits_{0}^{\infty} \frac{\mathrm{ln}(z+1)}{\sqrt{z}}\frac{1}{z+1} \mathrm{d} z

Let us consider

I(a) = \int\limits_{0}^{\infty} \frac{(z+1)^{a}}{\sqrt{z}} \mathrm{d} z = \mathrm{B}\left(\frac{1}{2}, -\frac{1}{2}-a\right)
= \frac{\Gamma\left(\frac{1}{2}\right) \Gamma\left(-\frac{1}{2}-a\right)}{\Gamma(-a)}

so that

\lim_{a \to -1} \frac{\partial I(a)}{\partial a} = \int\limits_{0}^{\infty} \frac{\mathrm{ln}(z+1)}{\sqrt{z}}\frac{1}{z+1} \mathrm{d} z =
\int\limits_{0}^{\infty} \frac{x}{\sqrt{\mathrm{e}^{x}-1}} \mathrm{d} x

Then,

\frac{\partial I(a)}{\partial a} = \Gamma\left(\frac{1}{2}\right)\left[\frac{-\Gamma(-a)\Gamma\left(-\frac{1}{2}-a\right)\psi^{0}\left(-\frac{1}{2}-a\right) + \Gamma\left(-\frac{1}{2}-a\right)\Gamma(-a)\psi^{0}(-a)}{\Gamma(-a)\Gamma(-a)} \right]

\begin{align}
\lim_{a \to -1} \frac{\partial I(a)}{\partial a} & = \frac{-\Gamma\left(\frac{1}{2}\right)\Gamma\left(\frac{1}{2}\right)}{\Gamma(1)}
\left[\psi^{0}\left(\frac{1}{2}\right) – \psi^{0}(1)\right] \\
& = -\pi[(-\gamma-\mathrm{ln}4) -(- \gamma)] \\
& = \pi\mathrm{ln}4 \\
& = \int\limits_{0}^{\infty} \frac{x}{\sqrt{\mathrm{e}^{x}-1}} \mathrm{d} x
\end{align}

## Integrals from Blagouchine’s Malmsten Integral Paper

Here I evaluate problem 18a from page 43 from Rediscovery of Malmsten’s integrals, their evaluation by contour integration methods and some related results by Iaroslav V. Blagouchine as well as a bonus integral. The integral in question is

\int\limits_{0}^{\infty} \frac{x^{a}\mathrm{ln}(x)}{\mathrm{e}^{bx}-1} \mathrm{d} x
\label{eq:160817-1}
\tag{1}

We will evaluate this integral using two methods. First, taking the hint given by Blagouchine, we expand the function

f(x) = \frac{1}{\mathrm{e}^{bx}-1}
\label{eq:160817-2}
\tag{2}

and then integrate term by term.

f(x) = \frac{1}{\mathrm{e}^{bx}-1} = \frac{\mathrm{e}^{-bx}}{1-\mathrm{e}^{-bx}} = \sum\limits_{n=0}^{\infty} \mathrm{e}^{-(1+n)bx}
\label{eq:160817-3}
\tag{3}

We commence with

I = \int\limits_{0}^{\infty} \frac{x^{a}}{\mathrm{e}^{bx}-1} \mathrm{d} x = \int\limits_{0}^{\infty} x^{a} \sum\limits_{n=0}^{\infty} \mathrm{e}^{-(1+n)bx} \mathrm{d} x
= \sum\limits_{n=0}^{\infty} \int\limits_{0}^{\infty} x^{a} \mathrm{e}^{-(1+n)bx} \mathrm{d} x
\label{eq:160817-4}
\tag{4}

Making the substitution $$y = (1+n)bx$$ yields
\begin{align}
I & = \sum\limits_{n=0}^{\infty} \frac{1}{(1+n)^{a+1}b^{a+1}} \int\limits_{0}^{\infty} y^{a} \mathrm{e}^{-y} \mathrm{d} y
= \frac{\Gamma(a+1)}{b^{\,a+1}} \sum\limits_{n=0}^{\infty} \frac{1}{(1+n)^{a+1}} \\
& = \frac{\Gamma(a+1)}{b^{\,a+1}} \sum\limits_{k=1}^{\infty} \frac{1}{k^{a+1}} \\
& = \frac{\Gamma(a+1)\zeta(a+1)}{b^{\,a+1}}
\label{eq:160817-5}
\tag{5}
\end{align}

So we have our first result

\int\limits_{0}^{\infty} \frac{x^{a}}{\mathrm{e}^{bx}-1} \mathrm{d} x = \frac{\Gamma(a+1)\zeta(a+1)}{b^{\,a+1}}
\label{eq:160817-6}
\tag{6}

We can evaluate this integral quite simply if we recognize that it can be written as a Mellin transform

\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{bx}-1} \mathrm{d} x = \frac{\Gamma(s)\zeta(s)}{b^{s}}
\label{eq:160817-7}
\tag{7}

Letting $$s = a+1$$ yields our result.

To evaluate the integral in \eqref{eq:160817-1} we differentiate equation \eqref{eq:160817-6} with respect to $$a$$ and note that

\frac{d\Gamma(z)}{dz} = \Gamma(z)\psi^{(0)}(z)

\begin{align}
\int\limits_{0}^{\infty} \frac{x^{a}\mathrm{ln}(x)}{\mathrm{e}^{bx}-1} \mathrm{d} x & = \frac{-\mathrm{ln}(b)}{b^{\,a+1}} \Gamma(a+1)\zeta(a+1) + \frac{\Gamma'(a+1)\zeta(a+1)}{b^{\,a+1}} + \frac{\Gamma(a+1)\zeta'(a+1)}{b^{\,a+1}} \\
& = \frac{\Gamma(a+1)}{b^{\,a+1}} \left[ \psi^{(0)}(a+1)\zeta(a+1) + \zeta'(a+1) – \zeta(a+1)\mathrm{ln}(b) \right]
\label{eq:160817-8}
\tag{8}
\end{align}

Note that $$\mathrm{Re}(a) > 0$$.

## Derivation of an Integral Expression of the Euler-Mascheroni Constant – Part 2

I derived the expression

\int\limits_{0}^{\infty} \mathrm{e}^{-x} \mathrm{ln}(x) \mathrm{d} x = -\gamma
\label{eq:1608161}
\tag{1}

for the Euler-Mascheroni constant here. However, there is a far easier method that was fully derived in Advanced Integration Techniques by Zaid Alyafeai. I recommend this book to readers of this blog. It is free and contains many useful and interesting results.

\int\limits_{0}^{\infty} \mathrm{e}^{-x} x^t \mathrm{d} x = \Gamma(t+1)
\label{eq:1608162}
\tag{2}

Differentiate with respect to $$t$$

\int\limits_{0}^{\infty} \mathrm{e}^{-x} x^t \mathrm{ln}(x) \mathrm{d} x = \frac{d\Gamma(t+1)}{dt} = \Gamma(t+1) \psi^{(0)}(t+1)
\label{eq:1608163}
\tag{3}

Taking the limit of equation \eqref{eq:1608163}, $$t \to 0$$ yields

\int\limits_{0}^{\infty} \mathrm{e}^{-x} \mathrm{ln}(x) \mathrm{d} x = \Gamma(1) \psi^{(0)}(1) = -\gamma
\label{eq:1608164}
\tag{4}

## Integrate $$\int_{0}^{\infty} \frac{\mathrm{ln}^{3}(x)}{(1+x^{2})(1+x)^{2}} \mathrm{d} x$$

The following integral was a question on Mathematics Stack Exchange.

\int\limits_{0}^{\infty} \frac{\mathrm{ln}^{3}(x)}{(1+x^{2})(1+x)^{2}} \mathrm{d} x
\label{eq:160813a1}
\tag{1}

As usual, there are multiple clever solutions. However, a user noted that the integral could be evaluated via the Mellin transform but he did not provide any details so I will do it here.

Let us evaluate it via the Mellin transform

\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x
\label{eq:160813a2}
\tag{2}

where

f(x) = \frac{1}{(1+x^{2})(1+x)^{2}} = -\frac{1}{2}\frac{x}{x^{2}+1} + \frac{1}{2}\frac{1}{x+1} + \frac{1}{2}\frac{1}{(x+1)^{2}}
\label{eq:160813a3}
\tag{3}

via partial fraction expansion.

Applying the Mellin transform, yields
\begin{align}
\mathcal{M}[f(x)](s) & = \int\limits_{0}^{\infty} \frac{x^{s-1}}{(1+x^{2})(1+x)^{2}} \\
& = -\frac{1}{2}\left[\frac{1}{2}\pi\sec\left(\frac{\pi}{2}s\right)\right] + \frac{1}{2}\pi\csc(\pi s) + \frac{1}{2} \mathrm{B}(s,2-s)
\label{eq:160813a4}
\tag{4}
\end{align}

Taking the 3rd derivative of equation \eqref{eq:160813a4} with respect to s and then taking $$\lim s \to 1$$ yields
\begin{align}
\int\limits_{0}^{\infty} \frac{\mathrm{ln}^{3}(x)}{(1+x^{2})(1+x)^{2}} \mathrm{d} x & = -\frac{1}{2}\left( -\frac{7}{960} \pi^{4} \right) + \frac{1}{2} \left( -\frac{7}{60} \pi^{4} \right) + \frac{1}{2}0 \\
& = -\frac{7}{128} \pi^{4}
\label{eq:160813a5}
\tag{5}
\end{align}

Let us fill in the details. Handling the beta function first, we have

\mathrm{B}(s,2-s) = \frac{\Gamma(s)\Gamma(2-s)}{\Gamma(2)} = \Gamma(s)\Gamma(2-s)
\label{eq:160813a6}
\tag{6}

To take derivatives, we note that

\frac{\mathrm d}{\mathrm d s} \Gamma(s) = \Gamma(s) \psi^{(0)}(s) \quad \mathrm{and} \quad \psi^{(n)}(s) = \frac{\mathrm{d}^{n}}{\mathrm{d} s^{n}} \psi^{(0)}(s)

Where $$\psi^{(n)}(s)$$ is the polygamma function.

Taking the third derivative of equation \eqref{eq:160813a6} and letting $$\lim s \to 1$$ equals 0. Here we used

\psi^{(0)}(1) = -\gamma \quad \mathrm{and} \quad \psi^{(1)}(1) = \frac{\pi^{2}}{6}

and fortunately $$\Gamma^{(3)}(s) = -\Gamma^{(3)}(2-s)$$ which leads to some cancellations.

Doing the same for the first two terms on the right hand side of equation \eqref{eq:160813a4}, we have to be careful. Each of them individually goes to $$\infty$$ as $$\lim s \to 1$$ but the $$(s-1)^{-4}$$ terms in the Laurent expansions about $$s=1$$ cancel. Here I used Wolfram Alpha. Doing it with the two terms combined yielded our final answer.