Background
For a certain project, I collected a considerable number of definite integrals whose evaluations amounted to numbers of the form $P :=a+b \pi^{2} $, where $a, b \in \mathbb{Q}$. I won't list them all here (the document comprises 34 pages, including references), but state the ones that stood out to me most in terms of bringing an element of surprise.
Integrals of Elementary Functions
- By [1] we have $$\int_{0}^{1} \left( \frac{\arctan(x)}{1+x^{2}} \right) dx = \frac{\pi^{2}}{32} . \tag{1} $$
- In the same source, we find $$\int_{0}^{\ln(\phi)} x \coth(x) dx = \frac{\pi^{2}}{20}, \tag{2} $$ where $\phi = \frac{1+\sqrt{5}}{2} $ is the golden ratio.
- In [2] we find $$\int_{0}^{\pi/2} \frac{\ln(\sec(x))}{\tan(x)} = \frac{\pi^{2}}{24}. \tag{3} $$
- Another logarithmic integral - yet quite different from the previous one - is [3] $$\int_{0}^{1} \frac{\ln(1+x+x^{2}+ x^{3} + x^{4} + x^{5} + x^{6})}{x} dx = \frac{\pi^{2}}{7}. \tag{4} $$
- By Theorem 1 of [4] we retrieve $$\int_{0}^{\infty} \Big{(} \sinh^{-1} (\cosh(u)) - u \Big{)} du = \frac{\pi^{2}}{16}. \tag{5} $$
- On p. 375, entry 3.521 of [5] we read $$\int_{0}^{\infty} \frac{ x }{\sinh(ax) }dx = \frac{\pi^{2}}{4a^{2}} \tag{6} .$$
- By p. 389, entry 3.557.6 of [5] we have $$\int_{0}^{\infty} x \frac{(e^{-x} -1 ) }{ (\cosh(x) - 1 ) } dx = - \frac{\pi^{2}}{3} . \tag{7} $$
- We have by p. 568, entry 4.317.11 of [5] that $$\int_{-\infty}^{\infty} \ln \left| \frac{1+2 \sqrt{1+x^{2}} }{1-2 \sqrt{1+x^{2}} } \right| \frac{dx}{(1+x^{2})^{1/2}} = \frac{\pi^{2}}{3}. \tag{8} $$
- By p. 569, entry 4.323.3 of [5] we learn that the following identity holds: $$\int_{0}^{\infty} \ln \bigg{(} \frac{1+\tan(x) }{1-\tan(x)} \bigg{)}^{2} \frac{dx}{x} = \frac{\pi^{2}}{2}. \tag{9} $$
- Another integral from [5]: on p. 582, entry 4.384.12, it is stated that $$\int_{0}^{\pi/2} \ln \big{(} \sin(x) \big{)} \tan(x) dx = - \frac{\pi^{2}}{24} . \tag{10}$$
- In [6] we find a long list of integrals. Here, [7] is relevant, among others. We find $$ \int_{0}^{\infty} \operatorname{arctanh}\big{(} e^{-ax} \big{)} dx = \frac{\pi^{2}}{8a}, \tag{11} $$
- and we also find $$\int_{0}^{\infty} x \operatorname{csch}(ax) dx = \frac{\pi^{2}}{4a^2} \tag{12} $$ when we set $n=2 $ in [8].
- On p. 544 of entry 2.6.36.3 of [9] we find $$\int_{0}^{\pi/2} \frac{ \ln \Big{(}1+\frac{\sin(x)}{2} \Big{)} }{\sin(x) } dx = \frac{5 \pi^{2}}{72} \tag{13} $$ when we set $a = 1/2 $.
- As pointed out by user Black Emperor in the comment section of this question [19], we have $$ \int_{0}^{\pi/4} \frac{(\sin(x)+\cos(x)) \arctan( \sin(x) + \cos(x) ) }{2 - \sin(2x)} dx = \frac{7}{96} \pi^{2}. \tag{14} $$
- In MSE question [25], user Zacky proves that $$\int_0^{\pi/3}\arccos(2\sin^2 x-\cos x)\mathrm dx=\frac{\pi^2}{5}.$$
We now move to the second third of the answer.
Integrals of Special Functions
To me, this is the most fun part.
- On p. 28 of [10], we find $$\int_{1}^{\infty} [-W_{0}(-xe^{-x})]^{\alpha} x^{-\alpha} dx = \alpha \psi_{1}(\alpha) -1, $$ where $W_{0}$ is the principal branch of the Lambert W-function and $\psi_{1}(\cdot) $ is the trigamma function and $\alpha>1$. If we take into account the special value of the trigamma function at $\alpha = 2 $, we obtain $$\int_{1}^{\infty} [-W_{0}(-xe^{-x})]^{2} x^{-2} dx = \frac{\pi^{2}}{3} -3. \tag{15}$$ Something similar holds for another branch of the Lambert W function: $$I_{3} := \int_{0}^{1} [-W_{-1}(-xe^{-x})]^{\alpha} x^{-\alpha} dx = \alpha \psi_{1}(1-\alpha)+ 1,$$ where in this case $|\alpha|<1$.
- On p. 120 of [11] we find $$\int_{0}^{1} x \Big{ \{ }\frac{1}{x} \Big{ \} } \Big{ \lfloor } \frac{1}{x} \Big{ \rfloor } dx = \frac{1}{2} \Big{(} 1 - \frac{\pi^{2}}{6} \Big{)} . \tag{16}$$ Here, $\big{ \lfloor }\cdot \big{ \rfloor } $ is the floor function, and $\{ \cdot \}$ is the fractional part function.
- Moreover, we obtain via [12] that $$ \int_{0}^{1} \frac{1}{ \Big{ \lfloor } \frac{1}{x} \Big{ \rfloor } } dx = \frac{\pi^{2}}{6} -1 . \tag{17} $$
- By [13] we have $$ \int_{0}^{\infty} x K_{0}(x) K_{1}(x) dx = \frac{\pi^{2}}{8}, \tag{18}$$ where $K_{0}(\cdot) $ and $K_{1}(\cdot) $ are the modified Bessel functions of the second kind of the zeroth and first order. Other definite integrals of Bessel functions involving $\pi^{2}$ can be found in the OEIS entries of the decimal expansions of $\frac{\pi^{2}}{4}$ and $\frac{\pi^{2}}{16}$.
- By p. 632, entry 6.141.2 of [5] we have $$ \int_{0}^{1} \Big{(} \textbf{K} (k') \Big{)} dk = \frac{\pi^{2}}{4} , \tag{19}$$ where $\textbf{K}(\cdot) $ is the Complete Elliptic Integral of the first kind, and $k' := \sqrt{1-k^{2}}$ is its complementary modulus.
- By p. 885, entry 8.219.1 of [5] we obtain $$ \int_{0}^{\infty} \operatorname{Ei}^{2}(x) e^{-2x} dx = \frac{\pi^{2}}{4}. \tag{20} $$ Here, $\operatorname{Ei}(\cdot)$ is the exponential integral function. Other, similar integrals can be found in [16], for instance on p. 203.
- Define the Rogers dilogarithm function as follows: $$L(x) := - \frac{1}{2} \int_{0}^{x} \bigg{(} \frac{\ln(1-y)}{y} + \frac{\ln(y)}{1-y} \bigg{)} dy. $$ By p. 10 of [14] we have $$L \Big{(} \frac{\sqrt{5}-1}{2} \Big{)} = \frac{\pi^{2}}{10}, \quad \text{and} \quad L \Big{(} \frac{3-\sqrt{5}}{2} \Big{)} = \frac{\pi^{2}}{15} . \tag{21}$$
- Let $|q|<1$ and define the $q$-shifted factorials as $$(a;q)_{n} := \prod_{i=0}^{n-1} \left(1-a q^{i} \right) ,$$ with the limiting cases $$\left(a;q \right)_{0} = 1 $$ and $$\left( a;q \right)_{\infty} = \prod_{i=0}^{\infty} \left(1-a q^{i} \right) .$$ By equations $(12)$ and $(13)$ of [15], we find $$ \int_{- \frac{1}{2} \ln(q) }^{ \frac{1}{2} \ln(q) } \ln \left( q e^{\pm 2x} ; q^{2} \right)_{\infty} dx = \frac{\zeta(2)}{2} = \frac{\pi^{2}}{12}. \tag{22} $$
- Now, define the logarithmic integral function as $$\operatorname{li}(x) := \int_{0}^{x} \frac{dt}{\ln(t)} .$$ By [17] we have $$\int_{0}^{1} \left( \frac{\operatorname{li}(x)}{x} \right)^{2} dx = \frac{\pi^{2}}{6} . \tag{23} $$
- Finally, we have by [20] that the following holds: $$ \int_1^{\infty} \frac{\operatorname{li}(x)^2 (x - 1)}{x^4} dx = \frac{5 \pi^2}{36}. \tag{24} $$
Sums
In the final third part of the answer, we delve into relevant sums.
- Let $t_n$ be the $n$'th term of the Thue-Morse Sequence. Then by the following 2022 paper by László Tóth [18], we have:
$$ \sum_{n=1}^{\infty} \frac{5 t_{n-1} + 3 t_{n}}{n^2} = \frac{2 \pi^2}{3} . \tag{25}$$
- In the comment section of this MSE question [21], user Ethan Splaver points out that $$ \sum_{n=1}^{\infty} \frac{H_{n}}{n 2^{n}} = \frac{\pi^{2}}{12} . \tag{26}$$
- On p. 9 (eq. 1.73) of [22] we also see - among many other, related formulas - the following identity: $$ \sum_{k=1}^{\infty} \frac{28k^2 + 31k + 8}{(2k+1)^2 k^3 \binom{2k}{k}^3 } = \frac{\pi^2-8}{2}. \tag{27} $$
- In [23], the author obtains the following identity: $$\sum_{k=1}^{\infty} \frac{(3k-1)16^k }{k^{3} \binom{2k}{k}^3} = \frac{\pi^2}{2}. \tag{28} $$
- In the MSE question [24], user Ty. inquires about the series identity $$\sum_{n=1}^{\infty} \arctan\left(\frac{1}{F_n}\right) \arctan\left(\frac{1}{F_{n+1}}\right)=\frac{\pi^2}{8}. \tag{29}$$ Here, $F_{n}$ represents the $n$'th Fibonacci number. The question was answered by user metamorphy.
Sources
[1] N. J. A. Sloane, J. F. Alcover. OEIS A002388, 2022, 2013. Online Encyclopedia for Integer Sequences, link
[2] N. J. A. Sloane. OEIS A222171, 2022. Online Encyclopedia for Integer Sequences, link
[3] N. J. A. Sloane. OEIS A195056, 2022. Online Encyclopedia for Integer Sequences, link
[4] F. M. S. Lima. New definite integrals and a two-term dilogarithm identity. Indagationes Mathematicae, 2012, link
[5] I.S. Gradshteyn, I.M. Ryzhik. Table of Integrals, Series, and Products, seventh edition. Academic Press, 2007, link
[6] A. Dieckmann, Table of Integrals, Elsa Physik, Physikalisches Institut der Uni Bonn, 14 July 2022, link
[7] A. Dieckmann, Table of Integrals, Elsa Physik, Physikalisches Institut der Uni Bonn, 14 July 2022, specific integral link
[8] A. Dieckmann, Table of Integrals, Elsa Physik, Physikalisches Institut der Uni Bonn, 14 July 2022, specific integral link
[9] A. P. Prudnikov and Yu. A. Brychkov and O. I. Marichev. Integrals and Series, Volume 1: Elementary Functions. Gordon and Breach Science Publishers, 1986, link
[10] W. Gautschi. The Lambert W-functions and some of their integrals: a case study of high-precision computation. Numerical Algorithms, 2011, link
[11] O. Furdui. Limits, Series, and Fractional Part Integrals. Springer, 2012, link
[12] jh235, Tintarn. A Funny Integral. Art of Problem Solving, 2015, link
[13] N. J. A. Sloane. OEIS A111003, 2022. Online Encyclopedia for Integer Sequences, link
[14] A. N. Krillov. Dilogarithm Identities. ArXiv, 1994, link
[15] M. E. Bachraoui. Short proofs for $q$-Raabe formula and integrals for Jacobi theta functions. Journal of Number Theory, April 2017, link
[16] E. Geller, E. W. Ng. A Table of Integrals of the Exponential Integral. JOURNAL OF RESEARCH of the National Bureau af Standards, 1969, link
[17] Erik Satie, ComplexYetTrivial. prove that $\int_{0}^{1}\Big(\frac{\operatorname{li}(x)}{x}\Big)^2dx= \frac{\pi^2}{6}$. Math Stackexchange, 2020, link
[18] L. Tóth, Linear Combinations of Dirichlet Series associated with the Thue-Morse Sequence. Integers, 2022, link
[19] OnTheWay, Black Emperor. Evaluate $\int\limits_0^{\sqrt 2 } {\frac{1}{{3{a^2} + 2}}\frac{{\arctan \left( {\sqrt {{a^2} + 1} } \right)}}{{\sqrt {{a^2} + 1} }}da}$. Math Stackexchange, September 2023, link
[20] mick, metamorphy, Marco Cantarini. Show that $ \int_1^{\infty} \frac{\operatorname{li}(x)^2 (x - 1)}{x^4} dx = \frac{5 \pi^2}{36} $. Math Stackexchange, April 2023, link
[21] OlegK, mick, Ethan Splaver. Infinite Series $\sum_{n=1}^\infty\frac{H_n}{n^32^n}$. August 2014, link
[22] Z.-W. Sun. New Series for powers of $\pi$ and related Congruences. Electronic Research Archive and ArXiv, 2020 link
[23] J. Guillera. Hypergeometric identities for 10 extended
Ramanujan-type series. The Ramanujan Journal, 2008, link
[24] Ty., metamorphy. Prove $\sum_{n=1}^{\infty} \arctan\left(\frac{1}{F_n}\right) \arctan\left(\frac{1}{F_{n+1}}\right)=\frac{\pi^2}{8}$. Math Stackexchange, April 2021, link
[25] Dan, Zacky. $\int_0^{\pi/3}\arccos(2\sin^2 x-\cos x)\mathrm dx=\frac{\pi^2}{5}$. Math Stackexchange, January 2024, link