Remarks on Evaluating Elliptic Integrals of Gradshteyn and Ryzhik

Most of the elliptic integrals in Gradshteyn and Ryzhik are in sections 3.13-3.18, but there are many others scattered throughout the book. GR groups them, as they do most integrals, by the appearance of the integrand. This is unfortunate, as the substitutions required to evaluate these integrals do not conform to this scheme. More on this below.

All books that cover the evaluation of elliptic integrals provide some guidance regarding the required substitution. Some books provide a generic form with unknown parameters, while others provide specific substitutions for specific type of integrals.

In Handbook of Elliptic Integrals for Engineers and Scientists, the authors, Byrd and Friedman, use the following approach to evaluate elliptic integrals. First, they provide values for the unknown parameters of generic substitutions mentioned above. Next, they group integrals into sections based on a single substitution. These integrals are then reduced to integrals of functions of Jacobi elliptic functions. Such integrals appear repeatedly throughout the book, thus BF then provide evaluations of these integrals of functions of Jacobi elliptic functions in other sections. However, they do not provide the final answer in terms of the original variables (GR does do this).

On this blog I have been establishing results that will lead to evaluation of elliptic integrals. I have been working through the BF procedure in reverse. Now, I will use the following steps to evaluate the elliptic integrals of GR.

I will follow the groupings used in BF and map the results to the numbering scheme of GR. Using the substitutions provided by BF, I will work out all of the substitutions required, including the derivative to change variables. This step is straightforward, but care is required to avoid using the wrong Jacobi elliptic function expression so as to achieve the desired simplification as opposed to a complicated algebraic expression of Jacobi elliptic functions. Here, I will also write out the simplified form of the relevant Jacobi elliptic functions in terms of the original variables. Again, care must be exercised to achieve desired simplified results. Now, evaluation of elliptic integrals has been reduced to using these substitutions and simplifications, combined with previous work done to derive relationships between, derivatives of, and integrals of Jacobi elliptic functions.

Integrals of Rational Functions of Jacobi Elliptic Functions

Note that this post will be continuously updated as results are required for evaluating other integrals.

We use results from the relationships among squares of Jacobi elliptic functions.

Also, we use the numbering scheme of Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman.

We begin with the definition of the incomplete elliptic integral of the third kind
\begin{equation}
\Pi(\phi,\alpha^{2},k) = \int \frac{du}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}(u,k)}
\end{equation}

and
\begin{equation}
\int du = u
\end{equation}
which we note here as we drop the differential and dependent variables in the work below.

BF 337.01

We begin with
\begin{align}
\int \frac{\alpha^{2}\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} &= \int \frac{1 \,-\, 1 + \alpha^{2}\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} \\
&= \int \frac{1}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} \,-\, \int \frac{1 \,-\, \alpha^{2}\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} = \Pi \,-\, u
\end{align}
Rearranging yields
\begin{equation}
\int \frac{\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} = \frac{\Pi \,-\, u}{\alpha^{2}}
\end{equation}

BF 338.01

\begin{align}
\int \frac{\mathrm{cn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} &= \int \frac{1}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} \,-\, \int \frac{\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} \\
&= \Pi \,-\, \frac{\Pi \,-\, u}{\alpha^{2}} = \frac{1}{\alpha^{2}}\left[(\alpha^{2} \,-\, 1)\Pi + u \right]
\end{align}

BF 339.01

