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

## 5.132.2

\begin{align}
\int \mathrm{nc} &= \int \frac{1}{\mathrm{cn}} = \int \frac{\mathrm{cn}}{\mathrm{cn}^2}
= \int \frac{\mathrm{cn}}{\mathrm{dn}^{2} – {k^{\prime}}^{2}\mathrm{sn}^{2}}
= \int \frac{\mathrm{cn}}{\mathrm{dn}^{2}} \frac{1}{1 – (k^{\prime}\mathrm{sn}/\mathrm{dn})^2} \\
&= \frac{1}{k^{\prime}} \int \frac{dw}{1 – w^{2}} = \frac{1}{2 k^{\prime}} \ln\left(\frac{1+w}{1-w}\right)
= \frac{1}{2 k^{\prime}} \ln\left(\frac{\mathrm{dn} + k^{\prime}\mathrm{sn}}{\mathrm{dn} – k^{\prime}\mathrm{sn}}\right) \\
&= \frac{1}{2 k^{\prime}} \ln\left(\frac{\mathrm{dn} + k^{\prime}\mathrm{sn}}{\mathrm{dn} – k^{\prime}\mathrm{sn}}\,\frac{\mathrm{dn} + k^{\prime}\mathrm{sn}}{\mathrm{dn} + k^{\prime}\mathrm{sn}}\right)
= \frac{1}{2 k^{\prime}} \ln\left(\frac{[\mathrm{dn} + k^{\prime}\mathrm{sn}]^2}{\mathrm{dn}^{2}-{k^{\prime}}^{2}\mathrm{sn}^{2}}\right) \\
&= \frac{1}{2 k^{\prime}} \ln\left(\frac{[\mathrm{dn} + k^{\prime}\mathrm{sn}]^2}{\mathrm{cn}^2}\right)
= \frac{1}{k^{\prime}} \ln\left(\frac{\mathrm{dn} + k^{\prime}\mathrm{sn}}{\mathrm{cn}}\right)
\end{align}
We used equation 17 in the first line along with the substitution $$w=k^{\prime}\mathrm{sn}/\mathrm{dn} = k^{\prime}\mathrm{sd}$$. Then we used equation 17 again in the last line.

## 5.132.3

\begin{align}
\int \mathrm{nd} &= \int \frac{1}{\mathrm{dn}} = \int \frac{\mathrm{dn}}{\mathrm{dn}^2}
= \int \frac{\mathrm{dn}}{\mathrm{cn}^{2} + {k^{\prime}}^{2}\mathrm{sn}^{2}}
= \int \frac{\mathrm{dn}}{\mathrm{cn}^{2}} \frac{1}{1 + (k^{\prime}\mathrm{sn}/\mathrm{cn})^2} \\
&= \frac{1}{k^{\prime}} \int \frac{dw}{1 + w^{2}} = \frac{1}{k^{\prime}} \tan^{-1}\left(\frac{k^{\prime}\mathrm{sn}}{\mathrm{cn}}\right) \\
&= \frac{1}{i2k^{\prime}} \ln\left(\frac{\mathrm{cn} + ik^{\prime}\mathrm{sn}}{\mathrm{cn} – ik^{\prime}\mathrm{sn}}\right) \\
&= \bbox[5px,border:2px solid blue] { \frac{1}{ik^{\prime}} \ln\left(\frac{\mathrm{cn} + ik^{\prime}\mathrm{sn}}{\mathrm{dn}}\right) }
\end{align}
We used equation 17 in the first line along with the substitution $$w=k^{\prime}\mathrm{sn}/\mathrm{cn} = k^{\prime}\mathrm{sc}$$ and equation 17 again to obtain the GR solution.

