26

The integral $$ \int_0^\infty \frac{\sin x\sinh x}{\cos (2 x)+\cosh \left(2x \right)}\frac{dx}{x}=\frac{\pi}{8}, $$ is given as equation $(17)$ in M.L. Glasser, Some integrals of the Dedekind $\eta$-function.

More general integral $$ \int_0^\infty \frac{\sin x\sinh (x/a)}{\cos (2 x)+\cosh \left(2x/a\right)}\frac{dx}{x}=\frac{\tan^{-1} a}{2},\tag{1} $$ can be deduced as a limiting case of formula $4.123.6$ in Gradsteyn and Ryzhik.

I have been looking for finite elementary analogs of integral $(1)$ and have proved that \begin{align}\label{} \int_0^{1}\frac{\sin \bigl(n \sin^{-1}t\bigr)\sinh \bigl(n \sinh^{-1}(t/a)\bigr)}{\cos \bigl( 2 n \sin^{-1}t\bigr)+\cosh \bigl(2 n \sinh^{-1}(t/a)\bigr)}\frac{dt}{t \sqrt{1-t^2} \sqrt{1+{t^2}/{a^2}}}=\frac{\tan^{-1} a}{2},\tag{1a} \end{align} for an odd integer $n$.

When $n\to\infty$ equation $(1a)$ will give equation $(1)$. This is easy to see because when $n$ is large then the main contribution to $(1a)$ comes from a small neighborhood around $0$.

Q: Can you explain why this integral has such a simple closed form and in particular why it has the same value for all odd $n$?

I want to stress that I have a proof which is based on partial fractions expansion for odd $n$ \begin{align} &\frac{\sin \bigl(n \sin^{-1}t\bigr)\sinh \bigl(n \sinh^{-1}(t/a)\bigr)}{\cos \bigl( 2 n \sin^{-1}t\bigr)+\cosh \bigl(2 n \sinh^{-1}(t/a)\bigr)}\frac{2n}{t^2}\\&=\sum _{j=1}^n\frac{i(-1)^{j-1} }{\sin\frac{\pi (2 j-1)}{2 n}}\cdot \frac{\left(a\cos\frac{\pi (2 j-1)}{2 n}+i\right) \left(a+i \cos\frac{\pi (2 j-1)}{2 n}\right)}{t^2 \left(a^2-1+2 ia \cos\frac{\pi (2 j-1)}{2 n}\right)-a^2 \sin ^2\frac{\pi (2 j-1)}{2 n}}, \end{align} the elementary integral \begin{align} \int_0^1 \frac{t}{t^2 \left(a^2-1+2 ia \cos\frac{\pi (2 j-1)}{2 n}\right)-a^2 \sin ^2\frac{\pi (2 j-1)}{2 n}}\frac{dt}{\sqrt{1-t^2} \sqrt{1+{t^2}/{a^2}}}\\=\frac{\tan^{-1}a+i\tanh^{-1}\cos\frac{\pi (2 j-1)}{2 n}}{i\left(a\cos\frac{\pi (2 j-1)}{2 n}+i\right) \left(a+i \cos\frac{\pi (2 j-1)}{2 n}\right)}, \end{align} and summation formula which can be deduced from the partial fractions above $$ \sum _{j=1}^n \frac{(-1)^{j-1}}{\sin \frac{\pi (2 j-1)}{2 n}}=n. $$

Details can be found here https://arxiv.org/abs/2008.04097

But despite this prove I don't understand why all these cancellations occur to give such a simple result at the end. I suspect there is a very short and transparent proof which explains why the integral is $\frac{\tan^{-1} a}{2}$ for all odd $n$. Maybe Glasser's master theorem or some contour integration can explain this formula? Motivation for this question is desire to understand this integration formula.

Any alternative proof is welcome if it is not just a detailed version of the proof above. Any ideas and comments are welcome. Thanks.

Cave Johnson
  • 4,175
  • 3
    idk how one can ever say they understand such formulas – mathworker21 Apr 19 '20 at 21:17
  • @mathworker21 for example by finding a more natural proof. I believe there is a nice proof of this formula that doesn't use cumbersome calculations, or a simple argument which shows that integral has the same value for all odd $n$. – Cave Johnson Apr 19 '20 at 22:20
  • I tried Chebyshev Polynomials, but was not able to simplify the computations. That would be the approach I would continue. – robjohn Apr 26 '20 at 20:49

