## 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.

## Preliminary Work

We use the following definition of the exponential integral function

\mathrm{Ei}(z) = \int_{-\infty}^{z} \frac{\mathrm{e}^{x}}{x}dx

We also have,

\mathrm{Ei}(kz) = \int_{-\infty}^{kz} \frac{\mathrm{e}^{w}}{w}dw

which can be obtained by letting $$w=kx$$.

Additionally, we will require the following, which can be obtained via integration by parts

\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}

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}

## Integrals of Gradshteyn and Ryzhik: 5.132, 5.133, 5.135 – Integrals of Jacobi Elliptic Functions

In this post we evaluate integrals of the 12 Jacobi elliptic functions. For most of these integrals, there are multiple expressions which are all equal upto a constant. We use a mixed strategy. Sometimes multiple results will be obtained from the integral directly using different substitutions. Other times a result will be shown to be the same as other results that appear in GR. This latter strategy usually consists of converting between log expressions and inverse trig and hyperbolic expressions.

Also, extensive use is made of derivatives and relationships between squares of the Jacobi elliptic functions. All equation numbers are references to the latter.

When there are multiple GR solutions, each is enclosed by a blue box.

For the sake of clarity, we drop the argument $$u$$ and the modulus $$k$$ from all expressions,
thus $$\mathrm{sn}(u,k) = \mathrm{sn}$$. Additionally, we drop the $$du$$ to avoid confusion with the function $$\mathrm{dn}$$.

## 5.132.1

\begin{align}
\int \mathrm{ns} &= \int \frac{1}{\mathrm{sn}} = \int \frac{{k^{\prime}}^{2}\mathrm{sn}}{{k^{\prime}}^{2}\mathrm{sn}^{2}}
= {k^{\prime}}^{2} \int \frac{\mathrm{sn}}{\mathrm{dn}^{2} – \mathrm{cn}^{2}}
= {k^{\prime}}^{2} \int \frac{\mathrm{sn}}{\mathrm{cn}^{2}} \frac{1}{(\mathrm{dn}/\mathrm{cn})^{2} – 1} \\
&= \int \frac{dw}{w^{2}-1} = \frac{1}{2} \ln\left(\frac{1-w}{1+w}\right)
= \frac{1}{2} \ln\left(\frac{\mathrm{cn} – \mathrm{dn}}{\mathrm{cn} + \mathrm{dn}}\right)
\end{align}
We used equation 17 and the substitution $$w=\mathrm{dn}/\mathrm{cn} = \mathrm{dc}$$.

To obtain the form of the solution in GR, we expand the logarithm and again use equation 17 (factored).
\begin{align}
\frac{1}{2} \ln\left(\frac{\mathrm{cn} – \mathrm{dn}}{\mathrm{cn} + \mathrm{dn}}\right) &=
\frac{1}{2} [\ln(\mathrm{cn} – \mathrm{dn}) – \ln(\mathrm{cn} + \mathrm{dn})] \\
&= \frac{1}{2} \ln(k^{2}-1) + \ln(\mathrm{sn})- \frac{1}{2} \ln(\mathrm{cn} + \mathrm{dn})
– \frac{1}{2} \ln(\mathrm{cn} + \mathrm{dn}) \\
&= \bbox[5px,border:2px solid blue] {\ln\left(\frac{\mathrm{sn}}{\mathrm{cn} + \mathrm{dn}}\right)} + \frac{1}{2} \ln(k^{2}-1)
\end{align}
the first term is the solution given in GR, while the second term is a constant of integration.

Using equation 17 again, we have
\begin{align}
\frac{1}{2} \ln\left(\frac{\mathrm{cn} – \mathrm{dn}}{\mathrm{cn} + \mathrm{dn}}\right) &=
\frac{1}{2} \ln\left(-\frac{(\mathrm{dn}\,-\mathrm{cn})^2}{\mathrm{dn}^{2}-\mathrm{cn}^{2}} \right)
= \frac{1}{2} \ln\left(-\frac{(\mathrm{dn}\,-\mathrm{cn})^2}{{k^{\prime}}^{2}\mathrm{sn}^{2}} \right) \\
&= \bbox[5px,border:2px solid blue] { \ln\left(\frac{\mathrm{dn}\,-\mathrm{cn}}{\mathrm{sn}} \right) } \,- \ln k^{\prime} + \frac{1}{2} \ln(-1)
\end{align}

## Integrals of Gradshteyn and Ryzhik: 5.134 – Integrals of Squares of Jacobi Elliptic Functions – Revised

