15
$\begingroup$

After reading a textbook about integrals, my curiosity sparks about the following integral:

$$\int_0^\infty e^{-t} \log(\cos^2 t)\, \mathrm dt$$

How to evaluate a closed form of this integral ? My bet is to use the Cauchy Integral Theorem of Residues or the Laplace Transform.

$\endgroup$
  • 1
    $\begingroup$ Mathematica can't evaluate it, which isn't a good sign. Is there some reason to suspect that the integral has a closed-form expression? $\endgroup$ – Jim Belk Jun 25 '13 at 19:46
  • 2
    $\begingroup$ Integrating by parts, Maple produces $$\lim _{x\rightarrow \infty }-{{\rm e}^{-x}}\ln \left( \left( \cos \left( x \right) \right) ^{2} \right) -1/2\,\Psi \left( 1-1/4\,i \right) +\Psi \left( 1/2-1/4\,i \right) +1/2\,{\frac {\pi }{\cosh \left( \left( 1/2+1/2\,i \right) \pi \right) }}-1/2\,\Psi \left( -1 /4\,i \right) -1/2\,{\frac {\pi }{\cosh \left( \left( 1/2-1/2\,i \right) \pi \right) }} .$$ The question arises:"What for to find a closed form?" $\endgroup$ – user64494 Jun 25 '13 at 20:02
9
$\begingroup$

According to Mathematica, the indefinite integral is $$ I(t) = 2i e^{-t}F\left(\begin{array}{c}i/2,1\\1+i/2\end{array}\middle|-e^{2it}\right) + \frac{4-2i}{5}e^{2it-t}F\left(\begin{array}{c}1+i/2,1\\2+i/2\end{array}\middle|-e^{2it}\right) - e^{-t}\log\cos^2 t, $$ which is discontinuous at the points $t=\frac\pi2+\pi k$ ($k$ integer). Now, the first contribution to the infinite integral is $$\lim_{t\to0}-I(t) = 2i-\psi\left(i/4\right)+\psi\left(\frac{2+i}{4}\right). $$ Let $f(-e^{2it})$ be one the hypergeometric functions above (the coefficients multiplying $f$ are continuous with $t$, so we need only consider the discontinuity of $f$). The contribution to the integral from the discontinuity of $f$ at $t=\frac\pi2+\pi k$ will come from $$ -\lim_{\epsilon\to0+} + \lim_{\epsilon\to0-} f(1+2i\epsilon) = f(1-i0)-f(1+i0), $$ where $-e^{2i(\frac\pi2 + k\pi+\epsilon)} = 1+2i\epsilon + O(\epsilon^2)$.

According to Mathematica, the discontinuity of the first hypergeometric function is $\frac\pi2$ and for the second it is $(\frac12-i)\pi$. So now we need to sum over all the discontinuities, $k\geq0$ (where $t=\frac\pi2+k\pi$): $$\sum_{k\geq0} \frac{e^{-t}}{5}(4-2i)e^{2it}\left(\frac12-i\right)\pi = \pi i \sum_{k\geq0}e^{-\frac\pi2-k\pi} = \frac{i\pi}{2\sinh\frac\pi2} $$ for the second and $$ \sum_{k\geq0} 2ie^{-t}\frac\pi2 = \frac{i\pi}{2\sinh\frac\pi2}$$ for the first.

Finally, for the third term, $g(t)=e^{-t}\log\cos^2 t$, although it is singular at $t=\frac\pi2+\pi k$, the discontinuity $\lim_{\epsilon\to0+}g(t-\epsilon)-g(t+\epsilon)$ is zero.

So the integral equals $$ 2i-\psi\left(\frac i4\right)+\psi\left(\frac{2+i}{4}\right) + \frac{i\pi}{\sinh\frac\pi2} = -1.0322554358\ldots. $$

$\endgroup$
  • $\begingroup$ Another nice answer (+1). $\endgroup$ – Mhenni Benghorbal Jun 25 '13 at 22:55
8
$\begingroup$