Next, we have
\begin{align}
\int \mathrm{nd} &= \int \frac{1}{\mathrm{dn}} \frac{\mathrm{dn}}{\mathrm{dn}} \frac{\mathrm{sn}}{\mathrm{sn}} \frac{k^{\prime}}{k^{\prime}}
= \int \frac{k^{\prime}\mathrm{sn}}{\mathrm{dn}^2} \frac{1}{k^{\prime}\mathrm{sd}}
= \int \frac{k^{\prime}\mathrm{sn}}{\mathrm{dn}^2} \frac{1}{\sqrt{1\,-\mathrm{cd}^2}} \\
&= \frac{1}{k^{\prime}} \int \frac{-1}{\sqrt{1\,-w^2}} = \frac{1}{k^{\prime}} \mathrm{cos}^{-1}w
= \bbox[5px,border:2px solid blue] { \frac{1}{k^{\prime}} \mathrm{cos}^{-1}\frac{\mathrm{cn}}{\mathrm{dn}} }
\end{align}
We used equation 10 and the substitution $$w=\mathrm{cd}$$.

Next, we have
\begin{align}
\int \mathrm{nd} &= \int \frac{1}{\mathrm{dn}} \frac{\mathrm{dn}}{\mathrm{dn}} \frac{\mathrm{cn}}{\mathrm{cn}}
= \int \frac{{\mathrm{cn}}}{{\mathrm{dn}}^2} \frac{1}{\mathrm{cd}}
= \int \frac{{\mathrm{cn}}}{{\mathrm{dn}}^2} \frac{1}{\sqrt{1\,-(k^{\prime}\mathrm{sd})^2}} \\
&= \frac{1}{k^{\prime}} \int \frac{1}{\sqrt{1\,-w^2}} = \frac{1}{k^{\prime}} \mathrm{sin}^{-1}w
= \bbox[5px,border:2px solid blue] { \frac{1}{k^{\prime}} \mathrm{sin}^{-1}\frac{k^{\prime}\mathrm{sn}}{\mathrm{dn}} }
\end{align}
We used equation 10 and the substitution $$w=k^{\prime}\mathrm{sd}$$.

For the last expression, we have
\begin{align}
\int \mathrm{nd} &= \int \frac{\mathrm{dn}}{\mathrm{dn}^2}
= \int \frac{\mathrm{dn}}{{k^{\prime}}^{2}\mathrm{sn}^{2} + \mathrm{cn}^2} \\
&= \int \frac{2\mathrm{dn}}{[{k^{\prime}}^{2}\mathrm{sn}^{2} + 2k^{\prime}\mathrm{sn}\mathrm{cn} + \mathrm{cn}^{2}] + [{k^{\prime}}^{2}\mathrm{sn}^{2} – 2k^{\prime}\mathrm{sn}\mathrm{cn} + \mathrm{cn}^{2}]} \\
&= \int \frac{2\mathrm{dn}}{(k^{\prime}\mathrm{sn}+\mathrm{cn})^{2} + (k^{\prime}\mathrm{sn}\,-\mathrm{cn})^{2}} \\
&= \int \frac{2\mathrm{dn}}{(k^{\prime}\mathrm{sn}+\mathrm{cn})^2} \,
\frac{1}{1 + [(k^{\prime}\mathrm{sn}\,-\mathrm{cn})/(k^{\prime}\mathrm{sn}+\mathrm{cn})]^2} \\
&= \frac{1}{k^{\prime}} \int \frac{1}{1+w^2} = \frac{1}{k^{\prime}} \mathrm{tan}^{-1}w
= \bbox[5px,border:2px solid blue] { \frac{1}{k^{\prime}} \mathrm{tan}^{-1}\frac{k^{\prime}\mathrm{sn}\,-\mathrm{cn}}{k^{\prime}\mathrm{sn}+\mathrm{cn}} }
\end{align}
We used equation 17 and the substitution $$w=(k^{\prime}\mathrm{sn}\,-\mathrm{cn})/(k^{\prime}\mathrm{sn}+\mathrm{cn})$$.

## 5.133.1

