Integrals of Gradshteyn and Ryzhik: 6.161 – Mellin Transforms of Theta Functions with Respect to the Lattice Parameter

We use definitions of the theta functions, shown below, from GR. Note that there is no standard notation for the theta functions.

\(z = \) argument, \(\tau = \) lattice parameter (\(\mathfrak{I}(\tau) \gt 0\)), and
\(q = \mathrm{e}^{i\pi \tau}\) (\(|q| \lt 1\))

\begin{align}
\tag{1a}
\label{eq:theta1e}
\theta_{1}(z|\tau) &= \theta_{1}(z,q) = 2 \sum_{n=0}^{\infty} (-1)^{n} q^{(n+1/2)^{2}} \sin[(2n+1)z] \\
\tag{1b}
\label{eq:theta1t}
&= -i \sum_{n=-\infty}^{\infty} (-1)^{n} q^{(n+1/2)^{2}} \mathrm{e}^{i(2n+1)z}
\end{align}

\begin{align}
\tag{2a}
\label{eq:theta2e}
\theta_{2}(z|\tau) &= \theta_{2}(z,q) = 2 \sum_{n=0}^{\infty} q^{(n+1/2)^{2}} \cos[(2n+1)z] \\
\tag{2b}
\label{eq:theta2t}
&= \sum_{n=-\infty}^{\infty} q^{(n+1/2)^{2}} \mathrm{e}^{i(2n+1)z}
\end{align}

\begin{align}
\tag{3a}
\label{eq:theta3e}
\theta_{3}(z|\tau) &= \theta_{3}(z,q) = 1 + 2 \sum_{n=1}^{\infty} q^{n^{2}} \cos(2nz) \\
\tag{3b}
\label{eq:theta3t}
&= \sum_{n=-\infty}^{\infty} q^{n^{2}} \mathrm{e}^{i2nz}
\end{align}

\begin{align}
\tag{4a}
\label{eq:theta4e}
\theta_{4}(z|\tau) &= \theta_{4}(z,q) = 1 + 2 \sum_{n=1}^{\infty} q^{n^{2}} \cos(2nz) \\
\tag{4b}
\label{eq:theta4t}
&= \sum_{n=-\infty}^{\infty} q^{n^{2}} \mathrm{e}^{i2nz}
\end{align}

6.161.1

\begin{equation}
\int_{0}^{\infty} x^{s-1} \theta_{2}(0|ix^2) dx
= 2\int_{0}^{\infty} x^{s-1} \sum_{n=0}^{\infty} \mathrm{e}^{-\pi x^{2}(n+1/2)^2} dx
\end{equation}

\begin{align}
\int_{0}^{\infty} x^{s-1} \mathrm{e}^{-\pi x^{2}(n+1/2)^2} dx
&= \frac{1}{2(\pi (n+1/2)^2)^{s/2}} \int_{0}^{\infty} y^{-1+s/2} \mathrm{e}^{-y} dy \\
&= \frac{1}{2(\pi (n+1/2)^2)^{s/2}} \Gamma(s/2)
\end{align}

We used the substitution \(y = \pi x^{2}(n+1/2)^2\).

Now we have
\begin{align}
\int_{0}^{\infty} x^{s-1} \theta_{2}(0|ix^2) dx &=
\frac{1}{\pi ^{s/2}} \Gamma(s/2) \sum_{n=0}^{\infty} \frac{1}{(n+1/2)^s} \\
&= \frac{2^s}{\pi ^{s/2}} \Gamma(s/2) \sum_{n=0}^{\infty} \frac{1}{(2n+1)^s} \\
&= \frac{2^s}{\pi ^{s/2}} \Gamma(s/2) (1-2^{-s}) \zeta(s)
\end{align}

6.161.2

\begin{align}
\int_{0}^{\infty} x^{s-1} [\theta_{3}(0|ix^2) \,- 1] dx
&= \int_{0}^{\infty} x^{s-1} \left(\left[1 + 2\sum_{n=1}^{\infty} \mathrm{e}^{-\pi x^{2} n^2} \right] -1 \right) dx \\
&= 2\sum_{n=1}^{\infty} \int_{0}^{\infty} x^{s-1} \mathrm{e}^{-\pi x^{2} n^2} dx \\
&= 2\sum_{n=1}^{\infty} \frac{\Gamma(s/2)}{2\pi^{s/2} n^{s}} \\
&= \frac{\Gamma(s/2)}{\pi^{s/2}} \sum_{n=1}^{\infty} \frac{1}{n^{s}} \\
&= \frac{\Gamma(s/2)}{\pi^{s/2}} \zeta(s)
\end{align}

