# Matsubara Summation and Contour Integration

I've been reading parts of the book 'Ultracold Quantum Fields' by Henk Stoof and in Chapter 7 I came across something which I don't understand.

This chapter is about the functional-integral formalism and how this can be used to understand the Ideal Quantum Gas. In the part of the Matsubara Expansion they want to show that the following holds:

$$\lim_ {\eta \downarrow 0 } \frac{1}{\hbar \beta} \sum_{n}\frac{e^{i \omega_n \eta}}{i \omega_n - (\epsilon - \mu)/\hbar}= \mp \frac{1}{e^{\beta(\epsilon - \mu)} \mp 1}.$$ According to the book this can be done by contour integration. They first note that $\hbar \beta / (e^{\hbar \beta z} \mp 1)$ has simple poles at the even and odd Matsubara frequencies ($\omega_n = \pi (2n) / \hbar \beta$ for bosons and $\omega_n = \pi (2n+1)/\hbar \beta)$. These poles I can see, but then they say that the residue at the poles is given by $\pm 1$. This I don't see, furthermore I don't understand how this function might help showing that the relation holds. They say that applying the residue theorem gives

$$\lim_ {\eta \downarrow 0 } \frac{1}{2 \pi i} \int _C dz \frac{e^{\eta z}}{z - (\epsilon - \mu)/\hbar} \frac{\pm 1}{e^{\hbar \beta z}\mp 1} = \lim_ {\eta \downarrow 0 }\frac{1}{\hbar \beta}\sum_{n}\frac{e^{i \omega_n \eta}}{i \omega_n - (\epsilon - \mu)/\hbar}.$$

I've been trying for a while to see how I should apply contour integration and the residue theorem to show this, but I don't understand how to do it.

From wikipedia, look at this contour:

This contour is the sum of a large circle at infinity and a tight contour going around the poles on the imaginary axis. The integration of the tight contour gives you the terms of the sum your interested in.

Along the large circle this term goes to 0:

$$\frac{1}{z - (\epsilon - \mu)/\hbar}$$

So adding this contour to the tight one (the one that gives you the terms of the sum) is just adding zero. But now if you add the two contour together you get a simpler contour that just goes around the poles of the function your summing over. (The one depicted in this picture)

Therefore this equation:

$$\lim_ {\eta \downarrow 0 } \frac{1}{2 \pi i} \int _C dz \frac{e^{\eta z}}{z - (\epsilon - \mu)/\hbar} \frac{\mp 1}{e^{\hbar \beta z}\mp 1} = \lim_ {\eta \downarrow 0 }\frac{1}{\hbar \beta}\sum_{n}\frac{e^{i \omega_n \eta}}{i \omega_n - (\epsilon - \mu)/\hbar}.$$

still holds while using this contour:

Applying the residue theorem will then give you the contribution from the pole:

$$\frac{1}{z - (\epsilon - \mu)/\hbar}$$ And thus you get: $$\lim_ {\eta \downarrow 0 } e^{\eta z} \frac{\mp 1}{e^{\hbar \beta z}\mp 1}|_{z = (\epsilon - \mu)/\hbar}$$

Which is the result your looking for.