# Delta Function Representation in Statistical Mechanics Enumeration Problem

With $\rho_{0}>0$, take the power law density function $P(q)=\rho_{0}q^{-\gamma}$. If I have $${\cal N}_L=\frac{L!}{2 L} \sum_{\{n_q\}} \prod_q \frac{N_q!}{n_q! (N_q-n_q)!}\left(\frac{q^2}{Nc}\right)^{n_q}$$ which is an expression for a number of loops of length $L$, I can use a delta function representation for the condition $\sum_{q}n_{q}=L$ to obtain $${\cal N}_L=\frac{L!}{2 L} \int_{-\infty}^\infty \frac{dx}{2\pi} \exp\left(iLx+N\left\langle \log\left[1+q^2e^{-ix}/(Nc)\right]\right\rangle\right)$$ given $N \to \infty$, and where the angled brackets are the expected value over $q$. Also, there is a condition which reads $\Delta q \to 0$.

This is a common rearrangement in statistical mechanics. But I cannot see how its done, only sources of similar manipulations. Can someone give me the trick?

I think it comes down to how the condition in the sum in the first equation is written as a delta function. The second term in the exponent of the second equation then cancels the first via the complex exponential, after taking some approximation for large $N$?

See this paper, Eqs. 6 and 7.

They should have had a Kronecker $\delta$; a Dirac delta makes no sense in that context since it is a sum over $n$ and not an integral. Based on my skim on the next page, this does not seem to affect those results much.
The correct derivation is as follows. The first equation is $${\cal N}_L=\frac{L!}{2 L} \sum_{(n_q)_{q \in \mathbb{N}}} \delta(\Sigma_q n_q, L) \prod_q \frac{N_q!}{n_q! (N_q-n_q)!}\left(\frac{q^2}{Nc}\right)^{n_q}$$ where $\delta(m,n)$ is the Kronecker delta: $$\delta(m,n) = \frac{1}{2 \pi } \int_{-\pi}^{\pi} e^{ i x ( m - n) } dx$$ Putting this into the formula gives $${\cal N}_L=\frac{L!}{2 L} \frac{1}{2 \pi } \sum_{(n_q)_{q \in \mathbb{N}}} \int_{-\pi}^{\pi} e^{ i x L - \sum_q i x n_q} \prod_q \frac{N_q!}{n_q! (N_q-n_q)!}\left(\frac{q^2}{Nc}\right)^{n_q} dx \\ =\frac{L!}{2 L} \frac{1}{2 \pi } \sum_{(n_q)_{q \in \mathbb{N}}} \int_{-\pi}^{\pi} e^{ i x L} \prod_q \frac{N_q!}{n_q! (N_q-n_q)!}\left(\frac{q^2 e^{-i x}}{Nc}\right)^{n_q} dx \\ =\frac{L!}{2 L} \frac{1}{2 \pi } \int_{-\pi}^{\pi} e^{ i x L} \prod_q \left(1 - \left(\frac{q^2 e^{-i x}}{Nc}\right)\right)^{N_q} dx.$$ In the last line, I used the binomial theorem to do the sums over $(n_q)_{q \in \mathbb{N} }$. Moving on, rewriting the product over $q$ as a sum in the exponent, $$\frac{L!}{2 L} \frac{1}{2 \pi } \int_{-\pi}^{\pi} e^{ i x L} \exp \left( \sum_q \log \left(1 - \left(\frac{q^2 e^{-i x}}{Nc}\right)\right) N_q \right) dx$$ and recognizing that $$\frac{1}{N} \sum_q \log \left(1 - \left(\frac{q^2 e^{-i x}}{Nc}\right)\right) N_q = \left\langle \log \left(1 - \left(\frac{q^2 e^{-i x}}{Nc}\right)\right) \right\rangle$$ gives the final answer.
In their analysis, it looks like the saddle points are in the interval $(- \pi , \pi )$, so that the asymptotics are not affected by the incorrect bounds of the integral.