An outrageous way to derive a Laurent series: why does this work?

I had to compute a series expansion of $1/(e^{x}-1)$ about $x=0$, and in the course of its derivation, I made a couple of manipulations that are not allowed mathematically. Still, comparing the final result against Maple showed that it was right.

The following is what I did:

$$\begin{split} \frac{1}{e^{x}-1} &= \frac{e^{-x}}{1-e^{-x}} = \sum_{n=1}^{\infty} e^{-nx} \\ &= \sum_{n=1}^{\infty} \sum_{k=-\infty}^{\infty}\frac{(-nx)^{k}}{\Gamma(k+1)}\\ &= \sum_{k=-\infty}^{\infty}(-1)^{k}\frac{x^{k}}{\Gamma(k+1)}\sum_{n=1}^{\infty} n^{k}\\ &= \sum_{k=-\infty}^{\infty}(-1)^{k}\frac{\zeta(-k)}{\Gamma(k+1)} x^{k}\\ &= \sum_{k=-1}^{\infty}(-1)^{k}\frac{\zeta(-k)}{\Gamma(k+1)} x^{k}\\ \end{split}$$ I naively exchanged the order of summation to obtain the third line. Then, I pretended that the summation over $n$ converged (i.e., as if $k$ were always smaller than -1), and replaced it by the Riemann zeta function. Notice that whenever $1/\Gamma(k+1) = 0$ , the coefficient of $x^{k}$ vanishes except when $k=-1$, for which the poles of gamma and zeta functions cancel out and give a finite value.

I suppose that there is a deeper reason that such unreliable steps led me to the correct result? My guess is that it has to do with the analytic structure of the summand as a function of $k$, but I haven't been able to figure out in detail why and when this works.

I'll appreciate any insights on this.

• Perhaps you should post this on PHYS.SE? Physicists are skilled in the art of getting meaningful answers using mathematically non-kosher, but physically intuitive, techniques. :) – user_of_math Aug 12 '14 at 5:01
• Naive question: why do you think the order of summation in this case is not commutive? – user117644 Aug 12 '14 at 5:48
• I think it was a joke about phys.se ; but in any case this question certainly belongs on math.stackexchange. – littleO Aug 12 '14 at 5:54
• Why in Frank's name did you expand $$e^z = \sum_{k=-\infty}^\infty \frac{z^k}{\Gamma(k+1)}\,?$$ – Daniel Fischer Aug 12 '14 at 23:41
• You could post the question on PhysicsOverflow, see the link on my profile. – Dilaton Aug 13 '14 at 0:11

Let us assume ${\rm Re}(x)>0$ so that the geometric series is convergent. Perhaps the most intuitive way to justify OP's calculation is to use the Mellin transform. The Mellin integration coutour $\gamma$ in the complex $s$-plane is a vertical line ${\rm Re}(s)=c$ directed upward. The positive constant $c>1$ is chosen positive enough to justify switching the order of $s$-integration and $n$-summation below. Then we can mimick OP's calculation as follows.
$$\begin{split} \frac{1}{e^{x}-1} ~&=~ \frac{e^{-x}}{1-e^{-x}} ~\stackrel{{\rm Re}(x)>0}{=}~ \sum_{n\in\mathbb{N}} e^{-nx} \\ ~&=~\sum_{n\in\mathbb{N}} \sum_{k\in\mathbb{N}_0} \frac{(-nx)^k}{k!}\\ ~&=~\sum_{n\in\mathbb{N}} \sum_{k\in\mathbb{N}_0} {\rm Res}\left(s\mapsto\Gamma(s)(nx)^{-s} ,-k\right) \\ ~&=~\sum_{n\in\mathbb{N}}\int_{\gamma}\! \frac{\mathrm{d}s}{2\pi i} \Gamma(s)(nx)^{-s} \\ ~&=~\int_{\gamma}\! \frac{\mathrm{d}s}{2\pi i} \sum_{n\in\mathbb{N}}\Gamma(s)(nx)^{-s} \\ ~&\stackrel{c>1}{=}~\int_{\gamma}\! \frac{\mathrm{d}s}{2\pi i}\Gamma(s)\zeta(s)x^{-s} \\ ~&=~ \sum_{k=-1}^{\infty} {\rm Res}\left(s\mapsto \Gamma(s)\zeta(s)x^{-s} ,-k\right) \\ ~&=~\frac{1}{x}+ \sum_{k\in\mathbb{N}_0} \frac{\zeta(-k)(-x)^k}{k!}.\\ \end{split}$$
1. that the Gamma function $\Gamma(s)$ has poles at the non-positive integers $s=-k$, $k\in\mathbb{N}_0$, with residue ${\rm Res}(\Gamma,-k)=\frac{(-1)^k}{k!}$, and
2. that the Riemann zeta function $\zeta(s)$ has a pole at $s=1$ with residue ${\rm Res}(\zeta,1)=1$.