For $n\geqslant m>1$, the integral $$I_{n,m}:=\int\limits_0^\infty\dfrac{\tanh^n(x)}{x^m}dx$$ converges. If $m$ and $n$ are both even or both odd, we can use the residue theorem to easily evaluate it in terms of odd zeta values, since the integrand then is a nice even function. For example, defining $e_k:=(2^k-1)\dfrac{\zeta(k) }{\pi^{k-1}}$, we have

$$ \begin{align} I_{2,2}&= 2e_3 \\ \\ I_{4,2}&= \dfrac83e_3-4e_5 \\ \\ I_{4,4}&= -\dfrac{16}{3}e_5+20e_7 \\ \\ I_{6,2}&=\dfrac{46}{15}e_3-8e_5+6e_7 \\ \\ I_{6,4}&=-\dfrac{92}{15}e_5+40e_7-56e_9 \\ \\ I_{6,6}&=\dfrac{46}{5}e_7-112e_9+252e_{11} \\ \\ I_{3,3}&= -e_3+6e_5 \\ \\ I_{5,3}&= -e_3+10e_5-15e_7 \\ \\ I_{5,5}&= e_5-25e_7 +70e_9 \\ \\ &etc. \end{align}$$


Is there a closed form for $I_{3,2}=\int\limits_0^\infty\dfrac{\tanh^3(x)}{x^2}dx$?

I am not sure at all whether nospoon's method used here or one of the other ad hoc approaches can be generalized to tackle this.
If the answer is positive, there might be chances that $I_{\frac32,\frac32}$ and the like also have closed forms.

  • 6
    $\begingroup$ I don't know whether to hope that we do, or that we don't, find an integration technique called "nospoon's method" in future calculus textbooks. $\endgroup$
    – LSpice
    Jun 6, 2017 at 17:04
  • 1
    $\begingroup$ $I_{3,2} \approx 1.154785313323$ is not recognized by the ISC ... isc.carma.newcatle.edu.au $\endgroup$ Jun 7, 2017 at 0:38
  • 1
    $\begingroup$ @GeraldEdgar Yes I know but wow, that "really means nothing". Note that the ISC doesn't even find $1.1274284420316\approx I_{3,3}$ :-( $\endgroup$
    – Wolfgang
    Jun 7, 2017 at 6:43
  • 1
    $\begingroup$ @user75829 Interesting. Never heard of gd(x) before! But as far as I see, it is essentially just notation? $\endgroup$
    – Wolfgang
    Jul 6, 2017 at 18:23
  • 1
    $\begingroup$ @PietroMajer No more mystery about the general form of $I_{n,m}$. It's all here. $\endgroup$
    – Wolfgang
    May 7, 2022 at 10:19

2 Answers 2


Following the suggestion I made in a comment, the integral can be rewritten as the contour integral $$ I_{3,2} = \frac{1}{2\pi i} \oint \frac{\operatorname{tanh}^3 z}{z^2} \log(-z) \, dz , $$ where the clockwise contour tightly encircles the positive real axis, which coincides with the branch cut of the logarithm. The reason that this integral is equivalent is because the branch jump across the real line of $\frac{1}{2\pi i} \log(-z)$ is precisely $1$.