4 Answers4

8

$$I_n\left(a\right)=\int_{0}^{1}{\frac{\sin{\left(n\sin^{-1}\left(t\right)\right)}\sinh{\left(n\sinh^{-1}{\left(\frac{t}{a}\right)}\right)}}{\cos{\left(2n\sin^{-1}\left(t\right)\right)}+\cosh{\left(2n\sinh^{-1}{\left(\frac{t}{a}\right)}\right)}}\frac{dt}{t\sqrt{1-t^2}\sqrt{1+\left(\frac{t}{a}\right)^2}}\ } $$

$$t\rightarrow\sqrt{\frac{a^2\left(\coth^2{\left(z\right)}-1\right)}{a^2\coth^2{\left(z\right)}+1}}\ $$

$$I_n\left(a\right)=\int_{0}^{\infty}{\frac{\sin{\left(n\sin^{-1}{\left(\frac{a}{\sqrt{a^2+\left(a^2+1\right)\sinh^2{(z)}}}\right)}\right)}\sinh{\left(n\sinh^{-1}{\left(\frac{1}{\sqrt{a^2+\left(a^2+1\right)\sinh^2{(z)}}}\right)}\right)}}{\cos{\left(2n\sin^{-1}{\left(\frac{a}{\sqrt{a^2+\left(a^2+1\right)\sinh^2{(z)}}}\right)}\right)}+\cosh{\left(2n\sinh^{-1}{\left(\frac{1}{\sqrt{a^2+\left(a^2+1\right)\sinh^2{(z)}}}\right)}\right)}}dz\ }$$

Using the following identities: $$\color{red}{\frac{sin(\alpha)sinh(\beta)}{cos(2\alpha)+cosh(2\beta)}=\frac{sec(\alpha+i\beta)-sec(\alpha-i\beta)}{4i}}$$

$$\color{red}{\sin^{-1}(x)=-i\log\left(ix+\sqrt{1-x^2}\right)}$$ $$\color{red}{\sinh^{-1}(x)=\log\left(x+\sqrt{1+x^2}\right)}$$ $$\color{red}{x+yi=\sqrt{x^2+y^2}e^{i\tan^{-1}(y/x)}}$$

$$I_n(a)=\frac{1}{4i}\int_0^\infty\left[\sec{\left(-in\ log\left(\frac{e^z-e^{-i\tan^{-1}(a)}}{e^z+e^{-i\tan^{-1}(a)}}\right)\right)}-\sec{\left(-in\ log\left(\frac{e^z+e^{i\tan^{-1}(a)}}{e^z-e^{\tan^{-1}(a)}}\right)\right)}\right]dz$$

$$=\frac{1}{2i}\int_{0}^{\infty}{\left[\underbrace{\frac{\left[e^{2z}-e^{-2i\tan^{-1}(a)}\right]^n}{\left(e^z+e^{-i\tan^{-1}(a)}\right)^{2n}+\left(e^z-e^{-i\tan^{-1}(a)}\right)^{2n}}}_{z\rightarrow -z}-\frac{\left[e^{2z}-e^{2i\tan^{-1}(a)}\right]^n}{\left(e^z+e^{i\tan^{-1}(a)}\right)^{2n}+\left(e^z-e^{i\tan^{-1}(a)}\right)^{2n}}\right]dz\ }$$

$$=\frac{1}{2i}\int_{-\infty}^{0}\frac{(-1)^n\left[e^{2z}-e^{2i\tan^{-1}(a)}\right]^n}{\left(e^z+e^{i\tan^{-1}(a)}\right)^{2n}+\left(e^z-e^{i\tan^{-1}(a)}\right)^{2n}}dz-\frac{1}{2i}\int_{0}^{\infty}\frac{\left[e^{2z}-e^{2i\tan^{-1}(a)}\right]^n}{\left(e^z+e^{i\tan^{-1}(a)}\right)^{2n}+\left(e^z-e^{i\tan^{-1}(a)}\right)^{2n}}dz$$