In this post, we make use of results from Relationships Between Squares of Jacobi Elliptic Functions, Derivatives of Jacobi Elliptic Functions, and Derivatives of Jacobi Elliptic Functions – Part 2. We will refer to equations in the first and third of these posts with i.e 12s and 12d2.

Note that only the first three integrals appear explicitly in Gradshteyn and Ryzhik. The other 9 appear implicitly as part of solutions of elliptic integrals. Thus we establish results here and label them for use in future posts. These 9 integrals can be found in Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman, sections 310 – 321.

Addendum – Previously, we used the integrals of products of pairs of Jacobi elliptic functions to evaluate some of the integrals in this post. This method was somewhat dubious as it was due to working backwards from known results. We have revised the work so that we only require knowledge of derivatives of single Jacobi elliptic functions and thus no need to “look ahead”. We now do this below and rearrange the order so that it is clear how all integrals were evaluated.

## GR 5.134.3

\int \mathrm{dn}^{2}(u,k)\,du = \mathrm{E}(\mathrm{am}\,u,k) = \mathrm{E}(u)

this is a definition of the incomplete elliptic integral of the second kind. $$\mathrm{am}\,u$$ is the amplitude function.

## GR 5.134.1

\int \mathrm{sn}^{2} = \int \frac{1}{k^2}\left[ 1 – \mathrm{dn}^{2}\right] = \frac{1}{k^2}\left[u -\mathrm{E}\right]

We used GR 5.134.3.

## GR 5.134.2

\begin{align}
\int \mathrm{cn}^{2} &= \int [1-\mathrm{sn}^{2}] = u-\frac{u}{k^2}+\frac{\mathrm{E}}{k^2} \\
&= \frac{1}{k^2}\left[\mathrm{E} \,-{k^{\prime}}^{2}u \right]
\end{align}
We used GR 5.134.3.

## Integrals of Gradshteyn and Ryzhik: 2.671 and 2.672 – Combinations of trigonometric and hyperbolic functions

Here, integration by parts is used twice for each integral. We repeatedly use the following:

## 2.671.1

\int\sinh(ax+b)\sin(cx+d) dx = -\frac{\sinh(ax+b)\cos(cx+d)}{c} + \frac{a}{c}\int\cosh(ax+b)\cos(cx+d) dx

= -\frac{\sinh(ax+b)\cos(cx+d)}{c} + \frac{a}{c} \left[ \frac{\cosh(ax+b)\sin(cx+d)}{c}\,-\frac{a}{c}\int\sinh(ax+b)\sin(cx+d) dx \right]

= \frac{a\,\cosh(ax+b)\sin(cx+d)\,-c\,\sinh(ax+b)\cos(cx+d)}{a^2 + c^2}

## 2.671.2

\int\sinh(ax+b)\cos(cx+d) dx = \frac{\sinh(ax+b)\sin(cx+d)}{c} \,- \frac{a}{c}\int\cosh(ax+b)\sin(cx+d) dx

= \frac{\sinh(ax+b)\sin(cx+d)}{c} \,- \frac{a}{c} \left[-\frac{\cosh(ax+b)\cos(cx+d)}{c}+\frac{a}{c}\int\sinh(ax+b)\cos(cx+d) dx \right]

= \frac{a\,\cosh(ax+b)\cos(cx+d) + c\,\sinh(ax+b)\sin(cx+d)}{a^2 + c^2}

## 2.671.3

\int\cosh(ax+b)\sin(cx+d) dx = -\frac{\cosh(ax+b)\cos(cx+d)}{c} + \frac{a}{c}\int\sinh(ax+b)\cos(cx+d) dx

= -\frac{\cosh(ax+b)\cos(cx+d)}{c} + \frac{a}{c} \left[ \frac{\sinh(ax+b)\sin(cx+d)}{c}\,-\frac{a}{c}\int\cosh(ax+b)\sin(cx+d) dx \right]

= \frac{a\,\sinh(ax+b)\sin(cx+d)\,-c\,\cosh(ax+b)\cos(cx+d)}{a^2 + c^2}

## 2.671.4

\int\cosh(ax+b)\cos(cx+d) dx = \frac{\cosh(ax+b)\sin(cx+d)}{c} \,- \frac{a}{c}\int\sinh(ax+b)\sin(cx+d) dx

= \frac{\cosh(ax+b)\sin(cx+d)}{c} \,- \frac{a}{c} \left[-\frac{\sinh(ax+b)\cos(cx+d)}{c}+\frac{a}{c}\int\cosh(ax+b)\cos(cx+d) dx \right]