\begin{align}
\int \frac{\mathrm{dn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} &= \int \frac{1 \,-\, k^{2}\mathrm{sn}^{2}}{1 \,-\, \alpha^{2}\mathrm{sn}^{2}} \\
&= \Pi \,-\, \frac{k^{2}}{\alpha^{2}}(\Pi \,-\, u) = \frac{1}{\alpha^{2}}\left[(\alpha^{2} \,-\, k^{2})\Pi + k^{2}u \right]
\end{align}

Integrals of Jacobi Elliptic Functions Raised to the Power 4

We use combinations of the following to evaluate integrals in this post:

All results can be found in section 310 – 321 of Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman. We use their equation numbering scheme.

BF 310.04

\begin{align}
\int \mathrm{sn}^{4} &= \int \mathrm{sn}^{2} (1 \,-\, \mathrm{cn}^{2}) = \int \mathrm{sn}^{2} \,-\, \int \mathrm{sn}^{2} \mathrm{cn}^{2} \\
&= \frac{1}{3k^{4}}\left[(k^{2} + 2)u \,-\, 2(k^{2} + 1)E + k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{align}
We used GR 5.134.1 and BF 361.01.

BF 312.04

\begin{align}
\int \mathrm{cn}^{4} &= \int \mathrm{cn}^{2} (1 \,-\, \mathrm{sn}^{2}) = \int \mathrm{cn}^{2} \,-\, \int \mathrm{sn}^{2} \mathrm{cn}^{2} \\
&= \frac{1}{3k^{4}}[{k^{\prime}}^{2}(2 \,-\, 3k^{2})u + 2(2k^{2} \,-\, 1)E + k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} ]
\end{align}
We used GR 5.134.2 and BF 361.01.

BF 314.04

\begin{align}
\int \mathrm{dn}^{4} &= \int \mathrm{dn}^{2} (1 \,-\, k^{2}\mathrm{sn}^{2}) = \int \mathrm{dn}^{2} \,-\, k^{2}\int \mathrm{sn}^{2} \mathrm{dn}^{2} \\
&= \frac{1}{3}[2(1 + {k^{\prime}}^{2})E \,-\, {k^{\prime}}^{2}u + k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} ]
\end{align}
We used GR 5.134.3 and BF 361.02.

Continue reading “Integrals of Jacobi Elliptic Functions Raised to the Power 4”

Integrals of Gradshteyn and Ryzhik: 2.484 – Combinations of hyperbolic functions, exponentials, and powers

Preliminary Work

We use the following definition of the exponential integral function
\begin{equation}
\mathrm{Ei}(z) = \int_{-\infty}^{z} \frac{\mathrm{e}^{x}}{x}dx
\end{equation}
We also have,
\begin{equation}
\mathrm{Ei}(kz) = \int_{-\infty}^{kz} \frac{\mathrm{e}^{w}}{w}dw
\end{equation}
which can be obtained by letting \(w=kx\).

Additionally, we will require the following, which can be obtained via integration by parts
\begin{equation}
\label{eq:180831-1}
\tag{1}
\int \frac{\mathrm{e}^{kx}}{x^{2}}dx = -\,\frac{\mathrm{e}^{kx}}{x} + k\int \frac{\mathrm{e}^{kx}}{x} = k\,\mathrm{Ei}(kx)\,-\,\frac{\mathrm{e}^{kx}}{x}
\end{equation}

For numbers 1-4 below, \(a^{2} \ne b^{2}\), while for 5-10, \(a = b\).

2.484.1

\begin{align}
\int \frac{1}{x}\mathrm{e}^{ax}\sinh(bx)\,dx &= \frac{1}{2} \int \frac{1}{x}[\mathrm{e}^{(a+b)x} \,-\, \mathrm{e}^{(a-b)x}] \\
&= \frac{1}{2} \left(\mathrm{Ei}[(a+b)x] \,-\, \mathrm{Ei}[(a-b)x]\right)
\end{align}

2.484.2

\begin{align}
\int \frac{1}{x}\mathrm{e}^{ax}\cosh(bx)\,dx &= \frac{1}{2} \int \frac{1}{x}[\mathrm{e}^{(a+b)x} + \mathrm{e}^{(a-b)x}] \\
&= \frac{1}{2} \left(\mathrm{Ei}[(a+b)x] + \mathrm{Ei}[(a-b)x]\right)
\end{align}

Continue reading “Integrals of Gradshteyn and Ryzhik: 2.484 – Combinations of hyperbolic functions, exponentials, and powers”

Integrals of Pairs of Products of Squares of Jacobi Elliptic Functions

We use combinations of the following to evaluate integrals in this post:

The order of presentation here is done to avoid look ahead bias, thus avoiding circularity when referencing previous results.

All results can be found in section 361 of Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman. We use their equation numbering scheme.

Note that this post will be continuously updated as results are required for evaluating other integrals.

BF 361.02

