# Deriving the form of radial distribution function in molecular dynamic simulation?

I am trying to derive the equation 8.16 in the attached image from the definition of the radial distribution function. However, I am unable to derive it with proper constants of $$\frac{2}{N(N-1)}$$ My derivation is below: $$\int_{r_0 }^{r+\delta r}{\rho g(r) 4 \pi r^2 dr }= \text{average number of particles in \delta r}= $$ where $$\rho = N/V$$ is the average density and is constant. While $$g(r)$$ is radial distribution function. I am assuming that $$$$ mentioned in the image is the number of pairs of with the central atoms i.e. number of atoms in the shell forming pair with the central atom. Then from this definition and assumption $$g(r)= \frac{V}{N} \frac{}{4 \pi r^2 \delta r}$$

Which is entirely different? I am don't understand how to go for it properly. I tried to consult some books but couldn't find it. As you suggest, if $$\delta r$$ is small your first equation can be approximated by
$$\langle n(r) \rangle \approx \rho g(r) 4 \pi r^2 \delta r = \frac{N}{V} g(r) 4 \pi r^2 \delta r$$
$$g(r) = \frac{V}{N} \frac{\langle n(r) \rangle}{4 \pi r^2 \delta r}$$
Note that the book uses $$\langle n(r) \rangle$$ for the average number of pairs, wherease you (and I) use it to identify the average number of particles that are within a sphere of radius $$r$$ from any other particle. That is why you have that additional $$\frac{N - 1}{2}$$ factor.
• Sorry, my answer wasn't clear enough. In your book, $n(r)$ is defined as the number of pairs rather than the number of particles. That's why the prefactor is different. I have edited my answer to make it more clear – lr1985 Jun 29 '19 at 9:58