= \frac{a\,\sinh(ax+b)\cos(cx+d) + c\,\cosh(ax+b)\sin(cx+d)}{a^2 + c^2}

## 2.672.1

Let $$a=c=1,\,b=d=0$$ in 2.671.1

\int\sinh(x)\sin(x) dx = \frac{1}{2}[\cosh(x)\sin(x)\,- \sinh(x)\cos(x)]

## 2.672.2

Let $$a=c=1,\,b=d=0$$ in 2.671.2

\int\sinh(x)\cos(x) dx = \frac{1}{2}[\sinh(x)\sin(x)+ \cosh(x)\cos(x)]

## 2.672.3

Let $$a=c=1,\,b=d=0$$ in 2.671.3

\int\cosh(x)\sin(x) dx = \frac{1}{2}[\sinh(x)\sin(x)\,- \cosh(x)\cos(x)]

## 2.672.4

Let $$a=c=1,\,b=d=0$$ in 2.671.4

\int\cosh(x)\cos(x) dx = \frac{1}{2}[\cosh(x)\sin(x)+ \sinh(x)\cos(x)]

## Integrals of Gradshteyn and Ryzhik: 2.723 – Combinations of Logarithms and Algebraic Functions

The strategy for all three integrals is to use a different integrand, parameterized, differentiate under the integral, then apply a limit to recover the desired integral.

## 2.723.1

The integral to be evaluated is

I = \int x^{n}\ln(x) dx

Let

I(a) = \int x^{a-1} dx = \frac{x^a}{a}

so that
\begin{align}
\frac{\partial}{\partial a}I(a) &= \int x^{a-1}\ln(x) dx \\
&= \frac{\partial}{\partial a} \frac{x^a}{a} = x^{a} \left[\frac{\ln(x)}{a}\,- \frac{1}{a^2} \right]
\end{align}

\lim_{a \to n+1} \frac{\partial}{\partial a}I(a) \Rightarrow
I = \bbox[5px,border:2px solid blue] {\int x^{n}\ln(x) dx = x^{n+1} \left[\frac{\ln(x)}{n+1}\,- \frac{1}{(n+1)^2} \right]}

## 2.723.2

The integral to be evaluated is

I = \int x^{n}\ln^{2}(x) dx

\begin{align}
\frac{{\partial}^2}{\partial a^2}I(a) &= \int x^{a-1}\ln^{2}(x) dx \\
&= \frac{\partial}{\partial a} \left[\ln(x) \frac{x^a}{a}\,- \frac{x^a}{a^2} \right]
= x^{a} \left[\frac{\ln^{2}(x)}{a}\, – \frac{2\ln(x)}{a^2} + \frac{2}{a^3} \right]
\end{align}

\lim_{a \to n+1} \frac{{\partial}^2}{\partial a^2}I(a) \Rightarrow
I = \bbox[5px,border:2px solid blue] {\int x^{n}\ln^{2}(x) dx
= x^{n+1} \left[\frac{\ln^{2}(x)}{n+1}\, – \frac{2\ln(x)}{(n+1)^2} + \frac{2}{(n+1)^3} \right]}

## 2.723.3

The integral to be evaluated is

I = \int x^{n}\ln^{3}(x) dx

\begin{align}
\frac{{\partial}^3}{\partial a^3}I(a) &= \int x^{a-1}\ln^{3}(x) dx \\
&= \frac{\partial}{\partial a} \left( x^{a} \left[\frac{\ln^{2}(x)}{a}\, – \frac{2\ln(x)}{a^2} + \frac{2}{a^3} \right] \right) \\
&= x^{a} \left[\frac{\ln^{3}(x)}{a} \,- \frac{3\ln^{2}(x)}{a^2} + \frac{6\ln(x)}{a^3} \,- \frac{6}{a^4} \right]
\end{align}

\lim_{a \to n+1} \frac{{\partial}^2}{\partial a^3}I(a) \Rightarrow

I = \bbox[5px,border:2px solid blue] {\int x^{n}\ln^{2}(x) dx
= x^{n+1} \left[\frac{\ln^{3}(x)}{n+1} \,- \frac{3\ln^{2}(x)}{(n+1)^2} + \frac{6\ln(x)}{(n+1)^3} \,- \frac{6}{(n+1)^4} \right]}

## 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

\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

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

## 5.136.1

\int \mathrm{sn}\,\mathrm{cn} = -\frac{1}{k^2}\mathrm{dn}

## 5.136.2

\int \mathrm{sn}\,\mathrm{dn} = -\mathrm{cn}

## 5.136.3

