# Computation of Density for an Ideal Gas

I'd like to get some help deriving the following result: $$\langle \rho(\mathbf{q}) \rangle = \frac{N}{V}$$ where $$\rho(\mathbf{q}) = \sum_{i}^{N}\delta(\mathbf{q}_i-\mathbf{q})$$ and $$\mathbf{v} = v_x,v_y,v_z$$, since we are working in a $$6N$$- dimensional phase space. I tried doing this: $$\langle \rho(\mathbf{q}) \rangle = \frac{\int dq^{3N} dp^{3N} e^{-\beta H}\rho(\mathbf{q}) }{Q}$$ Now, the partition function $$Q_N$$ can be factorized as $$Q = Q_1 \cdot Q_2 \cdot...\cdot Q_N = \prod_{i}^{N} Q_i \tag{1}$$ and the Hamiltonian of the system can be rewritten as the sum of the Hamiltonians corresponding to each particle: $$\mathcal{H} = \sum_{i}^{N} H_i \tag{2}$$ Then I tried rewriting the sum as a one over the indices $$i \text{s.t. } i = j$$ and over $$i \ne j$$: $$\langle \rho(\mathbf{q}) \rangle = \frac{\int d\mathbf{q}_i d\mathbf{p}_i e^{-\beta \sum_{i = j}H_i }\delta(\mathbf{q-q}_i) \cdot \int d\mathbf{q}_{i\ne j} d\mathbf{p}_{i \ne j} e^{-\beta \sum_{i \ne j}H_i }\delta(\mathbf{q-q}_i) }{\prod_i Q_i}$$ But couldn't get anything good out of this, unfortunately. I honestly don't see how to get an $$N$$ in the numerator. Also, the denominator is equal to $$V$$, therefore the integration along the momenta must not matter in the overall picture, but, again, I can't see how we should get rid of the integral in $$d\mathbf{p}_i$$ when the hamiltonians depend directly upon them. I'd be much more than glad if somebody could either help me see if I made any crucial mistakes along the way, or tell me how to go on performing these calculations.

• I think you are making things much more complicated than needed. The integrals factor in $p$ and $q$ integrals, where the $p$ integrals in the numerator and denominator cancel (assuming $H_i$ does not depend on $q$)--perhaps it would help you to write down what $Q$ exactly is... Now the remaining position integrals give $NV^{N-1}/V^N=N/V$ (as long as $q\in V$). To see where the $NV^{N-1}$ comes from, start to write down the numerator for, say, $N=3$...it is not too hard. If I am not missing something, then all of this is correct and indeed straightforward. Oct 24, 2023 at 7:14

First let's calculate the contribution of one of the terms in the sum: $$\langle \rho \rangle_1=\frac{\int \Pi_idp_i dq_i \delta(q_1-q) e^{-\beta H_1 -\beta H_2 -...}}{Q_1^N}$$ where $$H_j\equiv H(p_j,q_j)$$ and $$Q_1=\int dp_1 dq_1 e^{-\beta H_1}$$. We find $$\langle \rho \rangle_1=\frac{\int dp_1 e^{-\beta H_1(p_1,q)}\int \Pi_{i=2}dp_i dq_i e^{-\beta H_2 -\beta H_3 -...}}{Q_1^{N}}$$ On the other hand in an ideal gas $$Q_1= V \int dp_1 e^{-\beta H_1}$$, because $$H$$ doesn't depend on $$q$$. Thus we have $$\langle \rho \rangle_1=\frac{\frac{Q_1}{V}\times Q_1^{N-1}}{Q_1^{N}}=\frac{1}{V}$$ This is the contribution of $$q_1$$ in the sum. Considering all terms in the sum, we find $$\langle \rho \rangle = N\times \frac{1}{V}= \frac{N}{V}$$