# An interesting integral

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

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

it's easy to find the answer as an infinite series: put $\displaystyle \tan x = e^t.$ then: $\displaystyle 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 $\displaystyle s > 0: \ \int_0^{\infty}e^{-st} \cos t \ dt = \frac{s}{s^2 + 1}.$ therefore $\displaystyle 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 $\displaystyle \pi ~$ and hyperbolic cosine ( I hope i am correct ) but not in series form .

Actually this theorem $\displaystyle | {\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

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

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

We may assume that $\displaystyle k>0$ since cosine is even, and since sine is odd we may replace $\displaystyle \cos kt$ with $\displaystyle \textrm e^{\textrm i kt}$ as well. Thus $\displaystyle 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 $\displaystyle f(z)=\frac{\textrm e^{\textrm i kz}}{2\cosh z}$ around the rectangular contour $\displaystyle C$ with vertices $\displaystyle -S$, $\displaystyle R$, $\displaystyle R+\textrm i\pi$ and $\displaystyle -S+\textrm i\pi$, where $\displaystyle R,\, S>0$, in the complex plane.

The function $\displaystyle f(z)$ is holomorphic inside and on C except at a simple pole $\displaystyle z_0=\textrm i\pi/2$, and its residue there is $\displaystyle \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 $\displaystyle \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 $\displaystyle \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 $\displaystyle C$.

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

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

Therefore $\displaystyle \pi\textrm e^{-k\pi/2}=(1+\textrm e^{-k\pi})\int_{-\infty}^\infty f(t)\textrm dt$, i.e. $\displaystyle 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 $\displaystyle \Gamma(1-z) \Gamma(z) = \frac{ \pi}{\sin{ \pi z}}~~$ (1)

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

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

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

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

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

But $\displaystyle \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

$\displaystyle 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 ,

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

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

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