Talk:Partition function (statistical mechanics)

Notation

 * $$Z=\frac{1}{N!h^{3N}} \int_{(R^3)^n} \, \left(\int_{(R^3)^n} \, \exp[-\beta H(p_1 \cdots p_N, x_1

\cdots x_N)] \; \mathrm{d}^3p_1 \cdots \mathrm{d}^3p_N \right)\, \mathrm{d}^3x_1 \cdots \mathrm{d}^3x_N $$ I don't understand this $$d^3$$ notation. How is it supposed to be interpreted?
 * Note that $$p_i$$ and $$x_i$$ are elements of 3 dimensional space $$R^3$$. This notation serves to remind us that, in other words, it is a shorhand notation for something like $$d^3x=dx^1dx^2dx^3.$$ (Igny 17:34, 20 September 2007 (UTC))
 * Thanks. Another question if you are inclined to answer it: are each of the $$p_i$$ and $$x_i$$ scalar fields on $$\mathbb {R}^3$$ or are they each discrete vectors?User:Chrisson 16:03, 23 September 2007 (UTC)
 * Technically they are not fields. both $$p_i$$(momentum) and $$x_i$$(position) are 3 dimensional vectors for all i. The Hamiltonian basically determines the likelihood of the particles to have given momentums and positions, the likelihoods are proportional to
 * $$\exp[-\beta H(p_1 \cdots p_N, x_1\cdots x_N)]$$
 * When divided by the normalizing factor (the partition function) it gives the distribution of $$p_i$$ and $$x_i$$ over all possible values of the momentums/ positions.(Igny 16:31, 23 September 2007 (UTC))
 * So are they vector fields then?ChrisChiasson 17:04, 23 September 2007 (UTC)
 * Or, wait, you are saying they are plain vectors (which would only be functions of, say, time)? —Preceding unsigned comment added by ChrisChiasson (talk
 * That's right, they're vectors, not vector fields. The position of a particle, or its momentum, is a vector, not a vector field.  John Baez (talk) 00:32, 22 October 2010 (UTC)

• contribs) 17:06, 23 September 2007 (UTC) They are not functions of anything they are just dummy 3-D variables, indicating a possible state of the system, over which you integrate. The Hamiltonian may be a function of time and the state ($$t,x_i,p_i$$), thus resulting in the partitition function as well as the position/momentum distribution changing with time. (Igny 17:45, 23 September 2007 (UTC))
 * This may be a stupid question, but why would someone integrate on a domain like $$d^3 p_1$$ that is, essentially, a point?ChrisChiasson 04:24, 24 September 2007 (UTC)
 * We integrate the likelihood of the state over all possible states, see my edit of the integral above.(Igny 05:25, 24 September 2007 (UTC))

Why does the notation shift from e^ in the canonical ensemble section to exp in the grand canonical ensemble section? (Anonymous 8:17, 16 April 2014 (UTC)) — Preceding unsigned comment added by 173.189.130.143 (talk)

The first Z appearing needs to be shown as Z(T) or whatever. We need to know what it's a function of. I suspect these derivations have been blindly copied from an undergraduate text without any real knowledge.210.185.74.133 (talk) 01:09, 9 March 2016 (UTC)

For the canonical ensemble partition function: Q versus Z
For the canonical ensemble, should Q be used in place of Z? Z is actually a special case (the momentum component is factored out) often called the configuration integral. Ref "Understanding Molecular Simulation" 2nd Ed. Frenkel and Smit


 * No. There is no standard notation, so this change is not necessary. -- CYD

i think d/dbeta of minus average energy gives the average squared energy.

so the second derivative wrt beta of ln Z gives the second moment of energy, not the second central moment as indicated

A good book
I suggest a good book to read. Fedrick Beif's Statistical and Thermal Physics. Of course-by the way can someone discuss your comment about it between other authors' books.--GyBlop 10:50, 28 February 2006 (UTC)

