# Given the distribution of N particles in n systems, t = prod_N prod_i (n!)/(n_(N_i)!), and the following constraints, derive the grand canonical partition function and the distribution law for the grand ensemble?

Apr 7, 2017

Alright, so the first thing is to define the Lagrangian using our constraints:

ℒ = lnt + alphasum_Nsum_i n_(N_i) - betasum_Nsum_i n_(N_i)E_(N_i) + ln lambdasum_Nsum_i n_(N_i)N

For brevity and minimization of eyesores, I'll denote ${\sum}_{N} {\sum}_{i}$ as ${\sum}_{N , i}$. Hence, we have:

ℒ = lnt + alphasum_(N,i) n_(N_i) - betasum_(N,i) n_(N_i)E_(N_i) + ln lambdasum_(N,i) n_(N_i)N

The idea is that are finding the optimal distribution of systems, ${n}_{{N}_{i}}^{\text{*}}$, such that the Lagrangian is maximized. That means we have to perform the following derivative and set it equal to 0:

((delℒ)/(deln_(N_i)))_(n_(N_(j ne i))) = 0

Next, we would then need to convert the distribution expression into its $\ln$ form. The reason for this is that it is ridiculous to take the derivative of a factorial.

ln(prod_N prod_i (n!)/(n_(N_i)!))

= sum_(N,i) ln((n!)/(n_(N_i)!))

Since the sum is not over $n$, but the ${n}_{{N}_{i}}$ systems and ${N}_{i}$ particles, respectively, we can float the n! out.

=> ln(n!) - sum_(N,i) ln(n_(N_i)!)

Stirling's approximation, ln(n!) ~~ nlnn - n, is useful here. For statistical mechanics, the number of systems can get very large, so $n$ can get very large. When that is the case, to a good approximation:

$\ln t = n \ln n - n - {\sum}_{N , i} {n}_{{N}_{i}} \ln \left({n}_{{N}_{i}}\right) - {n}_{{N}_{i}}$

Now, we can take the derivative. Since the derivative is of a specific ${n}_{{N}_{i}}$ (at a constant ${n}_{{N}_{j \ne i}}$), the sums all go away, and we focus on only the ${n}_{{N}_{j}}$ where $j = i$.

((delℒ)/(deln_(N_i)))_(n_(N_(j ne i))) = -(n_(N_i)*1/(n_(N_i)) + ln(n_(N_i)) - 1) + alpha (deln_(N_i))/(deln_(N_i)) - beta(deln_(N_i)E_(N_i))/(deln_(N_i)) + ln lambda (deln_(N_i)N)/(deln_(N_i))

$= - \ln \left({n}_{{N}_{i}}\right) + \alpha - \beta {E}_{{N}_{i}} + N \ln \lambda = 0$

That was the hard part! Solving for ${n}_{{N}_{i}}^{\text{*}}$, we get:

${n}_{{N}_{i}}^{\text{*}} = {\lambda}^{N} {e}^{\alpha} {e}^{- \beta {E}_{{N}_{i}}}$

Therefore, going back to the first constraint, we have:

${\sum}_{N , i} {n}_{{N}_{i}} = n = {e}^{\alpha} {\sum}_{N , i} {\lambda}^{N} {e}^{- \beta {E}_{{N}_{i}}}$

We then define the grand canonical partition function as:

$\textcolor{b l u e}{\Xi \left(\lambda , \beta , V\right) = {\sum}_{N , i} {\lambda}^{N} {e}^{- \beta {E}_{{N}_{i}}}}$

As a result, ${e}^{\alpha} = \frac{n}{\Xi}$, and if we want to find the distribution law, we multiply by $\frac{{n}_{{N}_{i}}}{{n}_{{N}_{i}}}$ to get:

${e}^{\alpha} = \frac{n}{\Xi} \cdot \frac{{n}_{{N}_{i}}}{{n}_{{N}_{i}}}$

Therefore, the distribution law ${p}_{{N}_{i}} = {n}_{{N}_{i}} / n$ is:

$\textcolor{b l u e}{{p}_{{N}_{i}}} = {n}_{{N}_{i}} / n = \frac{{n}_{{N}_{i}}}{{e}^{\alpha} \Xi}$

$= \frac{{\lambda}^{N} \cancel{{e}^{\alpha}} {e}^{- \beta {E}_{{N}_{i}}}}{\cancel{{e}^{\alpha}} {\sum}_{N , i} {\lambda}^{N} {e}^{- \beta {E}_{{N}_{i}}}}$

$= \textcolor{b l u e}{\frac{{\lambda}^{N} {e}^{- \beta {E}_{{N}_{i}}}}{{\sum}_{N , i} {\lambda}^{N} {e}^{- \beta {E}_{{N}_{i}}}}}$