# Integral $\int_0^\infty \frac{\sin^2 ax}{x(1-e^x)}dx=\frac{1}{4}\log\left( \frac{2a\pi}{\sinh 2a\pi}\right)$

How can we prove this ${\it{interesting}}$ integral $$I:=\int_0^\infty \frac{\sin^2 ax}{x(1-e^x)}dx=\frac{1}{4}\log\left( \frac{2a\pi}{\sinh 2a\pi}\right)$$ I to write $$I=\frac{1}{2}\int_0^\infty \frac{(1-\cos a x)}{x}dx \sum_{n=0}^\infty e^{nx}$$ simplifying $$I=\frac{1}{2} \int_0^\infty \sum_{n=0}^\infty e^{nx}\frac{dx}{x} -\frac{1}{2}\int_0^\infty \frac{\cos a x}{x}dx \sum_{n=0}^\infty e^{nx}$$ but didn't help much. Thank you

• I suggest you use differentiation under the integral sign. – Zaid Alyafeai May 20 '14 at 20:47

Consider the integral \begin{align} I = \int_{0}^{\infty} \frac{\sin^{2}(ax)}{x(1-e^{x})} \ dx. \end{align} This can be seen as \begin{align} - I &= \int_{0}^{\infty} \frac{ e^{-x} \sin^{2}(ax) }{ x ( 1 - e^{-x}) } \ dx \\ &= \sum_{n=0}^{\infty} \ \int_{0}^{\infty} e^{-(n+1)x} \sin^{2}(ax) \ \frac{dx}{x} \\ &= \sum_{n=0}^{\infty} I_{n} \end{align} where $I_{n}$ is given by \begin{align} I_{n} = \int_{0}^{\infty} e^{-(n+1)x} \sin^{2}(ax) \ \frac{dx}{x}. \end{align} Now $I_{n}$ can be evaluated as follows. \begin{align} \partial_{n} I_{n} &= - \int_{0}^{\infty} e^{-(n+1)x} \sin^{2}(ax) \ dx \\ &= - \frac{1}{2} \ \int_{0}^{\infty} e^{-(n+1)x} (1 - \cos(2ax)) \ dx \\ &= - \frac{1}{2} \left[ \frac{1}{n+1} - \frac{(n+1)}{4a^{2} + (n+1)^{2}} \right] \end{align} and upon integration yields \begin{align} I_{n} &= - \frac{1}{2} \ln(n+1) + \frac{1}{4} \ln (4 a^{2} + (n+1)^{2}) \\ &= \frac{1}{4} \ln\left( \frac{4 a^{2} + (n+1)^{2}}{(n+1)^{2}} \right). \end{align} Now, returning to the summation, it is seen that \begin{align} - I &= \frac{1}{4} \sum_{n=0}^{\infty} \ln\left( \frac{4 a^{2} + (n+1)^{2}}{(n+1)^{2}} \right) \\ &= \frac{1}{4} \ln \left( \prod_{n=0}^{\infty} \left\{ \frac{4 a^{2} + (n+1)^{2}}{(n+1)^{2}} \right\} \right). \end{align} Using the product formula \begin{align} \frac{\sinh(x)}{x} = \prod_{k=1}^{\infty} \left( 1 + \frac{x^{2}}{k^{2} \pi^{2}} \right) \end{align} then the final result is \begin{align} I = \frac{1}{4} \ln \left( \frac{2 a \pi}{\sinh(2a \pi)} \right). \end{align} Hence, \begin{align} \int_{0}^{\infty} \frac{\sin^{2}(ax)}{x(1-e^{x})} \ dx = \frac{1}{4} \ln \left( \frac{2 a \pi} {\sinh(2a \pi)} \right). \end{align}