I think that's Frederick Reif (or at least that's how it's spelled in my edition). Flutefreek 05:44, 2 November 2006 (UTC)

Sum and Integral
Hello..something is fuzzy in the article for example if we have a certain system with a Hamiltonian H and energies $$ E_n $$ my question is..what partition function should we use?..

-The expression given by the Sum $$ Z_1 (\beta)=\sum_{n} g(n)e^{-\beta E_n} $$

-Or the expression given by the Integral $$ Z_2 (\beta)=\int_{-\infty}^{\infty}dp\int_{-\infty}^{\infty}dq e^{-\beta H(q,p)} $$

But clearly Z1 and Z2 are different, the problem is how can you calculate the Partition function if you don,t know the energies of the system (Hamiltonian too much difficult to solve) and if approximately $$ Z_1 \sim Z_2 $$


 * $$E_n$$ is energy of a certain state (indexed by n under assumption that number of states is countable). In the case of the integral, the state of the system is determined by p and q, and there is a continuum of possible states. In both cases the meaning of the partition function stays the same. There is however a disagreement in using the degeneracy factor, it is used in the definition but nowhere else, I think I ll try to rephrase the article now.(Igny 17:23, 18 July 2006 (UTC))


 * Those two are used in different contexts, shouldn't be confused. Z1 is the quantum mechanical partition function. The summation is over number of distinct energy eigenvalues. It is, assuming some technical conditions hold, the trace of exp(-β H), where H is the quantum mechanical Hamiltonian. If you sum over energy eigenvalues including multiplicity, then the degeneracy g(n) would be removed from the expression. On the other hand, Z2 describes the classical canonical ensemble, therefore is a normalization factor for a probability measure on the phase space. Mct mht 21:32, 18 July 2006 (UTC)

Error in article
BTW, there is an error in the article. The so called "coarse graining" refers to semiclassical treatment of quantum mechanical ensembles, not classical systems. For classical systems, the factor 1/h3N shouldn't be there. Mct mht 02:33, 19 July 2006 (UTC)

I fixed the mistake about "coarse graining" and explained the factor of 1/h3N. John Baez (talk) 00:50, 22 October 2010 (UTC)

Calculating the thermodynamic total energy
In the Calculating the thermodynamic total energy section shouldn't it say "and then set &lambda; to one," rather than "and then set &lambda; to zero"? If I follow the argument correctly, it is essentially an application of perturbation theory, in which you expand the change in the Hamiltonian (A in this case) in small &lambda; and then set &lambda; to one at the end, not to zero, because this would cancel out the perturbative terms. --zipz0p 20:05, 11 October 2006 (UTC) yes you're right I believe. Also to the comment above about not needing to renormalize by h you still do in order to get the right units (well and also to get the right answer for the partition function!). —Preceding unsigned comment added by 99.246.56.142 (talk) 03:55, 25 October 2007 (UTC)

Derivation of :
Maybe it would be noteworthy for the beginners that the third transformation ("\frac{1}{Z}\sum_j E_j e^{\beta E_j} = -\frac{1}{Z}\frac\{\partial}{\partial\beta}Z(\beta, E_1, E_2,\ldots)" ) comes from differentiating Z being a function of \beta over \beta, and the next transformation comes from differentiating the \ln function

Just wondering whether it would useful for beginners... —Preceding unsigned comment added by W2023 (talk • contribs) 17:31, 10 March 2008 (UTC)

I feel the derivation of  can be improved upon. I don't understand how one gets to the partial derivative from the summation. Even after reading above comment by W2023 I don't get it. I wouldn't describe this step as trivial. 145.97.204.49 (talk) 09:48, 30 September 2014 (UTC)

mergefrom Configuration integral
It appears that Vu-Quoc, L., who wrote the article Configuration integral, seems to have also created an article here on wikipedia, called configuration integral, which is essentially just another name for the partition function. I suggest that that article be merely made into a re-direct to this article. (or possibly to partition function (mathematics) as that provides the general concept.) linas (talk) 21:23, 28 August 2008 (UTC)