\int \mathrm{cn}\,\mathrm{dn} = \mathrm{sn}

The three integrals above follow from the derivatives of the Jacobi elliptic functions.

## 5.137.1

\int \frac{\mathrm{sn}}{\mathrm{cn}^2} = \frac{1}{{k^{\prime}}^2} \frac{\mathrm{dn}}{\mathrm{cn}} = \frac{1}{{k^{\prime}}^2} \mathrm{dc}

## 5.137.2

\int \frac{\mathrm{sn}}{\mathrm{dn}^2} = -\frac{1}{{k^{\prime}}^2} \frac{\mathrm{cn}}{\mathrm{dn}}
= -\frac{1}{{k^{\prime}}^2} \mathrm{cd}

## 5.137.3

\int \frac{\mathrm{cn}}{\mathrm{sn}^2} = -\frac{\mathrm{dn}}{\mathrm{sn}} = -\mathrm{ds}

## 5.137.4

\int \frac{\mathrm{cn}}{\mathrm{dn}^2} = \frac{\mathrm{sn}}{\mathrm{dn}} = \mathrm{sd}

## 5.137.5

\int \frac{\mathrm{dn}}{\mathrm{sn}^2} = -\frac{\mathrm{cn}}{\mathrm{sn}} = -\mathrm{cs}

## 5.137.6

\int \frac{\mathrm{dn}}{\mathrm{cn}^2} = \frac{\mathrm{sn}}{\mathrm{cn}} = \mathrm{sc}

The six integrals above follow from the derivatives of the Jacobi elliptic functions.

## 5.138.1

\begin{align}
\int \frac{\mathrm{cn}}{\mathrm{sn}\,\mathrm{dn}} &= \int \frac{\mathrm{cn}}{\mathrm{sn}\,\mathrm{dn}} \frac{\mathrm{dn}}{\mathrm{dn}} = \int \frac{\mathrm{cn}}{\mathrm{dn}^2} \frac{1}{\mathrm{sd}} \\
&= \int \frac{1}{w} = \ln(\mathrm{sd}) = \ln\left(\frac{\mathrm{sn}}{\mathrm{dn}}\right)
\end{align}
We used the substitution $$w=\mathrm{sd}$$.

## 5.138.2

\begin{align}
\int \frac{\mathrm{sn}}{\mathrm{cn}\,\mathrm{dn}} &= \int \frac{\mathrm{sn}}{\mathrm{cn}\,\mathrm{dn}} \frac{\mathrm{cn}}{\mathrm{cn}} = \int \frac{\mathrm{sn}}{\mathrm{cn}^2} \frac{1}{\mathrm{dc}} \\
&= \frac{1}{{k^{\prime}}^2} \int \frac{1}{w} = \frac{1}{{k^{\prime}}^2} \ln(\mathrm{dc}) = \frac{1}{{k^{\prime}}^2} \ln\left(\frac{\mathrm{dn}}{\mathrm{cn}}\right)
\end{align}
We used the substitution $$w=\mathrm{dc}$$.

## 5.138.3

\begin{align}
\int \frac{\mathrm{dn}}{\mathrm{sn}\,\mathrm{cn}} &= \int \frac{\mathrm{dn}}{\mathrm{sn}\,\mathrm{cn}} \frac{\mathrm{cn}}{\mathrm{cn}} = \int \frac{\mathrm{dn}}{\mathrm{cn}^2} \frac{1}{\mathrm{sc}} \\
&= \int \frac{1}{w} = \ln(\mathrm{sc}) = \ln\left(\frac{\mathrm{sn}}{\mathrm{cn}}\right)
\end{align}
We used the substitution $$w=\mathrm{sc}$$.

## 5.139.1

\int \frac{\mathrm{cn}\,\mathrm{dn}}{\mathrm{sn}} = \int \frac{1}{w} = \ln(\mathrm{sn})

## 5.139.2

\begin{align}
\int \frac{\mathrm{sn}\,\mathrm{dn}}{\mathrm{cn}} &= \int \frac{\mathrm{sn}\,\mathrm{dn}}{\mathrm{cn}} \frac{\mathrm{cn}}{\mathrm{cn}} = \int \frac{\mathrm{sn}\,\mathrm{dn}}{\mathrm{cn}^2} \frac{1}{\mathrm{nc}} \\
&= \int \frac{1}{w} = \ln(\mathrm{nc}) = \ln\left(\frac{1}{\mathrm{cn}}\right)
\end{align}
We used the substitution $$w=\mathrm{nc}$$.

## 5.139.3