First let $a>0$ and consider the following (computable) integral: \begin{align} I(a)&=\int_0^1 \ln \frac{x^{a}+x^{-a}}{2}dx=\\ &=-a-\ln 2+\int_0^{1}\ln(1+x^{-2a})dx=\\ &=-a-\ln 2+\frac{1}{2a}\int_1^{\infty}y^{-\frac{1}{2a}-1}\ln(1+y)dy=\\ &=a+\frac{\pi}{\sin\frac{\pi}{2a}}+\frac{1}{2}\left[\psi\left(\frac12-\frac{1}{4a}\right)-\psi\left(-\frac{1}{4a}\right)\right], \end{align} where $\psi(z)$ denotes the digamma function. The integral we want to calculate (here comes a little handwaving) is given by continuation of $I(a)+I(\bar{a})$ to complex $a$ (think of the change of variables $e^{-t}=x$ in the initial integral), evaluated at $a=i$.

This gives \begin{align} I(i)+I(-i)&=\frac{1}{2}\left[\psi\left(\frac12+\frac{i}{4}\right)+\psi\left(\frac12-\frac{i}{4}\right)-\psi\left(\frac{i}{4}\right)-\psi\left(-\frac{i}{4}\right)\right]=\\ &=\mathrm{Re}\left[\psi\left(\frac12+\frac{i}{4}\right)-\psi\left(\frac{i}{4}\right)\right], \end{align} which reproduces the earlier answer by Kirill.

$\endgroup$
  • $\begingroup$ @Kirill Thanks! I've just understood how to reduce the handwaving and edited my answer accordingly (considering $I(a)+I(\bar{a})$ we avoid the problems with branch points as the argument of the logarithm remains always real positive). $\endgroup$ – Start wearing purple Jun 25 '13 at 22:31
  • $\begingroup$ @O.L. When you introduce $y=e^{-2a\log x}$, how do you deform the contour image of $[0,1]$ into $[1,\infty)$ when $a$ has a non-zero imaginary part? The contour is a kind of a spiral and crosses the branch cut of the logarithm $y<-1$ and doesn't just go to $\infty$. To do analytic continuation to $a=i$ is it really enough for the function to be defined only on $a>0$? Also, $I(a)+I(\bar a)$ is not analytic in $a$, so surely you can analytically continue $I(a)$ but not $2\Re I(a)$? $\endgroup$ – Kirill Jun 26 '13 at 2:35
  • $\begingroup$ @Kirill To be honest I have not tried to understand well enough the analytic continuation. My argument is loosely the following: when I have $\ln \cosh at\cosh \bar{a}t$, singularities in the log do not appear when we gradually pass from real to complex $a$. This will not be the case for $I(a)$ (containing $\ln\cosh at$ only) where the singularity structure is complicated. Already the fact that $I(a)\neq I(-a)$ is somewhat surprising. $\endgroup$ – Start wearing purple Jun 26 '13 at 18:08
  • 1
    $\begingroup$ I got $\mathrm{Re}\left[\psi\left(\frac12+\frac i4\right)-\psi\left(1+\frac i4\right)\right]$, which I thought was different, but then I noticed that the difference was $\mathrm{Re}\left(\frac i4\right)$ :-) $\endgroup$ – robjohn Jun 26 '13 at 21:11
5
$\begingroup$

Here is a partial attempt. Perhaps this may lead to a closed form.

Integrating by parts twice yields $$ \begin{align} \int_0^\infty\sin^{2n}(t)e^{-t}\,\mathrm{d}t &=2n\int_0^\infty\sin^{2n-1}(t)\cos(t)\,e^{-t}\,\mathrm{d}t\\ &=2n\int_0^\infty\left((2n-1)\sin^{2n-2}(t)-2n\sin^{2n}(t)\right)\,e^{-t}\,\mathrm{d}t\\ (4n^2+1)\int_0^\infty \sin^{2n}(t)e^{-t}\,\mathrm{d}t &=(4n^2-2n)\int_0^\infty\sin^{2n-2}(t)\,e^{-t}\,\mathrm{d}t \end{align} $$ Therefore, $$ \begin{align} \int_0^\infty\sin^{2n}(t)e^{-t}\,\mathrm{d}t &=\prod_{k=1}^n\frac{2k(2k-1)}{4k^2+1}\\ &=\frac{(2n)!}{\prod\limits_{k=1}^n(4k^2+1)} \end{align} $$ Now $$ \begin{align} \int_0^\infty e^{-t}\log(\cos^2(t))\,\mathrm{d}t &=\int_0^\infty\log\left(1-\sin^2(t)\right)\,e^{-t}\,\mathrm{d}t\\ &=-\sum_{n=1}^\infty\int_0^\infty\frac1n\sin^{2n}(t)\,e^{-t}\,\mathrm{d}t\\ &=-2\sum_{n=1}^\infty\frac{(2n-1)!}{\prod\limits_{k=1}^n(4k^2+1)} \end{align} $$ The terms of the last sum decay like $n^{-3/2}$, so the sum does converge, although slowly.


