# An interesting integral

• Jun 19th 2009, 12:21 AM
simplependulum
An interesting integral
solve $\int_{0}^{\frac{\pi}{2}} \cos{[\ln{(\tan{x})}]} ~dx$
• Jun 20th 2009, 04:48 PM
NonCommAlg
Quote:

Originally Posted by simplependulum
solve $\int_{0}^{\frac{\pi}{2}} \cos{[\ln{(\tan{x})}]} ~dx$

it's easy to find the answer as an infinite series: put $\tan x = e^t.$ then: $I= \int_{0}^{\frac{\pi}{2}} \cos{[\ln{(\tan{x})}]} ~dx =2 \int_0^{\infty} \frac{e^t \cos t}{1+e^{2t}} \ dt=2 \int_0^{\infty} (e^{-t} - e^{-3t} + e^{-5t} - \cdots ) \cos t \ dt.$

we know that for any $s > 0: \ \int_0^{\infty}e^{-st} \cos t \ dt = \frac{s}{s^2 + 1}.$ therefore $I=2 \sum_{n=0}^{\infty} (-1)^n\frac{2n+1}{(2n+1)^2 + 1}.$ now, does this alternating series have a closed form ? (Wondering)
• Jun 20th 2009, 09:54 PM
simplependulum
My answer is in terms of $\pi ~$ and hyperbolic cosine ( I hope i am correct ) but not in series form .

Actually this theorem $| {\gamma( \frac{1}{2} + bi ) |}^2 = \frac{ \pi}{ \cosh( \pi b)}$ inspired me to think of this question .
• Jun 23rd 2009, 03:02 AM
simplependulum
Check it whether your results are as same as my result

$\int_{0}^{ \frac{ \pi}{2}} \cos[k \ln( \tan{x} ) ] ~dx =$

$\frac{ \pi}{ 2 \cosh{ \pi \frac{k}{2} }}$
• Jul 3rd 2009, 07:09 AM
halbard
Yes, the substitution $t=\ln(\tan x)$ transforms the integral $I=\int_0^{\pi/2}\cos(k\ln(\tan x))\textrm d x$ to $\int_{-\infty}^\infty\frac{\textrm e^t\cos kt}{1+\textrm e^{2t}}\textrm d t$, which can be written as $\int_{-\infty}^\infty\frac{\cos kt}{2\cosh t}\textrm d t$.

We may assume that $k>0$ since cosine is even, and since sine is odd we may replace $\cos kt$ with $\textrm e^{\textrm i kt}$ as well. Thus $I=\int_{-\infty}^\infty\frac{\textrm e^{\textrm i kt}}{2\cosh t}\textrm d t$, a Fourier transform.

Now consider the integral of the function $f(z)=\frac{\textrm e^{\textrm i kz}}{2\cosh z}$ around the rectangular contour $C$ with vertices $-S$, $R$, $R+\textrm i\pi$ and $-S+\textrm i\pi$, where $R,\, S>0$, in the complex plane.

The function $f(z)$ is holomorphic inside and on C except at a simple pole $z_0=\textrm i\pi/2$, and its residue there is $\lim_{z\to z_0}(z-z_0)f(z)=\frac{\textrm e^{\textrm ikz_0}}2\lim_{z\to z_0}\frac{z-z_0}{\cosh z}
=\frac{\textrm e^{-k\pi/2}}2\frac1{\sinh z_0}=\frac{\textrm e^{-k\pi/2}}{2\textrm i}$
.

By the residue theorem $\oint_C f(z)\textrm dz=2\pi\textrm i\times\frac{\textrm e^{-k\pi/2}}{2\textrm i}=\pi\textrm e^{-k\pi/2}$.

Also $\oint_C f(z)\textrm dz=\int_{-S}^R f(t)\textrm dt+\int_0^\pi f(R+\textrm it)\textrm i\textrm dt+\int_R^{-S}f(t+\textrm i\pi)\textrm dt+\int_\pi^0f(-S+\textrm it)\textrm i\textrm dt$ upon integrating along each side of $C$.

Now $f(t+\textrm i\pi)=-\textrm e^{-k\pi}f(t)$, $|f(R+\textrm it)|\leq\frac1{2\sinh R}$ and $|f(-S+\textrm it)|\leq\frac1{2\sinh S}$ in these integrals. Thus

$\pi\textrm e^{-k\pi/2}=(1+\textrm e^{-k\pi})\int_{-S}^R f(t)\textrm dt+I_R+I_S$, where $|I_R|\leq\int_0^\pi|f(R+\textrm it)|\textrm dt\leq \frac\pi{2\sinh R}$ and similarly for $I_S$. Letting $R,\, S\to\infty$ we have $I_R,\,I_S\to 0$.

Therefore $\pi\textrm e^{-k\pi/2}=(1+\textrm e^{-k\pi})\int_{-\infty}^\infty f(t)\textrm dt$, i.e. $I=\frac{\pi\textrm e^{-k\pi/2}}{1+\textrm e^{-k\pi}}=\frac\pi{2\cosh(k\pi/2)}$.
• Jul 3rd 2009, 10:35 PM
simplependulum
Thank you very much , halbard

Besides solving contour integral , i have another method to solve it

Since $\Gamma(1-z) \Gamma(z) = \frac{ \pi}{\sin{ \pi z}}~~$ (1)

And $\beta( x , y ) = 2 \int_0^{\frac{\pi}{2}} \sin^{2x-1}(t) \cos^{2y-1}(t)~dt~~$ (2)

Then substitute $z = \frac{1}{2} + ki ~~$ into (1) and
$x = \frac{1}{2} + ki , y = \frac{1}{2} - ki ~~$ into (2)

$\Gamma( \frac{1}{2} + ki ) \Gamma( \frac{1}{2} - ki ) = \frac{ \pi}{\cosh{ \pi k}}~~$ and

$\beta( \frac{1}{2} + ki , \frac{1}{2} - ki ) = 2 \int_0^{\frac{\pi}{2}} \tan^{2ki}(x)~dx$

$\beta( \frac{1}{2} + ki , \frac{1}{2} - ki ) = 2 \int_0^{\frac{\pi}{2}} e^{i 2k\ln[\tan(x)]} ~dx$

But $\beta( \frac{1}{2} + ki , \frac{1}{2} - ki ) = \frac{\Gamma( \frac{1}{2} + ki ) \Gamma( \frac{1}{2} - ki )}{ \Gamma(1) }$

So after equating these two equations , we obtain

$2 \int_0^{\frac{\pi}{2}} e^{i 2k\ln[\tan(x)]} ~dx = \frac{ \pi}{\cosh{ \pi k }}$

Take the real part of the integral ,

$\int_0^{\frac{\pi}{2}} \cos[2k\ln(\tan{x})]~dx = \frac{\pi}{2 \cosh{ \pi k} }$

Replace $k ~~$ by $\frac{k}{2} ~~$ ,

$\int_0^{\frac{\pi}{2}} \cos[k\ln(\tan{x})]~dx = \frac{\pi}{2 \cosh{\frac{ \pi k}{2}} }$