Assuming that $n$ is odd: $$I_n(a)=-\frac{1}{2i}\int_{-\infty}^{\infty}\frac{\left[e^{2z}-e^{2i\tan^{-1}(a)}\right]^n}{\left(e^z+e^{i\tan^{-1}(a)}\right)^{2n}+\left(e^z-e^{i\tan^{-1}(a)}\right)^{2n}}dz$$ $$=-\frac{1}{2i}\int_{-\infty}^{\infty}{\frac{{tanh}^n\left(\frac{z-i\ tan^{-1}(a)}{2}\right)}{{tanh}^{2n}\left(\frac{z-i\ tan^{-1}(a)}{2}\right)+1}\ dz}$$

Now, let's apply Complex Analysis.First, let's define $g(w)$ and then integrate over a rectangular contour. $$g(w)=\frac{{tanh}^n\left(\frac{w}{2}\right)}{{tanh}^{2n}\left(\frac{w}{2}\right)+1}$$

$$\oint{g(w)dw}=\left[\color{red}{\int_{R}^{-R}}+{\color{blue}{\int_{-R}^{-R-i\ tan^{-1}(a)}}+\int_{-R-i\tan^{-1}(a)}^{R-i\tan^{-1}(a)}}+\color{blue}{\int_{R-i\tan^{-1}(a)}^{R}}\right]{g\left(w\right)dw\ }$$

Notice that the red integral will be zero due to the parity of the function, provided that $n$ is an odd number.

The blue integrals can be rewritten as: $$\lim_{R\rightarrow\infty}{\int_{-R}^{-R-i\ tan^{-1}(a)}{g\left(w\right)dw\ }}+\lim_{R\rightarrow\infty}{\int_{R-i\tan^{-1}(a)}^{R}{g\left(w\right)dw\ }}$$ $$=i\int_{0}^{-\ tan^{-1}(a)}{\lim_{R\rightarrow\infty}\frac{{tanh}^n\left(\frac{iz-R}{2}\right)}{{tanh}^{2n}\left(\frac{iz-R}{2}\right)+1}dz\ }{+}i\int_{-\ tan^{-1}(a)}^{0}{\lim_{R\rightarrow\infty}\frac{{tanh}^n\left(\frac{iz+R}{2}\right)}{{tanh}^{2n}\left(\frac{iz+R}{2}\right)+1}dz\ }$$ $$=-\frac{i}{2}\int_{0}^{-\ tan^{-1}\left(a\right)}{dz\ }{+}\frac{i}{2}\ \int_{-\ tan^{-1}\left(a\right)}^{0}{dz\ }=i\tan^{-1}{(a)}$$

The last integral from the RHS: $$\lim_{R\rightarrow\infty}{\int_{-R-i\tan^{-1}{(a)}}^{R-i\tan^{-1}{(a)}}{g(w)dw\ }}=\lim_{R\rightarrow\infty}\int_{-R}^{R}{g(z-i\tan^{-1}{(a)})dz\ }=\int_{-\infty}^{\infty}{\frac{{tanh}^n\left(\frac{z-i\ tan^{-1}(a)}{2}\right)}{{tanh}^{2n}\left(\frac{z-i\ tan^{-1}(a)}{2}\right)+1}\ dz}$$