\begin{align}
\int \mathrm{sn} &= \int \frac{\mathrm{sn}\,\mathrm{dn}}{\mathrm{dn}}
= -\int \frac{dw}{\sqrt{k^{2}w^{2} + {k^{\prime}}^{2}}} \\
&= -\frac{1}{k} \ln\left(k(kw+\sqrt{k^{2}w^{2} + {k^{\prime}}^{2}})\right) \\
&= -\frac{1}{k}\ln k \,\bbox[5px,border:2px solid blue] {- \frac{1}{k} \ln(k\,\mathrm{cn} + \mathrm{dn})}
\end{align}
We used equation 16 in the first line and the substitution $$w=\mathrm{cn}$$. We then used equation 16 again and note that the second term is what appears in GR, with the first term being a constant of integration.

Next, we have
\begin{align}
\int \mathrm{sn} &= -\frac{1}{k} \ln(k\,\mathrm{cn} + \mathrm{dn})
= -\frac{1}{k} \ln\left(\frac{\mathrm{dn}^{2}-k^{2}\mathrm{cn}^{2}} {\mathrm{dn}\,-k\,\mathrm{cn}} \right) \\
&= \frac{1}{k} \ln\left(\frac{\mathrm{dn}\,-k\,\mathrm{cn}}{{k^{\prime}}^{2}}\right)
= \bbox[5px,border:2px solid blue] { \frac{1}{k} \ln(\mathrm{dn}\,-k\,\mathrm{cn}) } \,- \frac{2}{k} \ln k^{\prime}
\end{align}
We used equation 16.

Next, we have
\begin{align}
\int \mathrm{sn} &= \int \frac{k\,\mathrm{cn}\,\mathrm{sn}}{k\,\mathrm{cn}}
= \int \frac{k\,\mathrm{cn}\,\mathrm{sn}}{\sqrt{\mathrm{dn}^{2}-{k^{\prime}}^{2}}}
= \frac{1}{k^{\prime}} \int \frac{k\,\mathrm{cn}\,\mathrm{sn}} {\sqrt{(\mathrm{dn}/k^{\prime})^{2}-1}} \\
&= -\frac{1}{k} \int \frac{1}{\sqrt{w^{2}-1}} = -\frac{1}{k} \cosh^{-1}w
= -\frac{1}{k} \cosh^{-1}\left( \frac{\mathrm{dn}}{k^{\prime}} \right)
\end{align}
We used equation 16 and the substitution $$w=\mathrm{dn}/k^{\prime}$$. This result does not appear in GR. It is in Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman and will be used in subsequent posts.

The following two expressions

\int \mathrm{sn} = \frac{1}{k} \cosh^{-1}\left( \frac{\mathrm{dn}\,-k^{2}\mathrm{cn}}{1\,-k^{2}} \right)
= \frac{1}{k} \sinh^{-1}\left( k\frac{\mathrm{dn}\,-\mathrm{cn}}{1\,-k^{2}} \right)

appear in GR. However, I believe that both are mistakes as I cannot prove them by differentiation. It is also suspicious that they do not appear in other sources.

## 5.133.2

\begin{align}
\int \mathrm{cn} &= \int \frac{k\,\mathrm{cn}\,\mathrm{sn}}{k\,\mathrm{sn}}
= \int \frac{k\,\mathrm{cn}\,\mathrm{sn}}{\sqrt{1-\mathrm{dn}^2}}
= \frac{1}{k} \int \frac{-dw}{\sqrt{1-w^2}} \\
&= \frac{1}{k} \cos^{-1}w = \bbox[5px,border:2px solid blue] { \frac{1}{k} \cos^{-1}\mathrm{dn} }
\end{align}
We used the substitution $$w=\mathrm{dn}$$ and equation 2.

