May 18, 2026
Let's evaluate this integral:
\[ I = \int_0^\infty \frac{x}{e^x - 1}\,dx \]
Although the integrand appears undefined at \(x = 0\), the singularity is removable:
\[ \lim_{x \to 0} \frac{x}{e^x - 1} = 1 \]
So the integral is perfectly well-defined. And spoiler alert: it equals \(\pi^2/6\). If that number rings a bell, it should, because it's exactly the answer to the Basel problem. And that's not a coincidence. Let me show you why.
The first thing to notice is that \(\frac{1}{e^x - 1}\) can be rewritten more usefully. Multiply top and bottom by \(e^{-x}\):
\[ \frac{x}{e^x - 1} = \frac{x e^{-x}}{1 - e^{-x}} \]
Now that denominator \(1 - e^{-x}\) looks familiar. For every fixed \(x > 0\), we have \(0 < e^{-x} < 1\), so this is just a geometric series in disguise:
\[ \frac{1}{1 - e^{-x}} = \sum_{k=0}^{\infty} e^{-kx} \]
Plugging this in:
\[ \frac{x e^{-x}}{1 - e^{-x}} = x e^{-x} \sum_{k=0}^{\infty} e^{-kx} = x \sum_{k=0}^{\infty} e^{-(k+1)x} = x \sum_{k=1}^{\infty} e^{-kx} \]
That last step is just absorbing the \(e^{-x}\) into the sum and shifting the index so that \(k\) starts at 1 instead of 0.
Our integral becomes:
\[ I = \int_0^\infty x \sum_{k=1}^{\infty} e^{-kx}\,dx = \sum_{k=1}^{\infty} \int_0^\infty x\, e^{-kx}\,dx \]
Can we just swap the sum and integral like that? Yes! Every term \(x\, e^{-kx}\) is non-negative on \((0, \infty)\), so by Tonelli's theorem, the interchange is justified. At several points in this derivation we're performing manipulations that would be illegal for arbitrary infinite series, but exponential decay keeps everything absolutely convergent and well-behaved.
Now we just need to evaluate:
\[ \int_0^\infty x\, e^{-kx}\,dx \]
This is a textbook integration by parts. Let \(u = x\) and \(dv = e^{-kx}\,dx\):
\begin{align} \int_0^\infty x\, e^{-kx}\,dx &= \left[-\frac{x}{k} e^{-kx}\right]_0^\infty + \frac{1}{k}\int_0^\infty e^{-kx}\,dx \\[6pt] &= 0 + \frac{1}{k}\left[-\frac{1}{k} e^{-kx}\right]_0^\infty \\[6pt] &= \frac{1}{k} \cdot \frac{1}{k} \\[6pt] &= \frac{1}{k^2} \end{align}
The boundary term \(\left[-\frac{x}{k} e^{-kx}\right]_0^\infty\) vanishes because \(e^{-kx}\) decays way faster than \(x\) grows, so the product goes to zero at infinity. At the lower limit, it's just \(0 \cdot 1 = 0\).
Putting it all together:
\[ I = \sum_{k=1}^{\infty} \frac{1}{k^2} = 1 + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \dots \]
And there it is. Our integral is exactly the sum of reciprocal squares, which is the Basel problem itself. If you've read my earlier post where we proved this using Fourier series and Parseval's theorem, or the one-pager version, you already know the ending:
\[ \boxed{\int_0^\infty \frac{x}{e^x - 1}\,dx = \sum_{k=1}^{\infty} \frac{1}{k^2} = \frac{\pi^2}{6}} \]
What I love about this result is how the technique makes things easier by making them look harder. We took one integral and turned it into an infinite sum of integrals. On the surface, that's going in the wrong direction. But each of those integrals is dead simple, and the resulting sum is a famous constant. Sometimes the long way around is the shortcut.
If you want to take this further, try the same approach with higher powers of \(x\) in the numerator. The integral \(\int_0^\infty \frac{x^{n-1}}{e^x - 1}\,dx\) equals \(\Gamma(n)\,\zeta(n)\), where \(\Gamma\) is the gamma function and \(\zeta\) is the Riemann zeta function. Our case was \(n = 2\): \(\Gamma(2) = 1! = 1\), and \(\zeta(2) = \pi^2/6\). That's the general machine behind what we just did by hand.
Math keeps doing this to me. You pull on one thread and suddenly you're back somewhere familiar. The Basel problem isn't just an abstract curiosity about infinite series. It shows up everywhere, and each new encounter makes it feel a little more inevitable.