# Calculating the derivative of the average number of particles by the chemical potential

This should be a trivial calculation but somehow I have managed to get myself confused about this.

The grand partition function is:

$\mathcal Z = \sum_{N=1}^\infty \sum_{r(N)} {\text e}^{-\beta E_r +\beta N \mu}$

And the average number of particles:

$\left \langle N \right \rangle = \frac{1}{\mathcal Z} \sum_{N} \sum_{r(N)} N{\text e}^{-\beta E_r + \beta N \mu } = \frac{1}{\beta} \frac{\partial}{\partial \mu} \ln \mathcal Z$

How can I take the derivative of that by the chemical potential? I thought about taking the inverse of the derivative of the chemical potential by the number of particles by I suspect that I'll be in the same position.

-
$\frac{1}{\beta}\frac{\partial^2}{\partial\mu^2} \ln \mathcal Z$? –  dbrane May 24 '11 at 14:32
Now try and actually calculate that derivative, I couldn't convince myself it is not 0 –  Yotam May 24 '11 at 19:51
$\langle N \rangle$ is some analytical function of the parameters of the ensemble, in this case $\beta$ and $\mu$; only if $\langle N \rangle$ didn't depend on $\mu$, the derivative would be zero. –  Gerben May 24 '11 at 21:15
You should've mentioned in your question that you wanted to show that it is not zero. See my answer below. –  dbrane May 24 '11 at 21:42

We want to find $$\frac{\partial\langle N\rangle}{\partial\mu}=\frac{1}{\beta} \frac{\partial^2}{\partial \mu^2} \ln \mathcal Z=(\frac{\mathcal Z'}{\beta \mathcal Z})'=(\frac{-\mathcal Z'^2}{\beta \mathcal Z^2}+\frac{\mathcal Z''}{\beta \mathcal Z})$$ where the prime denotes differentiation w.r.t. $\mu$. In order for this to be zero we must have $$\mathcal Z\mathcal Z''=\mathcal Z'^2$$ which written out in full is $$\sum_{NN'rr'}{\text e}^{-\beta (E_r+E_{r'}) +\beta (N+N') \mu}\beta^2N^2=\sum_{NN'rr'}{\text e}^{-\beta (E_r+E_{r'}) +\beta (N+N') \mu}\beta^2NN'$$ where the summation on both sides is now over $N'$ and $r'$ as well. This requires $N=N'$, which clearly doesn't hold always - this is the same as saying that the square of a sum is not equal to the sum of squares. Therefore, $\frac{\partial\langle N\rangle}{\partial\mu}$ is not zero at finite temperature. You would expect this since $\frac{\partial\langle N\rangle}{\partial\mu}$ is proportional to the variance of the number of particles $\langle (\delta N)^2 \rangle$.