We used the substitution \(y = \pi x^{2} n^2\) and the same work as above to evaluate the integral.

6.161.3

\begin{align}
\int_{0}^{\infty} x^{s-1} [1 – \theta_{4}(0|ix^2)] dx
&= \int_{0}^{\infty} x^{s-1} \left(1 – \left[1 + 2\sum_{n=1}^{\infty} (-1)^{n} \mathrm{e}^{-\pi x^{2} n^2} \right] \right) dx \\
&= -2\sum_{n=1}^{\infty} (-1)^{n} \int_{0}^{\infty} x^{s-1} \mathrm{e}^{-\pi x^{2} n^2} dx \\
&= -2\sum_{n=1}^{\infty} (-1)^{n} \frac{\Gamma(s/2)}{2\pi^{s/2} n^{s}} \\
&= \frac{\Gamma(s/2)}{\pi^{s/2}} \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^{s}} \\
&= \frac{\Gamma(s/2)}{\pi^{s/2}} (1 – 2^{1-s}) \zeta(s)
\end{align}

We used the substitution \(y = \pi x^{2} n^2\) and the same work as above to evaluate the integral.

6.161.4

\begin{align}
\int_{0}^{\infty} x^{s-1} [\theta_{4}(0|ix^2) + \theta_{2}(0|ix^2) \,- \theta_{3}(0|ix^2)] dx
&= \int_{0}^{\infty} x^{s-1} ([\theta_{4}(0|ix^2) \,-1] + \theta_{2}(0|ix^2) \,- [\theta_{3}(0|ix^2) \,-1]) dx \\
&= \frac{\Gamma(s/2)}{\pi^{s/2}} (2^{1-s} – 1) \zeta(s)
+ \frac{2^s}{\pi ^{s/2}} \Gamma(s/2) (1-2^{-s}) \zeta(s)
\,- \frac{\Gamma(s/2)}{\pi^{s/2}} \zeta(s) \\
&= -\frac{\Gamma(s/2)}{\pi^{s/2}} \zeta(s) [1 – 2^{1-s} – 2^{-s} + 1 + 1] \\
&= -\frac{\Gamma(s/2)}{\pi^{s/2}} \zeta(s) (2^{-s} – 1)(2^{1-s} – 1)
\end{align}
Here we used the previous 3 results.

All Riemann zeta function expressions can be found here.

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

How to evaluate
\begin{equation}
\int\limits_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x
\tag{1}
\label{eq:mtc-1}
\end{equation}
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
\begin{equation}
\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)
\end{equation}

For our integral, let \(z=2\pi ax\):
\begin{equation}
\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)
\end{equation}

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

How to evaluate
\begin{equation}
\int\limits_{0}^{\infty} \frac{x^{4}}{(\mathrm{e}^{x}-1)^{2}} \mathrm{d} x
\end{equation}
was a question on Mathematics Stack Exchange which for some inexplicable reason has been closed. Here is another solution.

Let
\begin{equation}
f(x) = \frac{1}{(\mathrm{e}^{x}-1)^{2}}
\end{equation}
Then the Mellin transform of the function is
\begin{equation}
\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)]
\end{equation}
For \(s=5\), we have
\begin{equation}
\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)
\end{equation}

Integrate \(\int_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x\)

How to evaluate
\begin{equation}
\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x
\end{equation}
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
\begin{equation}
\eta(s) = \frac{1}{\Gamma(s)}\int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{x}+1} \mathrm{d} x
\end{equation}
thus our integral is
\begin{equation}
\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x = \eta(2)\Gamma(2) = \frac{\pi^{2}}{12}
\end{equation}

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.

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

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

We will evaluate this integral using two methods. First, taking the hint given by Blagouchine, we expand the function
\begin{equation}
f(x) = \frac{1}{\mathrm{e}^{bx}-1}
\label{eq:160817-2}
\tag{2}
\end{equation}
and then integrate term by term.

\begin{equation}
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}
\end{equation}

We commence with
\begin{equation}
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}
\end{equation}

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
\begin{equation}
\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}
\end{equation}

We can evaluate this integral quite simply if we recognize that it can be written as a Mellin transform
\begin{equation}
\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}
\end{equation}
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
\begin{equation}
\frac{d\Gamma(z)}{dz} = \Gamma(z)\psi^{(0)}(z)
\end{equation}

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

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.

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

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
\begin{equation}
\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x
\label{eq:160813a2}
\tag{2}
\end{equation}

