Matsubara sum with log term How do I compute the Matsubara sum
$$\sum_n  \log\left(-i\omega_n +\frac{k^2}{2m}+\mu\right)?$$
If I have sums like
$\sum_n \frac{1}{i\omega_n -m}$, I can sum it up by calculating the sum of residues of the function $\frac{1}{z-m}g(z)$ at the poles where $g(z)=\begin{cases}
\frac{\beta}{\exp (\beta z)+1}  \text{ for Fermions}\\
\frac{\beta}{\exp (\beta z)-1} \text{ for Bosons}
\end{cases}$
But how do I do I compute in this case where there is a $\log$ term and there are no poles.
 A: S=$\sum_n\ln(-i\omega_n+\epsilon)=\sum_n\ln(i\omega_n-\epsilon)+C$
(usually this is an action and the constant is irrelevant. This transform is unneccessary just for convenient)
$=\mathrm{Res}\left\{\ln(z-\epsilon)g(z)\right\}$
when $g(z)$ is what you've mentioned. Then the problem is to evaluate this integral. We could select the branch cut as $(-\infty,\epsilon)$ and the contour $-\infty+i\delta\to\epsilon\to(small\;circle\;around\;\epsilon)\to\epsilon\to-\infty-i\delta\to(circle\;in\;infinte\;distant)$ and
$$S=\frac{1}{2\pi i}\int_C\ln(z-\epsilon)g(z)=\frac{1}{2\pi i}\int_{-\infty}^{\infty}(\ln(z^+-\epsilon)-\ln(z^--\epsilon))g(z)$$
using $g(z)=\xi\partial_z\ln(1-\xi e^{-\beta z})$ and integrate
by part
$$S=-\frac{\xi}{2\pi i}\int_{-\infty}^{\infty}\ln(1-\xi e^{-\beta\epsilon})\left(\frac{1}{z+i\delta-\epsilon}-\frac{1}{z-i\delta-\epsilon}\right)$$
and the relation $\lim_{\delta\to0}\frac{1}{x+i\delta}=\frac{1}{x}-i\pi\delta(x)$
we could get the result.
Reference: Altland,Simons Condense Matter Field Theory
A: For this kind of stuff you usually integrate by parts.

First change your sum to an integral:
$$\sum_n  \log\left(-i\omega_n +\frac{k^2}{2m}+\mu\right) \Rightarrow \int \mathrm{d}\omega \, \log(f - \mathrm{i}\omega), $$
where $f$ here is $k^2/2m+\mu$ which I am assuming are not functions of $\omega$.
Then integrate by parts:
$$\int \mathrm{d}\omega \, \underbrace{1}_{u'} \cdot\underbrace{\log(f - \mathrm{i}\omega)}_v = \underbrace{\omega}_{u}\underbrace{\log(f - \mathrm{i}\omega)}_{v}\bigg\vert_0^{\omega_{\text{max}}} - \int\mathrm{d}\omega\, \underbrace{\omega}_u\cdot\underbrace{\frac{\mathrm{-i}}{f-\mathrm{i}\omega}}_{v'}$$
$$\Rightarrow  \omega_{\text{max}}\log(f - \mathrm{i}\omega_{\text{max}})+ \int_0^{\omega_{\text{max}}} \mathrm{d}\omega\,\omega\cdot\frac{\mathrm{i}}{f-\mathrm{i}\omega}.$$
The first term is a constant energy offset. Usually it cancels out when you consider differences in energy.
A: One possible approach is writing the sum of logs as a log of product and using the formulas for infinite products in Gradshtein and Ryzhik.
