# 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?

##### 1 Answer

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

#ℒ = 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,

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

Next, we would then need to convert the distribution expression into its

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

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

Since the sum is not over

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

**Stirling's approximation**,

#lnt = nlnn - n - sum_(N,i) n_(N_i)ln(n_(N_i)) - n_(N_i)#

*Now*, we can take the derivative. Since the derivative is of a specific

#((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(n_(N_i)) + alpha - betaE_(N_i) + Nln lambda = 0#

That was the hard part! Solving for

#n_(N_i)^"*" = lambda^N e^(alpha)e^(-betaE_(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^(-betaE_(N_i))#

We then define the **grand canonical partition function** as:

#color(blue)(Xi(lambda,beta,V) = sum_(N,i) lambda^N e^(-betaE_(N_i)))#

As a result,

#e^alpha = n/Xi * (n_(N_i))/(n_(N_i))#

Therefore, the distribution law

#color(blue)(p_(N_i)) = n_(N_i)/n = (n_(N_i))/(e^(alpha)Xi)#

#= (lambda^N cancel(e^(alpha))e^(-betaE_(N_i)))/(cancel(e^(alpha))sum_(N,i)lambda^N e^(-betaE_(N_i)))#

#= color(blue)((lambda^Ne^(-betaE_(N_i)))/(sum_(N,i)lambda^N e^(-betaE_(N_i))))#