• Do you have proof of the product formula$$\frac{\sinh(x)}{x} = \prod_{k=1}^{\infty} \left( 1 + \frac{x^{2}}{k^{2} \pi^{2}} \right),$$ or a reference to it? This is a great solution very nice work again, thanks for solving another integral. +1 – Jeff Faraci May 21 '14 at 3:17
• In the article math.binghamton.edu/dikran/478/Ch6.pdf the formula is on page 328. Also in the Table of Integrals, Series, and Products it is formula 1.431.2 page 45 (5th ed). – Leucippus May 21 '14 at 3:35
• I believe you that the formula is correct. I want to know if you have reference to a proof, or can prove it. I looked at pg. 328 it is very nice but it is an exercise to prove, not the proof. Thanks again... – Jeff Faraci May 21 '14 at 3:36
• In Whittaker and Watson's book, p. 137, the general product formula is given with application to show the sine infinite product, then shift by $x = it$ archive.org/details/courseofmodernan00whit . Another way to do the infinite product is to use the Gamma function infinite product form and use $\Gamma(x) \Gamma(-x) = - \frac{\pi}{x \sin(\pi x)}$. – Leucippus May 21 '14 at 4:25
• Thanks for the references, that is is a bit more helpful to me. And the solution again. +1 – Jeff Faraci May 21 '14 at 16:45

\begin{aligned} \frac{1}{2}{\frac {\partial }{\partial a}}\int _{0}^{\infty }\!{\frac {\cos \left( 2\,ax \right) -1}{x \left( -1+{{\rm e}^{x}} \right) }}{dx}&= \int _{0}^{\infty }\!{\frac {\sin \left( 2\,ax \right) }{1-{{\rm e}^{x }}}}{dx}\\ &=\mathcal{Im} \left( \int _{0}^{\infty }\!-{\frac {{{\rm e}^{2\,iax}}}{-1+{ {\rm e}^{x}}}}{dx} \right) \\ &=\mathcal{Im}\left(\sum _{n=0}^{\infty } \left( \int _{0}^{\infty }\!{{\rm e}^{2\,iax}}{ {\rm e}^{-xn}}{dx} \right)\right)\\ &=\frac{1}{2}\,i\sum _{n=1}^{\infty } \left( \frac{1}{\left( 2\,ia-n \right)} \frac{1}{\left( -2\,ia-n \right)} \right)\\ &=\frac{1}{4\,a}+\frac{\pi}{2} \,\coth \left( 2\,\pi \,a \right) \end{aligned} Integrating with respect to $a$ gives: \begin{aligned} \int_0^\infty \frac{\sin^2 ax}{x(1-e^x)}dx&=\int \!\frac{1}{4\,a}+\frac{\pi}{2} \,\coth \left( 2\,\pi \,a \right) {da}\\ &=\frac{1}{4}\,\ln \left( 2\,\pi \,a \right) +\frac{1}{4}\,\ln \left( \sinh \left( 2\, \pi \,a \right) \right)+K\\ &=\frac{1}{4}\,\ln \left( \frac{2\,\pi \,a }{\sinh \left( 2\, \pi \,a \right) }\right)+K \end{aligned} and the constant of integration $K$, is zero as: $$\lim _{a\rightarrow 0}{\frac {2\pi \,a}{\sinh \left( 2\,\pi \,a \right) }}=1,\quad \lim_{a=0}\,\sin^2(ax)=0$$

The integral: $$\int _{0}^{\infty }\!-{\frac {{{\rm e}^{2\,iax}}}{-1+{ {\rm e}^{x}}}}{dx}$$ can also be evaluated by comparing it to the difference of two digamma functions and then the $\coth$ function appears using the reflection formula for the digamma function.