Yes, "Configuration integral" should be made into a redirect for "partition function". They're the same concept, and the term partition function is vastly more common. I'd do it now but I don't know how. John Baez (talk) 00:34, 22 October 2010 (UTC)


 * Configuration integral now redirects to Partition function, but people who click on that link (from articles Ideal gas law, Ligand, Particle in a box, Receptor, or Statistical mechanics) will not find an explanation why they were redirected here; the term does occur in this article, but only tucked away several screenfuls down from the start in the last sentence of a long section, unexplained and with a meaning not apparent from the context. --Lambiam 13:17, 9 March 2011 (UTC)

The denominator of a probability
I think the essential intuitive description of partition function is missing from the article, as the denominator of a probability.

Bayes' Theorem: :$$P(A_i|B) = \frac{P(B | A_i)\, P(A_i)}{P(B)}  = \frac{P(B | A_i)\, P(A_i)}{\sum\limits_j P(B|A_j)\,P(A_j)}  \!$$.

I think there should be cross-links with Bayes' theorem and the Law of Total Probability. — Preceding unsigned comment added by JDoolin (talk • contribs) 13:37, 26 April 2011 (UTC)

Maxwell-Boltzmann formula
Isn't this formula incorrect (the rightmost expression with exp(exp ...)?

For the case of a Maxwell-Boltzmann gas, we must use "correct Boltzmann counting" and divide the Boltzmann factor $$e^{-\beta (\epsilon_i-\mu)}$$ by ni!.

\mathcal{Z}_i = \sum_{n_i=0}^\infty \frac{e^{-\beta n_i(\epsilon_i-\mu)}}{n_i!} = \exp\left( e^{-\beta (\epsilon_i-\mu)}\right) $$ . Bj norge (talk) 14:04, 6 July 2011 (UTC)

Error in Grand Canonical Ensemble
The article currently states that the summations over $$n_i$$ in the grand canonical ensemble are restricted "so that the sum of all $$n_i$$ = N". This is not true. This restriction only occurs in the canonical ensemble where the is no chemical potential. The point of the grand canonical ensemble is that the summations run over all possible values of $$n_i$$, even ones that do not add up to N, making the summations far easier to do. The constraint that the sum of all $$n_i$$ is equal to N is resolved later by choosing the appropriate value of the chemical potential.

For example with Boltzmann statistics,

$$ \sum_i n_i = \sum_i e^{-\beta \epsilon_i + \beta \mu} = N $$, so the appropriate choice is $$ \mu = \frac{1}{\beta} \log(N) - \frac{1}{\beta} \log(\sum_i e^{-\beta \epsilon_i}) $$. 23:26, 3 November 2011 (UTC)

Meaning / Significance Section
I thought the Meaning and Significance section was very well done. However, I ran across this line that I'm not sure if it's true or not: "Hence if all states are equally probable (equal energies) the partition function is the total number of possible states." Is this true? I'm having trouble imagining the math working out in this way. Doogleface (talk) 22:42, 6 October 2012 (UTC)
 * Not really. If the energy levels are all equal to E then the partition function simply comes out to be $$Ne^{-\beta E}$$ where N is the number of possible states. The last two sentences appear to be wrong. I'll replace them with the statement that the PF is useful for deriving macroscopic thermodynamic quantities by looking at the microscopic details of a system. -Anagogist (talk) 15:40, 10 March 2014 (UTC)

Clean up, consistent typesetting
In attempt for such, I removed an unnecessary amount of  (no break spaces) which cluttered the code horrendously, and visibly created spaces larger than needed, especially out of style with the rest of the article where normal spaces were used - There was no reason for them. There was (as ever...) trivial LaTeX inline, which I converted to HTML (with the exception of the x and p operators including hats). There were also en-dashes for minus signs... M&and;Ŝc2ħεИτlk 21:12, 22 April 2013 (UTC)