Next, we have
\begin{align}
\int \mathrm{cn} &= \int \frac{\mathrm{cn}\,\mathrm{dn}}{\mathrm{dn}}
= \int \frac{\mathrm{cn}\,\mathrm{dn}}{\sqrt{1\,-k^{2}\mathrm{sn}^{2}}} \\
&= \frac{1}{k} \int \frac{dw}{\sqrt{1\,-w^{2}}} = \frac{1}{k} \sin^{-1}w
= \bbox[5px,border:2px solid blue] { \frac{1}{k} \sin^{-1}(k\,\mathrm{sn}) }
\end{align}
We used the substitution $$w=k\,\mathrm{sn}$$ and equation 2.

Next, we have
\begin{align}
\int \mathrm{cn} &= \frac{1}{k} \cos^{-1}\mathrm{dn}
= -\frac{i}{k} \ln(\mathrm{dn} + \sqrt{\mathrm{dn}^{2}-1}) \\
&= -\frac{i}{k} \ln(\mathrm{dn} + \sqrt{-k^{2}\mathrm{sn}^{2}})
= -\frac{i}{k} \ln(\mathrm{dn} + ik\,\mathrm{sn}) \\
&= \frac{i}{k} \ln\left( \frac{\mathrm{dn} \,- ik\,\mathrm{sn}}{\mathrm{dn}^{2}+k^{2}\mathrm{sn}^{2}} \right)
= \bbox[5px,border:2px solid blue] { \frac{i}{k} \ln(\mathrm{dn} \,- ik\,\mathrm{sn}) }
\end{align}
We used equation 2.

## 5.133.3

\begin{align}
\int \mathrm{dn} &= \int \frac{\mathrm{dn}\,\mathrm{cn}}{\mathrm{cn}}
= \int \frac{dw}{\sqrt{1-w^2}} \\
&= \sin^{-1}w = \bbox[5px,border:2px solid blue] { \sin^{-1}\mathrm{sn} }
\end{align}
We used the substitution $$w=\mathrm{sn}$$ and equation 1.

Next, we have
\begin{align}
\int \mathrm{dn} &= \sin^{-1}\mathrm{sn} = -i\,\ln(i\,\mathrm{sn} + \sqrt{1\,-\mathrm{sn}^2}) \\
&= -i\,\ln(\mathrm{cn} + i\,\mathrm{sn})
= i\,\ln\left( \frac{1}{\mathrm{cn} + i\,\mathrm{sn}}\,\frac{\mathrm{cn}\,- i\,\mathrm{sn}}{\mathrm{cn}\,- i\,\mathrm{sn}} \right) \\
&= \bbox[5px,border:2px solid blue] { i\,\ln(\mathrm{cn}\,- i\,\mathrm{sn}) }
\end{align}
We used equation 1.

Next we have the incomplete elliptic integral function of the first kind

u=\mathrm{F}(\phi,k) = \int\limits_{0}^{\phi} \frac{d\theta}{\sqrt{1\,-k^{2}\sin^{2}\theta}}
= \int\limits_{0}^{\sin\phi} \frac{dt}{\sqrt{(1\,-t^2)(1\,-k^{2}t^{2})}}

If we consider the upper limit of integration as a function of the integral, we have $$\phi = \mathrm{am}(u,k)$$, the Jacobi amplitude function. We then define $$\mathrm{sn}(u,k) = \sin\phi = \sin(\mathrm{am}(u,k))$$. Thus we have

\int \mathrm{dn} = \sin^{-1}\mathrm{sn} = \bbox[5px,border:2px solid blue] { \mathrm{am} }

## 5.135.1

