ANOTHER NICE INTEGRAL FROM @infseriesbot

The goal of today´s post is to compute the following integral


\boxed{\int_0^{\infty}\frac{\cos 2b x}{\cosh a x}dx=\frac{\pi}{2a \cosh \frac{b \pi}{a}}}


Seen in this Twitter. We will first proof some integrals related to the Digamma function that later well serve as tools in the evaluation of our goal integral. The trig relations used in the post are proved in the appendix.


Recall the integral representation of the Digamma function

\psi(z)=\int_{0}^{\infty} \frac{e^{-t}}{t}-\frac{e^{-z t}}{1-e^{-t}} d t

\text {by the following substitution } e^{-t}=x \Rightarrow d t=-\frac{d x}{x} \,\text {we get }

\psi(z)=\int_{1}^{0} \frac{x}{-\ln x}-\frac{x^{z}}{1-x} \frac{(-d x)}{x}

\boxed{\psi(z)=-\int_{0}^{1} \frac{1}{\ln x}+\frac{x^{z-1}}{1-x} d x}(1)


Now lets proof the following result:

\int_0^1\frac{x^{p-1}-x^{q-1}}{1-x}dx=\psi\left( q\right)-\psi\left(p \right)

Proof:

\int_0^1\frac{x^{p-1}-x^{q-1}}{1-x}dx=\int_0^1\frac{x^{p-1}-x^{q-1}}{1-x}+\frac{1}{\ln x}-\frac{1}{\ln x}dx

=-\int_{0}^{1} \frac{1}{\ln x}+\frac{x^{q-1}}{1-x} d x+\int_{0}^{1} \frac{1}{\ln x}+\frac{x^{p-1}}{1-x} d x

\boxed{\int_0^1\frac{x^{p-1}-x^{q-1}}{1-x}dx=\psi\left( q\right)-\psi\left(p \right)}(2)


Another beautiful integral related to the Digamma function:

\int_0^1\frac{x^{m}}{1+x^n}dx=\frac{1}{2n}\left(\psi\left( \frac{m+n+1}{2n}\right)-\psi\left(\frac{m+1}{2n} \right)\right)

Proof:

\int_0^1\frac{x^{m}}{1+x^n}dx=\int_0^1\frac{x^{m}}{1+x^n}\frac{(1-x^n)}{(1-x^n)}dx

=\int_0^1\frac{x^{m}-x^{m+n}}{1-x^{2n}}dx

\text{let}\,\, x^{2n}=u \Rightarrow \,x=u^{\frac{1}{2n}}\Rightarrow \,dx=\frac{1}{2n}u^{\frac{1}{2n}-1}du

Thus

\int_0^1\frac{x^{m}}{1+x^n}dx=\frac{1}{2n}\int_0^1\frac{u^{\frac{m+1}{2n}-1}-u^{\frac{m+n+1}{2n}-1}}{1-u}du

and from (2) we can conclude that


\boxed{\int_0^1\frac{x^{m}}{1+x^n}dx=\frac{1}{2n}\left(\psi\left( \frac{m+n+1}{2n}\right)-\psi\left(\frac{m+1}{2n} \right)\right)}(3)


Setting n=1 in (3) leads to


\boxed{\int_0^1\frac{x^{m}}{1+x}dx=\frac{1}{2}\left(\psi\left( \frac{m+2}{2}\right)-\psi\left(\frac{m+1}{2} \right)\right)}(4)


Lets now evaluate the following integral:



\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{\pi}{2a}\left(  \sec\left( \frac{\pi b}{2a}\right)\right)


Proof:

\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\int_0^{\infty}\frac{e^{ b x}+e^{ -b x}}{e^{ a x}+e^{ -a x}}dx

=\int_0^{\infty}\frac{e^{ b x}+e^{ -b x}}{e^{ a x}+e^{ -a x}}\frac{e^{ -a x}}{e^{ -a x}}dx

=\int_0^{\infty}\frac{e^{ (b-a) x}+e^{ -(b+a) x}}{1+e^{ -2a x}}dx

let     \left(e^{ x}\right)^{-2a }=u \, \Rightarrow \, e^{ x}=u^{-\frac{1}{2a} }\, \Rightarrow \, dx=-\frac{1}{2a}\frac{du}{u}


\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{1}{2a}\int_1^0\frac{u^{\frac{(a-b)}{2a}}+u^{\frac{(a+b)}{2a}}}{1+u}\frac{(-du)}{u}

=\frac{1}{2a}\int_0^1\frac{u^{\frac{(a-b)}{2a}-1}+u^{\frac{(a+b)}{2a}-1}}{1+u}du

=\frac{1}{2a}\int_0^1\frac{u^{-\frac{(a+b)}{2a}}}{1+u}du+\frac{1}{2a}\int_0^1\frac{u^{\frac{(b-a)}{2a}}}{1+u}du


From (4) we obtain that


\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{1}{4a}\left(\psi\left( \frac{3a-b}{4a}\right)-\psi\left(\frac{a-b}{4a} \right)\right)}+\frac{1}{4a}\left(\psi\left( \frac{3a+b}{4a}\right)-\psi\left(\frac{b+a}{4a} \right)\right)}


=\frac{1}{4a}\left(\psi\left( \frac{3a-b}{4a}\right)-\psi\left(\frac{b+a}{4a} \right)\right)}+\frac{1}{4a}\left(\psi\left( \frac{3a+b}{4a}\right)-\psi\left(\frac{a-b}{4a} \right)\right)}