The integrand has poles at all $z=\pm i\pi(k+\frac{1}{2})$, $k=0,1,2,\ldots$. Evaluating the residues we find \begin{align*} I_{3,2} &= \sum_{k=0}^\infty \frac{8\log\pi(k+\frac{1}{2})}{\pi^2 (2k+1)^2} - \frac{96 \log\pi(k+\frac{1}{2})-80}{\pi^4 (2k+1)^4} \\ &= \frac{5}{6} - \gamma - \frac{19 \log 2}{15} + 12 \log A - \log\pi + \frac{90 \zeta'(4)}{\pi^4} \\ &= 1.1547853133231762640590704519415261475352370924508924890\ldots \end{align*} The last two lines can be checked with Wolfram Alpha, where $\gamma$ is the Euler-Mascheroni constant, and $A$ is the Glaisher constant.

Edit: Using $\gamma =12\,\log(A)-\log(2\pi)+\frac{6}{\pi^2}\,\zeta'(2)$, this can be simplified to $$I_{3,2}=\frac{5}{6} - \frac{4\log 2}{15} -\frac{6\zeta'(2)}{\pi^2}+ \frac{90 \zeta'(4)}{\pi^4},$$ that is $$\boxed{I_{3,2}=\frac{5}{6} - \frac{4\log 2}{15} -\frac{\zeta'(2)}{\zeta(2)}+ \frac{\zeta'(4)}{\zeta(4)}}. $$ And this form may hint to the existence of similar closed forms for other integrals $I_{n,m}$ with $n+m$ odd.

Edit: Indeed... Numerically, it looks like e.g. $$ I(5,2)=\frac1{3}\Bigl(\frac{8}{5}-\frac{44}{63}\log2-3\frac{\zeta'(2)}{\zeta(2)} +5 \frac{\zeta'(4)}{\zeta(4)}-2\frac{\zeta'(6)}{\zeta(6)} \Bigr)$$ $$ I(7,2)=\frac1{45}\Bigl(\frac{7943}{420}-\frac{428}{45}\log2- 45\frac{\zeta'(2)}{\zeta(2)}+ 98\frac{\zeta'(4)}{\zeta(4)}- 70\frac{\zeta'(6)}{\zeta(6)}+ 17\frac{\zeta'(8)}{\zeta(8)}\Bigr)$$ $$ I(9,2)=\frac1{315}\Bigl(\frac{71077}{630}-\frac{10196}{165}\log2- 315\frac{\zeta'(2)}{\zeta(2)}+ 818\frac{\zeta'(4)}{\zeta(4)}- 798\frac{\zeta'(6)}{\zeta(6)}+ 357\frac{\zeta'(8)}{\zeta(8)}- 62\frac{\zeta'(10)}{\zeta(10)}\Bigr)$$ $$I(11,2)=\frac1{14175}\Bigl(\frac{2230796}{495}-\frac{10719068}{4095}\log2- 14175\frac{\zeta'(2)}{\zeta(2)}+ 41877\frac{\zeta'(4)}{\zeta(4)}- 50270\frac{\zeta'(6)}{\zeta(6)}+ 31416\frac{\zeta'(8)}{\zeta(8)}- 10230\frac{\zeta'(10)}{\zeta(10)}+1382\frac{\zeta'(12)}{\zeta(12)}\Bigr)$$ $$I(13,2)=\frac1{467775}\Bigl(\frac{270932553}{2002}-\frac{25865068}{315}\log2- 467775\frac{\zeta'(2)}{\zeta(2)}+ 1528371\frac{\zeta'(4)}{\zeta(4)}- 2137564\frac{\zeta'(6)}{\zeta(6)}+ 1672528\frac{\zeta'(8)}{\zeta(8)}- 771342\frac{\zeta'(10)}{\zeta(10)}+197626\frac{\zeta'(12) }{\zeta(12)}-21844\frac{\zeta'(14) }{\zeta(14)}\Bigr)$$

Here the initial denominators are chosen as the least common denominators of the $\frac{\zeta'(2k)}{\zeta(2k)}$ terms, such that inside the big parentheses, we have integer coefficients here. It turns out that the sequence of those denominators, viz. $1, 3, 45, 315, 14175, 467775$, coincides up to signs with A117972, the numerators of the rational numbers $\frac{\pi^{2n}\;\zeta'(-2n)}{\zeta(2n+1)}$.

Moreover, note that the coefficients of the $\frac{\zeta'(2k)}{\zeta(2k)}$ have alternating signs and always sum to 0, meaning that the closed forms can be decomposed into terms $\frac{\zeta'(2k)}{\zeta(2k)}-\frac{\zeta'(2k-2)}{\zeta(2k-2)}$, which are thus "exponential periods".

Further, the numerators of the $\frac{\zeta'(2n)}{\zeta(2n)}$ term of $I_{2n-1,2}$, viz. $1, -2, 17, -62, 1382, -21844$, coincide with A002430, the numerators of the Taylor series for $\tanh(x)$, which are also closely related to the rational values $\zeta(1-2n)$. All this seems rather interesting.

  • $\begingroup$ Now that is cute. Thank you very much! $\endgroup$
    – Wolfgang
    Jun 7, 2017 at 20:02
  • 8
    $\begingroup$ I wonder whether this sets a record for largest number of important constants in a single formula. $\endgroup$ Jun 7, 2017 at 23:27
  • 1
    $\begingroup$ Notice that both the Glaisher-Kinkelin and Euler-Mascheroni constants can be rewritten in terms of the Riemann $\zeta$ function as $\gamma=\dfrac{\zeta(1^+)+\zeta(1^-)}2~$ and $~12\ln A=1-12~\zeta'(-1).$ $\endgroup$
    – Lucian
    Sep 1, 2019 at 19:22
  • $\begingroup$ @GerryMyerson Not exactly a record anymore. :) I wonder how often "verbose" closed forms of this kind of integrals (more frequent on math.se) can indeed be simplified! $\endgroup$
    – Wolfgang
    Nov 19, 2021 at 18:18
  • $\begingroup$ And for the record [not in @GerryMyerson 's sense, though :) ], we have: $$I(11,2)=\frac1{14175}\Bigl(\frac{2230796}{495}-\frac{10719068}{4095}\log2- 14175\frac{\zeta'(2)}{\zeta(2)}+ 41877\frac{\zeta'(4)}{\zeta(4)}- 50270\frac{\zeta'(6)}{\zeta(6)}+ 31416\frac{\zeta'(8)}{\zeta(8)}- 10230\frac{\zeta'(10)}{\zeta(10)}+1382\frac{\zeta'(12)}{\zeta(12)}\Bigr)$$ $\endgroup$
    – Wolfgang
    Nov 24, 2021 at 21:05

Rewrite the integrand and apply Taylor expansion to $\frac1{(1+e^{-2x})^3}$ so that $$\frac{\tanh^3x}{x^2}=\sum_{j\geq0}(-1)^j\binom{j+2}2 \frac{(1-e^{-2x})^3}{x^2}\binom{j+2}2e^{-2jx}.$$ Integrate term-wise to get (after some regrouping) $$\int_0^{\infty}\frac{\tanh^3x}{x^2}\,dx=\sum_{k=2}^{\infty}(-1)^k(8k^3+4k)\log k.$$ Perhaps there is some hope in view of what I see as $$\sum_{k=2}^{\infty}(-1)^k\log k=\log\sqrt{\frac2{\pi}};$$ which is a Wallis-type formula $$\frac23\cdot\frac45\cdot\frac67\cdots\frac{2k}{2k+1}\cdots=\sqrt{\frac2{\pi}}.$$

UPDATE. Using a divergent series approach on $\sum_k(-1)^kk^c$ and Will Sawin's comment, we can complete the solution as follows. Start with $\sum_{k\geq1}(-1)^kk^c=\zeta(-c)(2^{c+1}-1)$ to get the derivate $$\sum_{k\geq2}(-1)^ck^c\log k=-\zeta'(-c)(2^{c+1}-1)+\zeta(-c)2^{c+1}\log2.$$ Now, apply the following facts: $\zeta(-1)=-\frac1{12},\, \zeta'(-1)=\frac1{12}-\log A,\, \zeta(-3)=\frac1{120}$ and $$\zeta'(-3)=\frac1{120}\log(2\pi)-\frac{11}{720}+\frac1{120}\gamma-\frac{3\zeta'(4)}{4\pi^4}.$$ Next, put all these together and simplify \begin{align}\sum_{k\geq0}(-1)^k(8k^3+4k)\log k &=[-120\zeta'(-3)+128\zeta(-3)\log 2]+[-12\zeta'(-1)+16\zeta(-1)\log 2] \\ &=\frac56-\gamma-\log\pi-\frac{19}{15}\log2+12\log A+\frac{\zeta'(4)}{\zeta(4)}. \end{align}

  • $\begingroup$ One may start by finding a divergent series formula for $\sum_{k\geq2}(-1)^kk^c$ for a range of values of $c$ real. Take derivative to get $\sum_k(-1)^kk^c\log k$ and then put $c=1$. $\endgroup$ Jun 7, 2017 at 7:17
  • 5
    $\begingroup$ $\sum_k (-1)^k k^c$ is $\left( \sum_k k^c \right) (-1 + 2^{1+c} )$ and the first term is of course $\zeta(-c)$. This is surely related to the appearance of the derivative of $\zeta$ in Igor's formula. $\endgroup$
    – Will Sawin
    Jun 7, 2017 at 19:03
  • 1
    $\begingroup$ This is super, Ramanujan style! $\endgroup$
    – Lewi_Sol
    Jun 7, 2017 at 22:48
  • $\begingroup$ Indeed very cute, as well as Igor Khavkine's approach above. $\endgroup$ Jun 8, 2017 at 5:48
  • $\begingroup$ @IgorKhavkine's approach mentioned above. $\endgroup$
    – LSpice
    Nov 18, 2021 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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