• Also +1 on the command $\mathcal{Im}$, I always used $\Im$ and it doesn't look nearly as nice. Nice work:). Also having gone through this method in detail now, it seems your starting point is more of a magician's style:)! Any insight as to how you start there? Thanks! – Jeff Faraci May 21 '14 at 16:46
• I thought the integral would resemble something familiar were it not for the $1/x$ term. I saw the parameter $a$ and asked what happens if I differentiate w.r.t to $a$? Agh, that gets rid of the annoying $1/x$... this technique is known as differentiation under the integral it also features in Leucippus's answer and Zaid alluded to it in his comment. – Graham Hesketh May 21 '14 at 17:04
• Ok thanks for the assistance and help – Jeff Faraci May 21 '14 at 17:49

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}{\left\vert #1\right\rangle} \newcommand{\ol}{\overline{#1}} \newcommand{\pars}{\left(\, #1 \,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}{\underline{#1}} \newcommand{\verts}{\left\vert\, #1 \,\right\vert} \newcommand{\wt}{\widetilde{#1}}$ $\ds{I\equiv\int_{0}^{\infty}{\sin^{2}\pars{ax} \over x\pars{1 - \expo{x}}}\,\dd x ={1 \over 4}\,\ln\pars{2a\pi \over \sinh\pars{2a\pi}}:\ {\large ?}}$

\begin{align} I&=\half\,\Re\int_{0}^{\infty} {1 - \expo{2\ic ax} \over 1 - \expo{x}}\,\int_{0}^{\infty}\expo{-xt}\,\dd t\,\dd x =-\,\half\,\Re\int_{0}^{\infty} \int_{0}^{\infty}{\pars{1 - \expo{2\ic ax}}\expo{-x} \over 1 - \expo{-x}}\, \expo{-tx}\,\dd x\,\dd t \\[3mm]&=-\,\half\,\Re\int_{0}^{\infty} \sum_{n = 0}^{\infty}\int_{0}^{\infty}\bracks{% \expo{-\pars{n + 1 + t}x} - \expo{-\pars{n + 1 + t - 2\ic a}x}}\,\dd x\,\dd t \\[3mm]&=-\,\half\,\Re\int_{0}^{\infty}\sum_{n = 0}^{\infty}\bracks{% {1 \over n + 1 + t} - {1 \over n + 1 + t - 2\ic a}}\,\dd x\,\dd t \\[3mm]&=-\,\half\,\Re\int_{0}^{\infty}\bracks{{1 \over -2\ic a} \sum_{n = 0}^{\infty}{1 \over \pars{n + 1 + t}\pars{n + 1 + t - 2\ic a}}}\,\dd t \\[3mm]&=\half\,\Re\int_{0}^{\infty}\bracks{\Psi\pars{1 + t} - \Psi\pars{1 + t - 2\ic a}} \,\dd t \end{align} where $\ds{\Psi\pars{z} \equiv \totald{\ln\pars{\Gamma\pars{z}}}{z}}$ is the Digamma Function ${\bf\mbox{6.3.1}}$ and we have used the identity ${\bf\mbox{6.3.16}}$. $\ds{\Gamma\pars{z}}$ is the Gamma Function ${\bf\mbox{6.1.1}}$.

With Stirling Asymptotic Formula ${\bf\mbox{6.1.41}}$: $$I=\half\,\bracks{\overbrace{% \Re\lim_{t \to \infty}\ln\pars{\Gamma\pars{1 + t} \over \Gamma\pars{1 + t - 2\ic a}}} ^{\ds{=\ 0}} +\Re\ln\pars{\Gamma\pars{1 - 2\ic a}}}$$

With identities ${\bf\mbox{6.1.28}}$ and ${\bf\mbox{6.1.29}}$: \begin{align} I&=\half\,{\ln\pars{\Gamma\pars{1 - 2\ic a}\Gamma\pars{1 + 2\ic a}} \over 2} ={1 \over 4}\, \ln\pars{\pars{-2\ic a}\Gamma\pars{-2\ic a}\pars{2\ic a}\Gamma\pars{2\ic a}} \\[3mm]&={1 \over 4}\,\ln\pars{4a^{2}\verts{\Gamma\pars{2\ic a}}^{2}} ={1 \over 4}\,\,\ln\pars{4a^{2}\,{\pi \over 2a\sinh\pars{2\pi a}}} \end{align}

$$\color{#00f}{\large% I\equiv\int_{0}^{\infty}{\sin^{2}\pars{ax} \over x\pars{1 - \expo{x}}}\,\dd x={1 \over 4}\,\ln\pars{2a\pi \over \sinh\pars{2a\pi}}}$$