Errors in definition of the partition function (section 1.1)
, see updates below.

I think the subsection "Quantum mechanical continuous system" under section "1.1 Definition" gives a wrong definition of the partition function.

This section claims:

This cannot be correct as the canonical commutation relations prohibit the existence of states $$ | q,p \rangle $$ that are simultaneous eigenstates of position and momentum.

I suspect that this incorrect definition may be based on a misunderstand of an older, correct section further down in the article, which explains how to recover the classical partition function from the quantum partition function in the classical limit (starting with "The classical form of Z is recovered [...]").

The wrong claim first appears in the edit "22:32, 24 March 2015‎ 142.157.65.107", as far as I see. This edit also introduces further, smaller, problems into the article. For example:


 * The partition function for a classical continuous system contains a factor $$ 1/h^3 $$. The appearance of this factor related to quantum physics is not explained. It would be much preferable to use a more generic notion of "density of states" here, I think, to keep the classical description self-contained.


 * Both continuous versions (classical and quantum) are apparently formulated for the particular case of a single particle — in three- (one-)dimensional space in the classical (quantum) case.


 * The symbol $$ E_s $$ is used in pre-existing text further down in the article, but after the said edit this symbol is no longer defined.

I think it would be preferable to completely revert edit (22:32, 24 March 2015‎ 142.157.65.107). However, there have been several edits since and I am not confident about how to handle this situation.

ESteiner (talk) 15:50, 16 November 2016 (UTC)

Update 2016-11-19:

I selectively reverted the problematic edit (22:32, 24 March 2015‎ 142.157.65.107 ) which had introduced the incorrect definition of the quantum partition function (using the forbidden states $$|q,p \rangle$$).

I restored the Derivation section as it was before (22:32, 24 March 2015‎ 142.157.65.107). I did not use the new version of the derivation (that had been moved), as it contained a surprising introduction of the Lagrangian function that was not explained. The older version using the entropy function throughout seems more consistent. I will look into bringing back positive changes to the derivation since (22:32, 24 March 2015‎ 142.157.65.107) and positive aspects of this edit back in future revisions. ESteiner (talk) 15:11, 19 November 2016 (UTC)

Update 2016-11-20:

The formula I quoted above can be correct if interpreted in terms of coherent states. If so, (22:32, 24 March 2015‎ 142.157.65.107) may be correct, though not well explained. I undid my own edits in doubt. Need to do more reading on this. ESteiner (talk) 15:59, 20 November 2016 (UTC)

Clean up, formula does not parse
There is an error in the code of the fifth formula under the derivation of the canonical. partition function. 82.174.47.98 (talk) 11:21, 17 June 2022 (UTC)

General audience encyclopedia? plain english why Probabilistic approach applies = law of large numbers (~10^24 microstates)
This topic, arguably almost certainly most typically searched for and read by students in STEM (I happen to *not* be that, and when I was this article did not exist or was rudimentary by comparison). In most of the accredited research university undergraduate curricula I have seen, the statistical probabilistic approach is used (because it is mathematically the simplest, requiring by far the lowest level of advanced mathematics to derive). This would, for example, accross the board apply to Chemistry, Biochemistry, variuos engineering disciplines, etc. VERY EARLY in this derivation the student is reminded that the scale of the problem... the number of microstate occupations, coin flips, etc. is on the order of Avogadro's number, and given this fact various approximations hold (eg Stirling's approximation), and this is also why the expectation values of the various thermodynamic state functions can be mathematically guessed from these equations (because the probability distribution is so sharply peaked as to be a near delta function by an ensemble with on the order of 10^24 microstates). I mention this because this is also arguably the most readily understood conceptual connection that the average person *might* be able to understand.... 67.165.122.133 (talk) 09:34, 15 December 2023 (UTC)