As derived in my other post, the integral is equal to the simpler looking sum $$ \int_0^\infty e^{-t}\log(\cos^2(t))\,\mathrm{d}t=\sum_{k=1}^\infty(-1)^k\frac{8k}{4k^2+1} $$ At least $4k^2+1$ is still in the denominator.

$\endgroup$
  • $\begingroup$ I got stuck at exactly the same spot. This last sum is really annoying to deal with. $\endgroup$ – Eric Naslund Jun 25 '13 at 20:32
  • $\begingroup$ (+1) you can get a closed form for the sum in terms of the hypergemetric function $$ -\frac{2}{5}\,{{_2F_{3}}(1,3/2;\,1/2,2+1/2\,i,2-1/2\,i;\,1/4)} $$ with infinite radius of convergence. $\endgroup$ – Mhenni Benghorbal Jun 25 '13 at 22:50
  • $\begingroup$ @MhenniBenghorbal: thanks! I have added another approach that should match this hypergeometric one. $\endgroup$ – robjohn Jun 26 '13 at 21:07
4
$\begingroup$

Another approach

Using the formula $$ \sum_{k=1}^\infty\left(\frac1k-\frac1{k+z}\right)=\psi(z+1)+\gamma\tag{1} $$ we get $$ \begin{align} \sum_{k=1}^\infty(-1)^k\frac1{k+z} &=\sum_{k=1}^\infty\left(\frac1{2k}-\frac1{2k-1+z}\right)-\left(\frac1{2k}-\frac1{2k+z}\right)\\ &=\frac12\sum_{k=1}^\infty\left(\frac1{k}-\frac1{k+\frac{z-1}{2}}\right) -\frac12\sum_{k=1}^\infty\left(\frac1{k}-\frac1{k+\frac{z}{2}}\right)\\ &=\frac12\left(\psi\left(\frac{z+1}{2}\right)+\gamma\right) -\frac12\left(\psi\left(\frac{z+2}{2}\right)+\gamma\right)\\ &=\frac12\psi\left(\frac{z+1}{2}\right)-\frac12\psi\left(\frac{z+2}{2}\right)\tag{2} \end{align} $$ Applying $(2)$ to the question yields $$ \begin{align} \int_0^\infty\log(\cos^2(t))\,e^{-t}\,\mathrm{d}t &=2\,\mathrm{Re}\left(\int_0^\infty\log(\cos(t))\,e^{-t}\,\mathrm{d}t\right)\\ &=2\,\mathrm{Re}\left(\int_0^\infty\left(\color{#C00000}{\log(e^{it})}+\log(1+e^{-2it})\color{#00A000}{-\log(2)}\right)\,e^{-t}\,\mathrm{d}t\right)\\ &=\color{#00A000}{-2\log(2)}-2\sum_{k=1}^\infty\mathrm{Re}\left(\int_0^\infty\frac{(-1)^k}{k}e^{-2kit}\,e^{-t}\,\mathrm{d}t\right)\\ &=-2\log(2)-2\sum_{k=1}^\infty\mathrm{Re}\left(\frac{(-1)^k}{k}\frac1{1+2ki}\right)\\ &=-2\log(2)-2\sum_{k=1}^\infty(-1)^k\mathrm{Re}\left(\frac1k-\frac1{k+\frac1{2i}}\right)\\ &=2\sum_{k=1}^\infty(-1)^k\mathrm{Re}\left(\frac1{k+\frac1{2i}}\right)\\ &=\sum_{k=1}^\infty(-1)^k\left(\frac1{k+\frac1{2i}}+\frac1{k-\frac1{2i}}\right)\\ &=\frac12\psi\left(\frac12+\frac i4\right) +\frac12\psi\left(\frac12-\frac i4\right)\\ &-\frac12\psi\left(1+\frac i4\right) -\frac12\psi\left(1-\frac i4\right)\tag{3} \end{align} $$ This agrees with the other answers, and plugging into Mathematica yields

N[1/2(PolyGamma[1/2+I/4]+PolyGamma[1/2-I/4]
-PolyGamma[1+I/4]-PolyGamma[1-I/4]), 20]

$-1.03225543583966217044$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.