where
\begin{equation}
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}
\end{equation}
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
\begin{equation}
\mathrm{B}(s,2-s) = \frac{\Gamma(s)\Gamma(2-s)}{\Gamma(2)} = \Gamma(s)\Gamma(2-s)
\label{eq:160813a6}
\tag{6}
\end{equation}
To take derivatives, we note that
\begin{equation}
\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)
\end{equation}
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
\begin{equation}
\psi^{(0)}(1) = -\gamma \quad \mathrm{and} \quad \psi^{(1)}(1) = \frac{\pi^{2}}{6}
\end{equation}
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.

Integrate \(\int_{0}^{\infty} \mathrm{ln}^{2}(x)\,(1+x^{2})^{-1} \mathrm{d} x \)

The following integral was a question on Mathematics Stack Exchange

\begin{equation}
\int\limits_{0}^{\infty} \frac{\mathrm{ln}^{2}(x)}{1+x^{2}} \mathrm{d} x
\label{eq:1608131}
\tag{1}
\end{equation}

Let us evaluate it via the Mellin transform
\begin{equation}
\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x
\label{eq:1608132}
\tag{2}
\end{equation}

where
\begin{equation}
f(x) = \frac{1}{1+x^{2}}
\label{eq:1608133}
\tag{3}
\end{equation}

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

And thus
\begin{align}
\int\limits_{0}^{\infty} \frac{\mathrm{ln}^{2}(x)}{1+x^{2}} \mathrm{d} x & = \frac{\mathrm{d}^{2}}{\mathrm{d}s^{2}} \int\limits_{0}^{\infty} \frac{x^{s-1}}{1+x^{2}} \mathrm{d} x |_{s=1} \\
& = \frac{\mathrm{d}^{2}}{\mathrm{d}s^{2}} \frac{\pi}{2}\csc\left(\frac{\pi}{2}s\right) |_{s=1} \\
& = \frac{\pi^{3}}{16}[\cos(\pi s) + 3]\csc^{3}\left(\frac{\pi}{2}s\right) |_{s=1} \\
& = \frac{\pi^{3}}{8}
\label{eq:1608135}
\tag{5}
\end{align}

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

The following integral was a question on Mathematics Stack Exchange

\begin{equation}
\int\limits_{0}^{1} \frac{\mathrm{ln}^{3}(x)}{1+x} \mathrm{d} x
\label{eq:160812a1}
\tag{1}
\end{equation}

We begin with the substitution \(x=\mathrm{e}^{-y}\) so our integral becomes
\begin{equation}
-\int\limits_{0}^{\infty} \frac{y^{3}}{1+\mathrm{e}^{\,y}} \mathrm{d} y
\label{eq:160812a2}
\tag{2}
\end{equation}

This integral is a Mellin transform of the function
\begin{equation}
f(y) = \frac{1}{1+\mathrm{e}^{\,y}}
\label{eq:160812a3}
\tag{3}
\end{equation}
where the Mellin transform is defined as
\begin{equation}
\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x
\label{eq:160812a4}
\tag{4}
\end{equation}

From Tables of Integral Transforms (Bateman Manuscript) Volume 1, we have
\begin{equation}
\mathcal{M}[(\mathrm{e}^{\alpha x} + 1)^{-1}](s) = \frac{1}{\alpha^{s}} \Gamma(s) (1-2^{1-s}) \zeta(s)
\label{eq:160812a5}
\tag{5}
\end{equation}

With \(s = 4\) and \(\alpha = 1\) we have
\begin{equation}
-\int\limits_{0}^{\infty} \frac{y^{3}}{1+\mathrm{e}^{\,y}} \mathrm{d} y = -\Gamma(4) (1-2^{1-4}) \zeta(4) = -\frac{7\pi^{4}}{120}
\label{eq:160812a6}
\tag{6}
\end{equation}

Thus
\begin{equation}
\int\limits_{0}^{1} \frac{\mathrm{ln}^{3}(x)}{1+x} \mathrm{d} x = -\frac{7\pi^{4}}{120}
\label{eq:160812a7}
\tag{7}
\end{equation}

Addendum

We can rewrite \eqref{eq:160812a5} as
\begin{align}
\mathcal{M}[(\mathrm{e}^{\alpha x} + 1)^{-1}](s) & = \frac{1}{\alpha^{s}} \Gamma(s) (1-2^{1-s}) \zeta(s) \\
& = \frac{1}{\alpha^{s}} \Gamma(s) \eta(s)
\label{eq:160812a8}
\tag{8}
\end{align}
where
\begin{equation}
\eta(s) = (1-2^{1-s}) \zeta(s) = \sum\limits_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^{s}}
\end{equation}
is the Dirichlet eta function, also known as the alternating Riemann zeta function.

Note that for Wolfram Alpha, \(\eta(s)\) defaults to the Dedekind eta function. To obtain the Dirichlet eta function type “dirichlet eta(s)”.