Problems met in Matsubara frequency sum I would like to calculate $\sum\limits_{\omega_{n},\vec{k}}(\ln(-i\omega_{n}+\xi_{\vec{k}})+\ln(-i\omega_{n}-\xi_{\vec{k}}))$, where $\omega_{n}=\frac{(2n+1)\pi}{\beta}$ and $n=0,\pm1,\pm2,\dots$
Using the fact $\sum\limits_{\omega_{n},\vec{k}}\ln(-i\omega_{n}+\xi_{\vec{k}})=\sum\limits_{\vec{k}}\ln(1+\text{e}^{-\beta\xi_{\vec{k}}})\tag{1}$
Method 1:
$$
\sum\limits_{\omega_{n},\vec{k}}\ln(-i\omega_{n}-\xi_{\vec{k}})=\sum\limits_{\omega_{n},\vec{k}}\ln(-i\omega_{n}+(-\xi_{\vec{k}}))=\sum\limits_{\vec{k}}\ln(1+\text{e}^{\beta\xi_{\vec{k}}})
$$
Therefore
$$
\begin{align*}
&\sum\limits_{\omega_{n},\vec{k}}[\ln(-i\omega_{n}+\xi_{\vec{k}})+\ln(-i\omega_{n}-\xi_{\vec{k}})]
\\
&=\sum\limits_{\vec{k}}[\ln(1+\text{e}^{-\beta\xi_{\vec{k}}})+\ln(1+\text{e}^{\beta\xi_{\vec{k}}})]
\\
&=\sum\limits_{\vec{k}}[2\ln(1+\text{e}^{-\beta\xi_{\vec{k}}})+\beta\xi_{\vec{k}}]\tag{2}
\end{align*}
$$
Method 2:
For $\forall\omega_{n}$,  $\exists p$, so that $\omega_{p}=-\omega_{n}$; then
$$
\sum\limits_{\omega_{n},\vec{k}}\ln(-i\omega_{n}-\xi_{\vec{k}})=\sum\limits_{\omega_{p},\vec{k}}\ln(i\omega_{p}-\xi_{\vec{k}})=\sum\limits_{\omega_{p},\vec{k}}\ln[-(-i\omega_{p}+\xi_{\vec{k}})]
$$
It seems that the branch-cut has been assumed to be positive real axis in obtaining (1) (I am not sure). Thus we have
$$\ln[-(-i\omega_{p}+\xi_{\vec{k}})]=\ln[(-i\omega_{p}+\xi_{\vec{k}})]+\ln(-1)\tag{3}$$
Since there's no pole point of $f[z]=\ln{(-1)}$, the part $\ln{(-1)}$ do not contribute to matsubara frequency. Thus following (3), $$\sum\limits_{\omega_{n},\vec{k}}\ln[-(-i\omega_{p}+\xi_{\vec{k}})]=\sum\limits_{\omega_{p},\vec{k}}\ln[-i\omega_{p}+\xi_{\vec{k}}]$$
and
$$\sum\limits_{\omega_{n},\vec{k}}(\ln(-i\omega_{n}+\xi_{\vec{k}})+\ln(-i\omega_{n}-\xi_{\vec{k}}))=\sum\limits_{\vec{k}}2\ln(1+\text{e}^{-\beta\xi_{\vec{k}}})\tag{4}$$
Clearly (2) and (4) contradict, could anyone kindly help?
 A: As @Zhengyuan_Yue the method explained in a previous answer can be applied here too in the fermionic case. Your problem stems from the fact that you are formally manipulating divergent sums, so it’s hardly surprising you get contradicting results.
Equivalently, instead of looking at the free energy you can look at the partition function. Like this, you needn’t specify the branch you choose for each term and the calculations are easier. You want to calculate:
$$
Z^{-1}=\prod (i\omega_n+\xi_k)(i\omega_n-\xi_k)
$$
The natural regularization that emerges from the derivation of the PI is to subdivide the $[0,\beta]$ interval into $N$ pieces, while preserving the antisymmetry for the fermions. Concretely, $Z$ has only $N$ factors and replace for $n\in[|1,N|]$:
$$
\omega_n=\frac{\pi(2n+1)}{\beta} \to \frac{N}{\beta}(\zeta^{2n+1}-1) \\
\zeta=e^{i\pi/N}
$$
In your case, each $k$ is independent, so I’ll only do it for one $\xi$.
After regularization, the partition function becomes (up to $\xi$ independent factor)
$$
Z^{-1}\propto\prod_{n=1}^N \left(\zeta^{2n+1}-1+\frac{\beta\xi}{N}\right)\left(\zeta^{2n+1}-1-\frac{\beta\xi}{N}\right)
$$
Recognizing the factorization:
$$
\prod_{n=1}^N (X-\zeta^{2n+1})=X^N+1
$$
you get:
$$
\begin{align}
Z^{-1}&\propto \left(1+\left(1-\frac{\beta\xi}{N}\right)^N\right)\left(1+\left(1+\frac{\beta\xi}{N}\right)^N\right) \\
&\to \left(1+e^{-\beta\xi}\right)\left(1+e^{\beta\xi}\right) \\
&= \left(1+e^{-\beta\xi}\right)^2e^{\beta \xi}
\end{align}
$$
Now you can take the log and get your free energy and do only one branch choice. It turns out your first method gives the correct result. Your second method misses out on the zero point energy because it is a non cancelling factor that formal rearranging cannot detect.
Hope this helps.
Answer to comment
In order to obtain the continuous PI:
$$
Z=\int DbD\bar b e^{-S} \\
S=\int_0^\tau d\tau \left(\bar b\partial_\tau b+H\right)
$$
you usually start with $e^{-\beta H}$ that you factor in $N$ parts sandwich  resolutions of identity. You thus obtain this path integral (using periodic indices):
$$
Z_N=\int d^Nbd^N\bar b e^{-S} \\
S_N=\sum_{n=1}^N \frac{\beta}{N}\left(\bar b_n\frac{N}{\beta}(b_{n+1}-b_n)+H\right)
$$
and the continuum model is defined by the $N\to\infty$ limit.
In order to make the link with the Matsubara frequencies, you just need to do a discrete Fourier transform. This is how the $N$th roots of unity arise. Since the transformation is unitary, there is no change in the integration measure, and you just need to do the change of variables in the action.
You still have the equivalent of Parseval’s theorem in the discrete case and using the fact that the shift is obtained by multiplying by the first root of unity, you get:
$$
S_N=\sum_{n=1}^N \frac{\beta}{N}\left(\overline {\tilde b_n}\frac{N}{\beta}(e^{i2\pi n/N}-1)\tilde b_n +H\right)
$$
hence the regularization $n\in[|1,N|]$ with:
$$
\omega_n\to \frac{N}{\beta}(e^{i2\pi n/N}-1)
$$
This was the case of bosons. The fermions are obtained the same way by offsetting the phase by $\pi/N$ to implement the antisymmetry. You thus obtain the second equation at the very beginning.
This has also a nice geometrical interpretation in the complex plane as you are essentially approximating a line by successively larger circles.
A: A typical approach is to use:
$$
\sum_n\left[\log(-i\omega_n+\xi_k)+\log(i\omega_n+\xi_k)\right]=
\sum_n\log(\xi_k^2+\omega_n^2) = \log\left[\prod_n(\xi_k^2+\omega_n^2)\right],
$$
which, once the expressions for Matsubara frequencies are plugged in, becomes the log of an infinite product expressible in terms of a sign or cosine (for bosons and fermions), the expression for which can be found in Gradshtein&Ryzhik.