\begin{align}
\int \mathrm{sc} &= \int \frac{\mathrm{sn}}{\mathrm{cn}}
= \int \frac{k^{2}\mathrm{sn}\,\mathrm{cn}}{k^{2}\mathrm{cn}^{2}}
= \int \frac{k^{2}\mathrm{sn}\,\mathrm{cn}}{(\mathrm{dn}-k^{\prime})(\mathrm{dn}+k^{\prime})} \\
&= -\int \frac{dw}{(w-k^{\prime})(w+k^{\prime})}
= \frac{1}{2k^{\prime}}\left[\ln(w+k^{\prime}) \,- \ln(w-k^{\prime})\right] \\
&= \bbox[5px,border:2px solid blue] {\frac{1}{2k^{\prime}} \ln\left(\frac{\mathrm{dn}+k^{\prime}}{\mathrm{dn}-k^{\prime}} \right) } \\
&= \frac{1}{k^{\prime}} \ln\sqrt{\frac{\mathrm{dn}+k^{\prime}}{\mathrm{dn}-k^{\prime}} \frac{\mathrm{dn}+k^{\prime}}{\mathrm{dn}+k^{\prime}}}
= \frac{1}{k^{\prime}} \ln\frac{\mathrm{dn}+k^{\prime}}{k\mathrm{cn}} \\
&= \bbox[5px,border:2px solid blue] {\frac{1}{k^{\prime}} \ln\frac{\mathrm{dn}+k^{\prime}}{\mathrm{cn}} } – \frac{1}{k^{\prime}} \ln(k)
\end{align}
Equation 16 was used in the first line and the substitution was $$w=\mathrm{dn}$$. Equation 16 was used again in the last line.

## 5.135.2

\begin{align}
\int \mathrm{sd} &= \int \frac{\mathrm{sn}}{\mathrm{dn}}
= \int \frac{\mathrm{dn}\,\mathrm{sn}}{\mathrm{dn}^2}
= \int \frac{\mathrm{dn}\,\mathrm{sn}}{k^{2}\mathrm{cn}^{2}+{k^{\prime}}^{2}} \\
&= \frac{1}{{k^{\prime}}^{2}} \int \frac{\mathrm{dn}\,\mathrm{sn}}{1+(k\,\mathrm{cn}/k^{\prime})^2}
= \frac{1}{kk^{\prime}} \int \frac{-dw}{1+w^2} \\
&= \frac{1}{kk^{\prime}} \cot^{-1}w = \bbox[5px,border:2px solid blue] {\frac{1}{kk^{\prime}} \cot^{-1}\frac{k\,\mathrm{cn}}{k^{\prime}} } \\
&= \frac{i}{kk^{\prime}} \ln\sqrt{\frac{k\,\mathrm{cn} \,- ik^{\prime}}{k\,\mathrm{cn} + ik^{\prime}} }
= \frac{i}{kk^{\prime}} \ln\sqrt{\frac{(k\,\mathrm{cn} \,- ik^{\prime})^2}{k^{2}\mathrm{cn}^{2} + {k^{\prime}}^2} } \\
&= \frac{i}{kk^{\prime}} \ln\frac{k\,\mathrm{cn} \,- ik^{\prime}}{\mathrm{dn}}
= \bbox[5px,border:2px solid blue] {\frac{i}{kk^{\prime}} \ln\frac{ik^{\prime} \,-k\,\mathrm{cn}}{\mathrm{dn}} } + \frac{i}{kk^{\prime}} \ln(-1)
\end{align}
Equation 16 was used in the first line and the substitution was $$w=\frac{k\,\mathrm{cn}}{k^{\prime}}$$. Equation 16 was also used in the last line.

## 5.135.3

