Cross-posted from the PhysicsSE.
I am reading Theory of Simple Liquids by Hansen and McDonald, and they in chapter 3, they describe the density-density correlation for a simple liquid in the grand canonical ensemble. This is how they have defined it: $$H^{(2)}(r,r') = \langle [\rho (r) - \langle \rho (r) \rangle ][ \rho (r') - \langle \rho (r') \rangle ]\rangle \tag{1}$$ $$ = \rho ^{(2)}(r,r') - \rho ^{(1)}(r)\rho ^{(1)}(r') + \rho ^{(1)}(r) \delta (r-r').\tag{2}$$ This is my understanding of where the terms in the RHS comes from. I understand that the two-particle density $\rho^{(2)}$ term arises from: $$\langle \rho (r) \rho (r') \rangle\tag{3}$$ in the RHS.
The second term in the RHS comes from expanding the the product and taking like terms together.
$$-\rho ^{(1)}(r)\rho ^{(1)}(r') = -\langle \rho(r) \langle \rho (r') \rangle \rangle - \langle \rho(r') \langle \rho (r) \rangle \rangle + \rho ^{(1)}(r) \rho ^{(1)}(r'),\tag{4}$$ where $\rho^{(1)}(r)$ is the average single-particle density at $r$, for a homogeneous liquid.
But I still do not get why that $\delta$-function exists there. Is the $\delta$-function just there to say that if the two particles are in the same spot ($r=r'$), the density correlation is... maximized? How does the $\delta$ fall out of the averaging, mathematically?
I would appreciate any advice you have for me!