\int \frac{\mathrm{cn}\,\mathrm{sn}}{\mathrm{dn}} = -\frac{1}{k^2} \int \frac{1}{w} = -\frac{1}{k^2} \ln(\mathrm{dn})

## Integrals of Gradshteyn and Ryzhik: 3.267

We use the following definitions of the gamma and beta functions:

\Gamma(z) = \int\limits_{0}^{\infty} \mathrm{e}^{-t} t^{z-1} dt, \,\, \mathfrak{R}(z) \gt 0

\mathrm{B}(a,b) = \int\limits_{0}^{1} t^{a-1} (1-t)^{b-1} dt
= \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}, \,\, \mathfrak{R}(a) \gt 0 \,\, \mathrm{and} \,\, \mathfrak{R}(b) \gt 0

## 3.267.1

\begin{align}
\int\limits_{0}^{1} x^{3n} (1-x^3)^{-1/3} dx
&= \frac{1}{3} \int\limits_{0}^{1} y^{n-2/3} (1-y)^{-1/3} dy
= \frac{1}{3} \mathrm{B}\left( \frac{2}{3},n+\frac{1}{3} \right) \\
&= \frac{\Gamma\left(\frac{2}{3}\right) \Gamma\left(n + \frac{1}{3}\right)}{3\Gamma(n+1)}
= \frac{2\pi}{3\sqrt{3}} \frac{\Gamma\left(n + \frac{1}{3}\right)}{\Gamma\left(\frac{1}{3}\right) \Gamma(n+1)}
\end{align}

## 3.267.2

\begin{align}
\int\limits_{0}^{1} x^{3n-1} (1-x^3)^{-1/3} dx
&= \frac{1}{3} \int\limits_{0}^{1} y^{n-1} (1-y)^{-1/3} dy
= \frac{1}{3} \mathrm{B}\left(n, \frac{2}{3} \right) \\
&= \frac{\Gamma(n)\Gamma(2/3)}{3\Gamma\left(n + \frac{2}{3}\right)}
= \frac{(n-1)! \Gamma(2/3)}{3\Gamma\left(n + \frac{2}{3}\right)}
\end{align}

## 3.267.3

\begin{align}
\int\limits_{0}^{1} x^{3n-2} (1-x^3)^{-1/3} dx
&= \frac{1}{3} \int\limits_{0}^{1} y^{n-4/3} (1-y)^{-1/3} dy
= \frac{1}{3} \mathrm{B}\left( \frac{2}{3}, n \, – \frac{1}{3} \right) \\
&= \frac{\Gamma\left(n – \frac{1}{3}\right)\Gamma(2/3)}{3\Gamma\left(n + \frac{1}{3}\right)}
\end{align}

we used the substitution $$y=x^3$$ for all three integrals.

## Integrals of Gradshteyn and Ryzhik: 3.322

We define the error function as:

\mathrm{erf}(z) = \frac{2}{\sqrt{\pi}} \int\limits_{0}^{z} \mathrm{e}^{-x^2} dx

## 3.322.1

\begin{align}
\int\limits_{u}^{\infty} \mathrm{e}^{-2ax-x^2} dx
&= \mathrm{e}^{a^2} \int\limits_{u}^{\infty} \mathrm{e}^{-(x+a)^2} dx
= \mathrm{e}^{a^2} \int\limits_{u+a}^{\infty} \mathrm{e}^{-y^2} dy \\
&= \frac{\sqrt{\pi}}{2} \mathrm{e}^{a^2} \mathrm{erf}(y) \Bigg|_{u+a}^{\infty} \\
&= \frac{\sqrt{\pi}}{2} \mathrm{e}^{a^2} \left[1-\,\mathrm{erf}(u+a)\right],\,\, u \gt 0
\end{align}
We completed the square in the argument of the exponential function and then used
the substitution $$y=x+a$$.

## 3.322.2

\int\limits_{0}^{\infty} \mathrm{e}^{-2ax-x^2} dx =
\frac{\sqrt{\pi}}{2} \mathrm{e}^{a^2} \left[1-\,\mathrm{erf}(a)\right]

follows from 3.322.1.

## 3.322.3

\mathrm{PV} \int\limits_{0}^{\infty} \mathrm{e}^{\pm i\lambda x^2} dx
= \frac{1}{\sqrt{\lambda}} \int\limits_{0}^{\infty} \mathrm{e}^{\pm i y^2} dy
= \frac{1}{2}\sqrt{\frac{\pi}{\lambda}} \mathrm{e}^{\pm i \pi /4}

we let $$y^2=\lambda x^2$$ and this problem was solved here.