\begin{align}
\int \mathrm{cs} &= \int \frac{\mathrm{cn}}{\mathrm{sn}}
=\int \frac{k^{2}\,\mathrm{cn}\,\mathrm{sn}}{k^{2}\,\mathrm{sn}^2}
= k\int \frac{k\,\mathrm{cn}\,\mathrm{sn}}{1-\mathrm{dn}^2} \\
&= -\int \frac{dw}{1-w^2}
= \frac{1}{2} \ln\frac{1-w}{1+w} \\
&= \bbox[5px,border:2px solid blue] {\frac{1}{2} \ln\frac{1-\mathrm{dn}}{1+\mathrm{dn}} } \\
&= \ln\sqrt{\frac{1-\mathrm{dn}}{1+\mathrm{dn}} \frac{1-\mathrm{dn}}{1-\mathrm{dn}}}
= \ln\left( \frac{1-\mathrm{dn}}{k\,\mathrm{sn}} \right)
= \bbox[5px,border:2px solid blue] {\ln\left( \frac{1-\mathrm{dn}}{\mathrm{sn}} \right)}\,- \ln(k)
\end{align}
Equation 2 was used in the first line and the substitution was $$w=\mathrm{dn}$$. Equation 2 was used again in the last line.

## 5.135.4

\begin{align}
\int \mathrm{cd} &= \int \frac{\mathrm{cn}}{\mathrm{dn}}
= \int \frac{\mathrm{cn}\,\mathrm{dn}}{\mathrm{dn}^2}
= \int \frac{\mathrm{cn}\,\mathrm{dn}}{1-k^{2}\mathrm{sn}^2} \\
&= \frac{1}{k} \int \frac{dw}{1-w^2}
= \frac{1}{k2} \ln\frac{1+w}{1-w} \\
&= \bbox[5px,border:2px solid blue] {\frac{1}{2k} \ln\frac{1+k\,\mathrm{sn}}{1-k\,\mathrm{sn}} } \\
&= \frac{1}{k} \ln\sqrt{\frac{1+k\,\mathrm{sn}}{1-k\,\mathrm{sn}} \frac{1-k\,\mathrm{sn}}{1-k\,\mathrm{sn}}}
= \frac{1}{k} \ln\left(\frac{\mathrm{dn}}{1-k\,\mathrm{sn}} \right) \\
&= \bbox[5px,border:2px solid blue] {-\frac{1}{k} \ln\left(\frac{1-k\,\mathrm{sn}}{\mathrm{dn}} \right)}
\end{align}
We used equation 2 in the first line and the substitution $$w=k\,\mathrm{sn}$$. Equation 2 was used again in the penultimate line.

## 5.135.5

\begin{align}
\int \mathrm{dc} &= \int \frac{\mathrm{dn}}{\mathrm{cn}}
= \int \frac{\mathrm{cn}\,\mathrm{dn}}{\mathrm{cn}^2}
= \int \frac{\mathrm{cn}\,\mathrm{dn}}{1-\mathrm{sn}^2} \\
&= \int \frac{dw}{1-w^2} = \frac{1}{2}\ln\frac{1+w}{1-w} \\
&= \bbox[5px,border:2px solid blue] {\frac{1}{2} \ln\frac{1+\mathrm{sn}}{1-\mathrm{sn}} } \\
&= \ln\sqrt{\frac{1+\mathrm{sn}}{1-\mathrm{sn}} \frac{1+\mathrm{sn}}{1+\mathrm{sn}} }
= \bbox[5px,border:2px solid blue] {\ln\frac{1+\mathrm{sn}}{\mathrm{cn}} }
\end{align}
We used equation 1 in the first line and the substitution $$w=k\,\mathrm{sn}$$. Equation 1 was used again in the last line.

## 5.135.6

\begin{align}
\int \mathrm{ds} &= \int \frac{\mathrm{dn}}{\mathrm{sn}}
= \int \frac{\mathrm{sn}\,\mathrm{dn}}{\mathrm{sn}^2}
= \int \frac{\mathrm{sn}\,\mathrm{dn}}{1-\mathrm{cn}^2} \\
&= -\int \frac{dw}{1-w^2} = -\frac{1}{2}\ln\frac{1+w}{1-w} \\
&= \frac{1}{2} \ln\frac{1-\mathrm{cn}}{1+\mathrm{cn}}
\end{align}
We used equation 1 in the first line and the substitution $$w=k\,\mathrm{cn}$$.