From Digamma´s Reflection formula , namely

\psi\left( 1-x\right)-\psi\left( x\right)=\pi \cot \pi x

we get


\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{\pi}{4a}\left( \cot\left(\frac{\pi }{4}+  \frac{\pi b}{4a} \right)\right)+\frac{\pi}{4a}\left( \cot\left( \frac{\pi }{4}-\frac{\pi b}{4a} \right)\right)


And from equation (A.4) below, letting  y=\frac{\pi b}{4a},    we finally get that


\boxed{\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{\pi}{2a}\left(  \sec\left( \frac{\pi b}{2a}\right)\right)}(5)

or

\boxed{\int_0^{\infty}\frac{\cosh b x}{\cosh a x}dx=\frac{\pi}{2a \cos \left( \frac{ \pi b}{2a}}\right)}(6)


If we let b \longrightarrow 2ib and employ equation (A.5) in (6) we finally obtain the desired result


\boxed{\int_0^{\infty}\frac{\cos 2b x}{\cosh a x}dx=\frac{\pi}{2a \cosh \frac{b \pi}{a}}}(7)


Appendix proof of the trig relations of   \cot(x)  used in the post


Lemma 1:

\cot^2(x)-1=2\cot(x) \cot(2x)

Proof: Lets start from the definition of cotangent

\cot(2 x)=\frac{\cos(2 x)}{\sin(2 x)}

from the double angle formula of cosine and sine we have

\cot(2 x)=\frac{\cos^2(x)-\sin^2(x)}{2 \sin(x)\cos(x)}

=\frac{\cos^2(x)-\sin^2(x)}{2 \sin(x)\cos(x)} \cdot\frac{\frac{1}{\sin^2(x)}}{\frac{1}{\sin^2(x)}}

=\frac{\frac{\cos^2(x)}{\sin^2(x)}-1}{2\frac{\cos(x)}{\sin(x)}}

\cot(2 x)=\frac{\cot^2(x)-1}{2 \cot(x)}

\boxed{\cot^2(x)-1=2\cot(x) \cot(2x)}(A.1)


Recall the relation for the cosine and sine of a sum proved here:

\cos (x+ y)=\cos x \cos  y-\sin x \sin  y

\sin (x+ y)=\cos x \sin  y+\sin x \cos  y

\cot (x+ y)=\frac{\cos x \cos  y-\sin x \sin  y}{\cos x \sin  y +\sin x \cos  y}

\cot (x+ y)=\frac{\sin x \sin  y\left(\cot x \cot  y-1\right)}{\cos x \sin  y +\sin x \cos  y}

\cot (x+ y)=\frac{\left(\cot x \cot  y-1\right)}{\frac{\cos x \sin  y }{\sin x \sin  y}+\frac{\sin x \cos  y}{\sin x \sin  y}}

\boxed{\cot (x+ y)=\frac{\cot x \cot  y-1}{\cot x + \cot y}}(A.2)


Recall the relation for the cosine and sine of a difference proved here:

\cos (x- y)=\cos x \cos  y+\sin x \sin  y

\sin (x- y)=\sin x \cos  y-\cos x \sin y

\cot (x- y)=\frac{\cos x \cos  y+\sin x \sin  y}{\sin x \cos  y-\cos x \sin  y }

\cot (x- y)=\frac{\sin x \sin  y\left(\cos x \cos  y+1\right)}{\sin x \cos  y-\cos x \sin  y }

\boxed{\cot (x- y)=\frac{\cot x \cot  y+1}{ \cot  y-\cot x  }}(A.3)

Letting  x=\frac{\pi}{4} in (A.2) and (A.3) and then adding the two equations we obtain


\cot \left(\frac{\pi}{4}+ y\right)+\cot \left(\frac{\pi}{4}- y\right)=\frac{cot (y) -1}{cot (y) + 1}+\frac{cot (y) +1}{cot (y) - 1}

\cot \left(\frac{\pi}{4}+ y\right)+\cot \left(\frac{\pi}{4}- y\right)=\frac{\left(cot (y) -1\right)^2+\left(cot (y) +1\right)^2}{cot^2 (y) - 1}

\cot \left(\frac{\pi}{4}+ y\right)+\cot \left(\frac{\pi}{4}- y\right)=\frac{2(\cot^2(y)+1)}{cot^2 (y) - 1}=\frac{2\csc^2(y)}{cot^2 (y) - 1}

=\frac{2 \csc^2(y)}{2 \cot (y) \cot(2y)}=\frac{2}{2\frac{\cos (y)}{\sin (y)}\cot (2y) \sin^2(y)}=\frac{2}{2\sin(y) \cos(y)\cot(2y)}

=\frac{2}{\sin(2y) \cot(2y)}=\frac{2}{\cos(2y)}

\boxed{\cot \left(\frac{\pi}{4}+ y\right)+\cot \left(\frac{\pi}{4}- y\right)=2\sec(2y)}(A.4)


The \cosh x function is defined as:

\cosh x =\frac{e^{x}+e^{-x}}{2}

letting x=it in the above equation we get

\cosh it =\frac{e^{it}+e^{-it}}{2}

\boxed{\cosh it =\cos t}(A.5)



Comments

Popular posts from this blog