Computing the residues (I'm not sure about this part, please, if you have any insight about it feel free to edit or comment): $$\oint g(w)dw=2\pi i\lim_{w\rightarrow w_k=2\tanh^{-1}(\pm e^{\frac{\pi i(2k-1)}{2n}})}\sum_{k=1}^n g(w)(w-w_k)$$ $$\left[\frac{2\pi i}{n}-\frac{2\pi i}{n}\right]\sum_{k=1}^{n}\frac{1}{e^{\frac{\pi i\left(2k-1\right)}{2n}(n-1)}+e^{-\frac{\pi i\left(2k-1\right)}{2n}(n-1)}}=0$$

Gathering the results: $$\int_{-\infty}^{\infty}{\frac{{tanh}^n\left(\frac{z-i\ tan^{-1}(a)}{2}\right)}{{tanh}^{2n}\left(\frac{z-i\ tan^{-1}(a)}{2}\right)+1}\ dz}=-i\tan^{-1}(a)$$

Thus $$I_n(a)=\int_{0}^{1}{\frac{\sin{\left(n\sin^{-1}\left(t\right)\right)}\sinh{\left(n\sinh^{-1}{\left(\frac{t}{a}\right)}\right)}}{\cos{\left(2n\sin^{-1}\left(t\right)\right)}+\cosh{\left(2n\sinh^{-1}{\left(\frac{t}{a}\right)}\right)}}\frac{dt}{t\sqrt{1-t^2}\sqrt{1+\left(\frac{t}{a}\right)^2}}\ }=\frac{tan^{-1}(a)}{2}$$

Teruo
  • 2,045
2

The following is a clear derivation of the result using contour integration. Though it could be essentially equivalent to the existing answer in some way, I will post it for a better understanding.


Substitute $x=\arccos t$, it suffies to show $$ I=\operatorname{Re}\int_{-\pi/2}^{\pi/2} \frac{1}{\sinh(inx+n\operatorname{arsinh}(a^{-1}\cos x))}\frac{dx}{\cos x\sqrt{1+(a^{-1}\cos x)^{2}}}=2(-1)^{(n-1)/2}\arctan a $$ for $a>0$. (If so, when $a<0$ both sides picks up a minus sign and agrees.)

Warning: due to the principal argument choice of Mathematica (which is $(-\pi,\pi]$), $\cos$ (rather than $\sin$) is used in the first place. Using $\sin$ could cause potential numerical error.

Substitute $z=e^{2ix}$, note that $$ w(z):=\frac{1+z+\sqrt{1+(2+4a^{2})z+z^{2}}}{2a}=e^{ix+\operatorname{arsinh}(a^{-1}\cos x)} $$ so $$ I=\operatorname{Im}\int_{C} \frac{2w(z)^{n}}{w(z)^{2n}-1} \frac{dz}{(z+1)\left( w(z)-\frac{1+z}{2a} \right)} $$ $w(z)$ causes a branch cut, which is choosen to be the ray $(-\infty,2a\sqrt{1+a^{2}}-1-2a^{2}]$. The end point of the ray is inside the unit circle, so the contour $C$ (almost the unit circle) should avoid it at $z=-1$. Afterall, it has to avoid $z=-1$ since the integrand is divergent there, but the imaginary part remains finite anyway.

Substitute $w=w(z)$. The contour is now:

Contours on the <span class=$w$ plane" />

Amazingly, $\dfrac{dz}{(z+1)\left( w(z)-\frac{1+z}{2a} \right)}=\dfrac{2dw}{1+w^{2}}$ and $$ I=\operatorname{Im} \int_{C'} \frac{2w^{n}}{w^{2n}-1} \frac{2dw}{1+w^{2}} $$ Now we can deform the contour to $l$, the segment connecting $-i+i\epsilon$ and $i-i\epsilon$; and the small arcs $\gamma_{\pm}$ around $\pm i$. (contained in the image above)

To find the integral on $\gamma_{\pm}$, we need to know their angle. At $-i$, the slope of the tangent of $w(z)$ is given by $$ \arg w'(-i)=-\arctan a $$ so the integral on $\gamma_{-}$ yields $c(\pi-\arctan a)i$, where $c=-(-1)^{(n-1)/2}$ is the residue at $-i$ (as well as at $i$). The integral on $\gamma_{+}$ produces the same value.

Deforming the contour picks up all poles passed by it. The poles are $w=\pm i$ and the roots of $w^{2n}=1$, all lying on the unit circle. Note that the integrand vanishes faster than $w^{-2}$ so $w=\infty$ is not a pole.

One can check that for all $a>0$, $C'$ encloses the right unit semi-circle (the image above shows the $n=3$ case), so all the poles with positive real part accounts: $$ \int_{C'} \frac{2w^{n}}{w^{2n}-1} \frac{2dw}{1+w^{2}}=\int_{l}{}+2ic(\pi-\arctan a)+2\pi i\sum(\text{residues with }\operatorname{Re}>0) $$ Since the integrand is a rational function, the sum of residues at all poles is $0$ (including $w=\infty$). Moreover $n$ is odd, so if $w_{i}$ is a pole with $\operatorname{Re} w_{i}>0$, then $-w_{i}$ is also one with the same residue. Thus, $$ 2\sum(\text{residues with }\operatorname{Re}>0)+2c=\sum(\text{all residues})=0 $$ Finally, the integral on $l$ is real and does not contribute thanks to that $n$ is odd. We arrive at $$ I=-2c\arctan a=2(-1)^{(n-1)/2}\arctan a $$ as desired.


Discussion: The derivation itself already collects the valuable facts. Perhaps $n$ being odd plays a more important row than I thought, as it is necessary for several steps in the proof. Otherwise, if $n$ is even the original integral is divergent, and if it is not an integer there will be branch cuts to deal with and a nice result is not promising.

Incidentally, the $(-1)^{(n-1)/2}$ factor is artificial due to the choice of $\cos$. If $\sin$ is used the residues are calculated at $\pm1$ and they will not occur.

Finally, for the interested ones, inverting $w(z)$ yields $$ z=w \frac{aw-1}{w+a} $$ which is some sort normal form of second order Blaschke product (if $w$ and $z$ can be scaled). Such process can produce all kinds of nice looking results.

Po1ynomial
  • 1,866
1

@P.TeruoNagasava 's solution it seems very easily explains why the integral (denoted by $I_n$ in his solution) is independent of the odd number $n$.

First, we introduce the notation $$ f(z)={\frac{{\tanh}^n\left(z\right)}{{\tanh}^{2n}\left(z\right)+1}} $$ Equivalently one can write using (we have slightly changed the notation, and have written the integral with different limits) $$I_n(\alpha)={i}\int_{0}^{\infty}\left(f\left(z-i\alpha\right)-f(z+i\alpha)\right)dz.$$

Formally, differentiating we find $$\frac{d}{d\alpha}I_n(\alpha)=\int_{0}^{\infty}\left(f'\left(z-i\alpha\right)+f'(z+i\alpha)\right)dz\\=\lim_{R\to+\infty}\left(f\left(R-i\alpha\right)+f(R+i\alpha)-\{f\left(-i\alpha\right)+f(i\alpha)\}\right)\\=\frac{1}{2}+\frac{1}{2}-0=1.$$

Since $I_n(0)=0$, we find $I_n(\alpha)=\alpha$.

(The formula $I_n(\alpha)=\alpha$ stops working when $|\alpha|>\pi/4$. So unfortunatly something is missing in this derivation.)

Cave Johnson
  • 4,175
0

Let $$ I(n,a)=\int_0^{1}\frac{\sin\bigl(n\arcsin t\bigr)\,\sinh\bigl(n\operatorname{arsinh}(t/a)\bigr)}{\cos\bigl(2n\arcsin t\bigr)+\cosh\bigl(2n\operatorname{arsinh}(t/a)\bigr)}\;\frac{dt}{t\sqrt{1-t^2}\sqrt{1+t^2/a^2}}\,. $$ We will show $I(n,a)$ is independent of odd $n$ and equals $\frac{1}{2}\arctan(a)$.

First, set $u=\arcsin t$ and $v=\operatorname{arsinh}(t/a)$, so $t=\sin u$, $t/a=\sinh v$. In these variables the numerator and denominator simplify via complex-angle identities. Using $$ \cosh(a+ib)=\cosh a\cos b + i\sinh a\sin b \quad \text{and} \quad \sinh(a+ib)=\sinh a\cos b + i\cosh a\sin b, $$ we have \begin{align*} \sin(nu)\sinh(nv) &= \Im\bigl[\cosh[n(v+iu)]\bigr]/i \\ &= \frac{\cosh[n(v+iu)]-\cosh[n(v-iu)]}{2i}, \end{align*} and \begin{align*} \cos(2nu)+\cosh(2nv) &= \cosh(2nv)+\cos(2nu) \\ &= 2\cosh\bigl[n(v+iu)\bigr]\cosh\bigl[n(v-iu)\bigr]. \end{align*} Thus the integrand becomes \begin{align*} \frac{\sin(nu)\sinh(nv)}{\cos(2nu)+\cosh(2nv)} &= \frac{1}{2i}\frac{\cosh[n(v+iu)]-\cosh[n(v-iu)]}{2\cosh[n(v+iu)]\cosh[n(v-iu)]} \\ &= \frac{1}{4i}\left(\frac{1}{\cosh[n(v-iu)]}-\frac{1}{\cosh[n(v+iu)]}\right). \end{align*}

Putting back $u=\arcsin t$, $v=\operatorname{arsinh}(t/a)$, \begin{align*} I(n,a) &= \frac{1}{4i}\int_0^1\left(\frac{1}{\cosh[n(v-iu)]}-\frac{1}{\cosh[n(v+iu)]}\right) \frac{dt}{t\sqrt{1-t^2}\sqrt{1+t^2/a^2}}. \end{align*} Since $v-iu$ and $v+iu$ are complex conjugates, the two terms are complex conjugates. Their difference is $2i$ times the imaginary part of $1/\cosh[n(v+iu)]$. Hence $$ I(n,a)=\frac{1}{2}\int_0^1\Im\left\{\frac{1}{\cosh[n(\operatorname{arsinh}(t/a)+i\arcsin t)]}\right\}\frac{dt}{t\sqrt{1-t^2}\sqrt{1+t^2/a^2}}. $$

Now one can show by standard manipulations (for example by differentiating with respect to $n$ or using trigonometric addition formulas) that this integral is independent of $n$ whenever $n$ is odd. In particular for odd $n\geq 1$ one finds $$ I(n,a)=I(1,a). $$ We omit the technical details (they follow from the fact that adding or subtracting $2$ in $n$ yields no change in the value) and proceed to evaluate the base case $n=1$.

For $n=1$, the integral simplifies considerably. We have $$ \sin(\arcsin t)=t, \quad \sinh(\operatorname{arsinh}(t/a))=t/a, $$ $$ \cos(2\arcsin t)=1-2t^2, \quad \cosh(2\operatorname{arsinh}(t/a)) = 1+\frac{2t^2}{a^2}. $$ Hence $$ \cos(2\arcsin t)+\cosh(2\operatorname{arsinh}(t/a)) = 2 + 2t^2\left(\frac{1}{a^2}-1\right). $$

The integrand for $n=1$ becomes \begin{align*} \frac{t(t/a)}{2+2t^2(\tfrac{1}{a^2}-1)} \frac{1}{t\sqrt{1-t^2}\sqrt{1+t^2/a^2}} &= \frac{t}{2a\sqrt{1-t^2}\sqrt{1+t^2/a^2}(1+(1/a^2-1)t^2)}. \end{align*} So $$ I(1,a)=\int_0^1 \frac{t}{2a\sqrt{1-t^2}\sqrt{1+t^2/a^2}(1+(1/a^2-1)t^2)}\,dt. $$

Letting $u=t^2$ simplifies the integral. Then $du=2t\,dt$, so $$ I(1,a)=\frac{1}{4a}\int_0^1 \frac{du}{\sqrt{1-u}\sqrt{1+u/a^2}(1+(1/a^2-1)u)}. $$

Next substitute $v=1-u$, so $u=1-v$. One obtains $$ I(1,a) = \frac{1}{4a}\int_0^1\frac{dv}{\sqrt{v}\sqrt{a^2+1-v}(a^2-(a^2-1)v)}. $$

Now set $v=x^2$, $0\leq x\leq 1$, giving $dv=2x\,dx$ and $\sqrt{v}=x$. This yields $$ I(1,a) = \frac{1}{2a}\int_0^1\frac{dx}{\sqrt{a^2+1-x^2}(1+(a^2-1)x^2)}. $$

Finally use the trigonometric substitution $$ x=\sqrt{a^2+1}\sin\theta, \quad 0\leq\theta\leq\arcsin\frac{1}{\sqrt{a^2+1}}, $$ so that $\sqrt{a^2+1-x^2}=\sqrt{a^2+1}\cos\theta$ and $dx=\sqrt{a^2+1}\cos\theta\,d\theta$. The integral becomes $$ I(1,a) = \frac{1}{2a}\int_0^{\arcsin(1/\sqrt{a^2+1})} \frac{d\theta}{1+(a^4-1)\sin^2\theta}. $$

This simplifies to $$ I(1,a) = \frac{1}{2a^3}\arctan(a). $$