We begin with
\begin{equation}
\frac{\partial}{\partial u}\mathrm{cn} = -\,\mathrm{sn} \, \mathrm{dn}
\end{equation}
Squaring both sides, integrating by parts, and then making substitutions for \(\mathrm{cn}^{2}\), we have
\begin{align}
\int \mathrm{sn}^{2} \mathrm{dn}^{2} &= \int \left(\frac{\partial}{\partial u}\mathrm{cn}\right) \left(\frac{\partial}{\partial u}\mathrm{cn}\right) \\
&= -\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} + \int \mathrm{cn}^{2} \mathrm{dn}^{2} – k^{2}\int \mathrm{cn}^{2} \mathrm{sn}^{2} \\
&= -\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} + \int (1 – \,\mathrm{sn}^{2})\,\mathrm{dn}^{2} – \int (\mathrm{dn}^{2} – {k^{\prime}}^{2} ) \mathrm{sn}^{2} \\
&= \frac{1}{3 k^{2}}\left[{k^{\prime}}^{2}u + (2k^{2} – 1)E \,-\, k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{align}

BF 361.01

From BF 361.02 we have
\begin{equation}
\int \mathrm{sn}^{2} ({k^{\prime}}^{2} + k^{2}\mathrm{cn}^{2}) = \frac{1}{3 k^{2}}\left[{k^{\prime}}^{2}u + (2k^{2} – 1)E \,-\, k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{equation}
Rearranging yields
\begin{equation}
\int \mathrm{sn}^{2} \mathrm{cn}^{2} = \frac{1}{3 k^{4}}\left[(2 -\,k^{2})E \,-\,2{k^{\prime}}^{2}u \,-\, k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{equation}

BF 361.03

From BF 361.02 we have
\begin{equation}
\int (1 \,-\,\mathrm{cn}^{2}) \mathrm{dn}^{2} = \frac{1}{3 k^{2}}\left[{k^{\prime}}^{2}u + (2k^{2} – 1)E \,-\, k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{equation}
Rearranging yields
\begin{equation}
\int \mathrm{dn}^{2} \mathrm{cn}^{2} = \frac{1}{3 k^{2}}\left[(1+k^{2})E \,-\,{k^{\prime}}^{2}u + k^{2}\,\mathrm{cn} \,\mathrm{dn}\,\mathrm{sn} \right]
\end{equation}

Continue reading “Integrals of Pairs of Products of Squares of Jacobi Elliptic Functions”

Evaluate the Integral \(\int_{0}^{1} \mathrm{li}(x) dx\)

\begin{equation}
\int\limits_{0}^{1} \mathrm{li}(x) dx = -\ln 2
\end{equation}
is entry 6.211 in Gradshteyn and Ryzhik’s Table of Integrals, Series, and Products.

\begin{equation}
\mathrm{li}(x) = \int\limits_{0}^{x} \frac{dt}{\ln t},\,\,|\mathrm{arg}x| \lt \pi ,\,\,|\mathrm{arg}(1-x)| \lt \pi
\end{equation}
is the logarithmic integral function.

We begin with the confluent hypergeometric function of the second kind (also known as
Tricomi’s confluent hypergeometric function)
\begin{equation}
\Psi(a,b;z) = \frac{1}{\Gamma(a)} \int\limits_{0}^{\infty} \mathrm{e}^{-zt} t^{a-1} (1+t)^{b-a-1} dt,
\,\, \mathfrak{R}(a) \gt 0,\,\, \mathfrak{R}(z) \gt 0
\end{equation}

We can express the logarithmic integral function in terms of the confluent hypergeometric function of the second kind
\begin{equation}
\mathrm{li}(x) = -x\Psi(1,1;-\ln x) = \int\limits_{0}^{\infty} \frac{x^t}{t+1} dt
\end{equation}

\begin{align}
\int\limits_{0}^{1} \mathrm{li}(x) dx &= -\int\limits_{0}^{1} \int\limits_{0}^{\infty} \frac{x^{t+1}}{t+1} dt dx \\
&= -\int\limits_{0}^{\infty} \frac{1}{t+1} \int\limits_{0}^{1} x^{t+1} dx dt \\
&= -\int\limits_{0}^{\infty} \frac{1}{(t+1)(t+2)} dt \\
&= [\ln(t+2)-\ln(t+1)]\Big|_{0}^{\infty} \\
&= -\ln 2
\end{align}

Evaluate the Integral \(\int_{0}^{\infty} \mathrm{e}^{-ax^2}\sin(wx) dx\)

This problem was posed at Mathematics Stack Exchange, here is my solution.

\begin{align}
I &= \int\limits_{0}^{\infty} \mathrm{e}^{-ax^2 + iwx} dx \\
\tag{a}
&= \mathrm{e}^{-\frac{w^2}{4a}} \int\limits_{0}^{\infty} \mathrm{e}^{-a(x-\frac{iw}{2a})^2} dx \\
&= \mathrm{e}^{-\frac{w^2}{4a}} \int \mathrm{e}^{-az^2} dz \\
&= \mathrm{e}^{-\frac{w^2}{4a}} \frac{1}{2}\sqrt{\frac{\pi}{a}} \mathrm{erf}(z\sqrt{a}) \\
&= \mathrm{e}^{-\frac{w^2}{4a}} \frac{1}{2}\sqrt{\frac{\pi}{a}}
\mathrm{erf}\left(x\sqrt{a} – \frac{iw}{2\sqrt{a}} \right) \Big|_{0}^{\infty} \\
\tag{b}
&= \mathrm{e}^{-\frac{w^2}{4a}} \frac{1}{2}\sqrt{\frac{\pi}{a}} \left[ 1 + i\,\mathrm{erfi}\left(\frac{w}{2\sqrt{a}} \right) \right]
\end{align}

a. Complete the square.

b. \(\lim_{x \to \infty} \mathrm{erf}(x + ic) = 1\) for finite \(c, \, c \in \mathbb{C}\) and \(\mathrm{erf}(-iz) = -i\mathrm{erfi}(z)\)

\begin{equation}
\int\limits_{0}^{\infty} \mathrm{e}^{-ax^2}\sin(wx) dx = \mathfrak{I}(I)
= \mathrm{e}^{-\frac{w^2}{4a}} \frac{1}{2}\sqrt{\frac{\pi}{a}} \mathrm{erfi}\left(\frac{w}{2\sqrt{a}} \right)
= \frac{1}{\sqrt{a}} \mathrm{F}\left(\frac{w}{2\sqrt{a}} \right)
\end{equation}

Where
\begin{equation}
\mathrm{F}(x) = \frac{\sqrt{\pi}}{2} \mathrm{e}^{-x} \mathrm{erfi}(x)
= \mathrm{e}^{-x^2} \int\limits_{0}^{x} \mathrm{e}^{z^2} dz
\end{equation}
is Dawson’s integral.

Evaluate the Integral \(\int_{0}^{1} \frac{\sqrt{1-x^{4}}}{1+x^{2}} dx\)

This problem was posed at Mathematics Stack Exchange, here is my solution.

Let \(z=x^{2}\)
\begin{align}
\int\limits_{0}^{1} \frac{\sqrt{1-x^{4}}}{1+x^{2}} dx &=
\int\limits_{0}^{1} (1-x^{2})^{1/2}(1+x^{2})^{-1/2} dx \\
&= \frac{1}{2} \int\limits_{0}^{1} (1-z)^{1/2} (1+z)^{-1/2} z^{-1/2} dz \\
&= \frac{\Gamma(1/2) \Gamma(3/2)}{2 \Gamma(2)} {}_{2}\mathrm{F}_{1}(1/2,1/2;2;-1) \\
&\approx 0.7119586
\end{align}

We used Gauss’s hypergeometric function.

Evaluate the Integral \(\int_{1}^{a^{2}} \frac{\ln x}{\sqrt{x}(x+a)} dx\)

This problem was posed at Mathematics Stack Exchange, here is my solution.

Let \(t=\sqrt{x}\)
\begin{equation}
I = \int\limits_{1}^{a^{2}} \frac{\ln x}{\sqrt{x}(x+a)} dx
= 4 \int\limits_{1}^{a} \frac{\ln t}{t^{2}+a} dt
\end{equation}

Integrating by parts, we have
\begin{align}
I_{1} &= \int\limits_{1}^{a} \frac{\ln t}{t^{2}+a} dt \\
&= \frac{\ln t}{\sqrt{a}} \tan^{-1}\left( \frac{t}{\sqrt{a}} \right) \Big|_{1}^{a}
\, – \frac{1}{\sqrt{a}} \int\limits_{1}^{a} \frac{1}{t} \tan^{-1}\left( \frac{t}{\sqrt{a}} \right) dt \\
&= \frac{\ln a}{\sqrt{a}} \tan^{-1}(\sqrt{a})
\, – \frac{1}{\sqrt{a}} \int\limits_{1}^{a} \frac{1}{t} \tan^{-1}\left( \frac{t}{\sqrt{a}} \right) dt
\end{align}

Let \(y=t/ \sqrt{a}\)
\begin{align}
I_{2} &= \int\limits_{1}^{a} \frac{1}{t} \tan^{-1}\left( \frac{t}{\sqrt{a}} \right) dt
= \int\limits_{1/\sqrt{a}}^{\sqrt{a}} \frac{1}{y} \tan^{-1}(y) dy \\
\tag{a}
&= \frac{i}{2} \left[ \int\limits_{1/\sqrt{a}}^{\sqrt{a}} \frac{\ln (1-iy)}{y} dy
\, – \int\limits_{1/\sqrt{a}}^{\sqrt{a}} \frac{\ln (1+iy)}{y} dy \right] \\
\tag{b}
&= \frac{i}{2} \left[ \mathrm{Li}_{2}(-iy) – \mathrm{Li}_{2}(iy) \right] \Big|_{1/\sqrt{a}}^{\sqrt{a}} \\
&= \frac{i}{2} \left( \left[ \mathrm{Li}_{2}(-i\sqrt{a}) + \mathrm{Li}_{2}\left(\frac{i}{\sqrt{a}}\right) \right]
– \left[ \mathrm{Li}_{2}(i\sqrt{a}) + \mathrm{Li}_{2}\left(\frac{-i}{\sqrt{a}}\right) \right] \right) \\
\tag{c}
&= \frac{i}{2} \left( \left[ -\frac{\pi ^{2}}{6} – \frac{1}{2} \ln ^{2}(i\sqrt{a}) \right]
– \left[ -\frac{\pi ^{2}}{6} – \frac{1}{2} \ln ^{2}(-i\sqrt{a}) \right] \right) \\
\tag{d}
&= \frac{\pi}{4} \ln a
\end{align}
a. \(\tan^{-1}(y) = \frac{i}{2} [\ln (1-iy) – \ln (1+iy)]\)

b. Dilogarithm function
\begin{equation}
\mathrm{Li}_{2}(z) = -\int_{0}^{z} \frac{\ln (1-x)}{x} dx
\end{equation}

c. Use the identity
\begin{equation}
\mathrm{Li}_{2}(z) + \mathrm{Li}_{2}(1/z) = -\frac{\pi ^{2}}{6} – \frac{1}{2} \ln ^{2}(-z)
\end{equation}

d. \(\ln (\pm iz) = \ln z \pm i\pi /2\)

Now we have
\begin{equation}
I = 4I_{1} = \frac{4}{\sqrt{a}} (\ln a) \tan^{-1}(\sqrt{a}) \, – \frac{\pi}{\sqrt{a}} \ln a
\end{equation}

Evaluate the Integral \(\int_{x_{0}}^{1} (1-x)^{a} x^{-a} dx\)

This problem was posed at Mathematics Stack Exchange, here is my solution.

\begin{align}
\int\limits_{x_{0}}^{1} (1-x)^{a} x^{-a} dx
&= \int\limits_{0}^{1} (1-x)^{a} x^{-a} dx – \int\limits_{0}^{x_{0}} (1-x)^{a} x^{-a} dx \\
&= \mathrm{B}(1-a,1+a) – \mathrm{B}_{x_{0}}(1-a,1+a) \\
&= \Gamma(1-a)\Gamma(1+a) – \frac{x_{0}^{1-a}}{1-a} \, {}_{2}\mathrm{F}_{1}(1-a,-1;2-a;x_{0})
\end{align}

We have used the incomplete beta function and Gauss’s hypergeometric function.