Search This Blog

Thursday, September 1, 2022

Partition function (statistical mechanics)

In physics, a partition function describes the statistical properties of a system in thermodynamic equilibrium. Partition functions are functions of the thermodynamic state variables, such as the temperature and volume. Most of the aggregate thermodynamic variables of the system, such as the total energy, free energy, entropy, and pressure, can be expressed in terms of the partition function or its derivatives. The partition function is dimensionless.

Each partition function is constructed to represent a particular statistical ensemble (which, in turn, corresponds to a particular free energy). The most common statistical ensembles have named partition functions. The canonical partition function applies to a canonical ensemble, in which the system is allowed to exchange heat with the environment at fixed temperature, volume, and number of particles. The grand canonical partition function applies to a grand canonical ensemble, in which the system can exchange both heat and particles with the environment, at fixed temperature, volume, and chemical potential. Other types of partition functions can be defined for different circumstances; see partition function (mathematics) for generalizations. The partition function has many physical meanings, as discussed in Meaning and significance.

Canonical partition function

Definition

Initially, let us assume that a thermodynamically large system is in thermal contact with the environment, with a temperature T, and both the volume of the system and the number of constituent particles are fixed. A collection of this kind of system comprises an ensemble called a canonical ensemble. The appropriate mathematical expression for the canonical partition function depends on the degrees of freedom of the system, whether the context is classical mechanics or quantum mechanics, and whether the spectrum of states is discrete or continuous.

Classical discrete system

For a canonical ensemble that is classical and discrete, the canonical partition function is defined as

where

  • is the index for the microstates of the system;
  • is Euler's number;
  • is the thermodynamic beta, defined as ;
  • is the total energy of the system in the respective microstate.

The exponential factor is otherwise known as the Boltzmann factor.

Derivation of canonical partition function (classical, discrete)

There are multiple approaches to deriving the partition function. The following derivation follows the more powerful and general information-theoretic Jaynesian maximum entropy approach.

According to the second law of thermodynamics, a system assumes a configuration of maximum entropy at thermodynamic equilibrium. We seek a probability distribution of states that maximizes the discrete Gibbs entropy

subject to two physical constraints:

  1. The probabilities of all states add to unity (second axiom of probability):
  2. In the canonical ensemble, the average energy is fixed (conservation of energy):

Applying variational calculus with constraints (analogous in some sense to the method of Lagrange multipliers), we write the Lagrangian (or Lagrange function) as

Varying and extremizing with respect to leads to

Since this equation should hold for any variation , it implies that

Isolating for yields

To obtain , one substitutes the probability into the first constraint:

where is a constant number defined as the canonical ensemble partition function:

Isolating for yields .

Rewriting in terms of gives

Rewriting in terms of gives

To obtain , we differentiate with respect to the average energy and apply the first law of thermodynamics, :

Thus the canonical partition function becomes

where is defined as the thermodynamic beta. Finally, the probability distribution and entropy are respectively

Classical continuous system

In classical mechanics, the position and momentum variables of a particle can vary continuously, so the set of microstates is actually uncountable. In classical statistical mechanics, it is rather inaccurate to express the partition function as a sum of discrete terms. In this case we must describe the partition function using an integral rather than a sum. For a canonical ensemble that is classical and continuous, the canonical partition function is defined as

where

To make it into a dimensionless quantity, we must divide it by h, which is some quantity with units of action (usually taken to be Planck's constant).

Classical continuous system (multiple identical particles)

For a gas of identical classical particles in three dimensions, the partition function is

where

  • is the Planck constant;
  • is the thermodynamic beta, defined as ;
  • is the index for the particles of the system;
  • is the Hamiltonian of a respective particle;
  • is the canonical position of the respective particle;
  • is the canonical momentum of the respective particle;
  • is shorthand notation to indicate that and are vectors in three-dimensional space.

The reason for the factorial factor N! is discussed below. The extra constant factor introduced in the denominator was introduced because, unlike the discrete form, the continuous form shown above is not dimensionless. As stated in the previous section, to make it into a dimensionless quantity, we must divide it by h3N (where h is usually taken to be Planck's constant).

Quantum mechanical discrete system

For a canonical ensemble that is quantum mechanical and discrete, the canonical partition function is defined as the trace of the Boltzmann factor:

where:

  • is the trace of a matrix;
  • is the thermodynamic beta, defined as ;
  • is the Hamiltonian operator.

The dimension of is the number of energy eigenstates of the system.

Quantum mechanical continuous system

For a canonical ensemble that is quantum mechanical and continuous, the canonical partition function is defined as

where:

In systems with multiple quantum states s sharing the same energy Es, it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by j) as follows:

where gj is the degeneracy factor, or number of quantum states s that have the same energy level defined by Ej = Es.

The above treatment applies to quantum statistical mechanics, where a physical system inside a finite-sized box will typically have a discrete set of energy eigenstates, which we can use as the states s above. In quantum mechanics, the partition function can be more formally written as a trace over the state space (which is independent of the choice of basis):

where Ĥ is the quantum Hamiltonian operator. The exponential of an operator can be defined using the exponential power series.

The classical form of Z is recovered when the trace is expressed in terms of coherent states[1] and when quantum-mechanical uncertainties in the position and momentum of a particle are regarded as negligible. Formally, using bra–ket notation, one inserts under the trace for each degree of freedom the identity:

where |x, p is a normalised Gaussian wavepacket centered at position x and momentum p. Thus
A coherent state is an approximate eigenstate of both operators and , hence also of the Hamiltonian Ĥ, with errors of the size of the uncertainties. If Δx and Δp can be regarded as zero, the action of Ĥ reduces to multiplication by the classical Hamiltonian, and Z reduces to the classical configuration integral.

Connection to probability theory

For simplicity, we will use the discrete form of the partition function in this section. Our results will apply equally well to the continuous form.

Consider a system S embedded into a heat bath B. Let the total energy of both systems be E. Let pi denote the probability that the system S is in a particular microstate, i, with energy Ei. According to the fundamental postulate of statistical mechanics (which states that all attainable microstates of a system are equally probable), the probability pi will be inversely proportional to the number of microstates of the total closed system (S, B) in which S is in microstate i with energy Ei. Equivalently, pi will be proportional to the number of microstates of the heat bath B with energy EEi:

Assuming that the heat bath's internal energy is much larger than the energy of S (EEi), we can Taylor-expand to first order in Ei and use the thermodynamic relation , where here , are the entropy and temperature of the bath respectively:

Thus

Since the total probability to find the system in some microstate (the sum of all pi) must be equal to 1, we know that the constant of proportionality must be the normalization constant, and so, we can define the partition function to be this constant:

Calculating the thermodynamic total energy

In order to demonstrate the usefulness of the partition function, let us calculate the thermodynamic value of the total energy. This is simply the expected value, or ensemble average for the energy, which is the sum of the microstate energies weighted by their probabilities:

or, equivalently,

Incidentally, one should note that if the microstate energies depend on a parameter λ in the manner

then the expected value of A is

This provides us with a method for calculating the expected values of many microscopic quantities. We add the quantity artificially to the microstate energies (or, in the language of quantum mechanics, to the Hamiltonian), calculate the new partition function and expected value, and then set λ to zero in the final expression. This is analogous to the source field method used in the path integral formulation of quantum field theory.

Relation to thermodynamic variables

In this section, we will state the relationships between the partition function and the various thermodynamic parameters of the system. These results can be derived using the method of the previous section and the various thermodynamic relations.

As we have already seen, the thermodynamic energy is

The variance in the energy (or "energy fluctuation") is

The heat capacity is

In general, consider the extensive variable X and intensive variable Y where X and Y form a pair of conjugate variables. In ensembles where Y is fixed (and X is allowed to fluctuate), then the average value of X will be:

The sign will depend on the specific definitions of the variables X and Y. An example would be X = volume and Y = pressure. Additionally, the variance in X will be

In the special case of entropy, entropy is given by

where A is the Helmholtz free energy defined as A = UTS, where U = ⟨E is the total energy and S is the entropy, so that

Furthermore, the heat capacity can be expressed as

Partition functions of subsystems

Suppose a system is subdivided into N sub-systems with negligible interaction energy, that is, we can assume the particles are essentially non-interacting. If the partition functions of the sub-systems are ζ1, ζ2, ..., ζN, then the partition function of the entire system is the product of the individual partition functions:

If the sub-systems have the same physical properties, then their partition functions are equal, ζ1 = ζ2 = ... = ζ, in which case

However, there is a well-known exception to this rule. If the sub-systems are actually identical particles, in the quantum mechanical sense that they are impossible to distinguish even in principle, the total partition function must be divided by a N! (N factorial):

This is to ensure that we do not "over-count" the number of microstates. While this may seem like a strange requirement, it is actually necessary to preserve the existence of a thermodynamic limit for such systems. This is known as the Gibbs paradox.

Meaning and significance

It may not be obvious why the partition function, as we have defined it above, is an important quantity. First, consider what goes into it. The partition function is a function of the temperature T and the microstate energies E1, E2, E3, etc. The microstate energies are determined by other thermodynamic variables, such as the number of particles and the volume, as well as microscopic quantities like the mass of the constituent particles. This dependence on microscopic variables is the central point of statistical mechanics. With a model of the microscopic constituents of a system, one can calculate the microstate energies, and thus the partition function, which will then allow us to calculate all the other thermodynamic properties of the system.

The partition function can be related to thermodynamic properties because it has a very important statistical meaning. The probability Ps that the system occupies microstate s is

Thus, as shown above, the partition function plays the role of a normalizing constant (note that it does not depend on s), ensuring that the probabilities sum up to one:

This is the reason for calling Z the "partition function": it encodes how the probabilities are partitioned among the different microstates, based on their individual energies. The letter Z stands for the German word Zustandssumme, "sum over states". The usefulness of the partition function stems from the fact that it can be used to relate macroscopic thermodynamic quantities to the microscopic details of a system through the derivatives of its partition function. Finding the partition function is also equivalent to performing a Laplace transform of the density of states function from the energy domain to the β domain, and the inverse Laplace transform of the partition function reclaims the state density function of energies.

Grand canonical partition function

We can define a grand canonical partition function for a grand canonical ensemble, which describes the statistics of a constant-volume system that can exchange both heat and particles with a reservoir. The reservoir has a constant temperature T, and a chemical potential μ.

The grand canonical partition function, denoted by , is the following sum over microstates

Here, each microstate is labelled by , and has total particle number and total energy . This partition function is closely related to the grand potential, , by the relation

This can be contrasted to the canonical partition function above, which is related instead to the Helmholtz free energy.

It is important to note that the number of microstates in the grand canonical ensemble may be much larger than in the canonical ensemble, since here we consider not only variations in energy but also in particle number. Again, the utility of the grand canonical partition function is that it is related to the probability that the system is in state :

An important application of the grand canonical ensemble is in deriving exactly the statistics of a non-interacting many-body quantum gas (Fermi–Dirac statistics for fermions, Bose–Einstein statistics for bosons), however it is much more generally applicable than that. The grand canonical ensemble may also be used to describe classical systems, or even interacting quantum gases.

The grand partition function is sometimes written (equivalently) in terms of alternate variables as

where is known as the absolute activity (or fugacity) and is the canonical partition function.

Wednesday, August 31, 2022

Rational number

From Wikipedia, the free encyclopedia
A symbol for the set of rational numbers
 
The rational numbers () are included in the real numbers (), while themselves including the integers (), which in turn include the natural numbers ()

In mathematics, a rational number is a number that can be expressed as the quotient or fraction p/q of two integers, a numerator p and a non-zero denominator q. For example, −3/7 is a rational number, as is every integer (e.g. 5 = 5/1). The set of all rational numbers, also referred to as "the rationals", the field of rationals or the field of rational numbers is usually denoted by boldface Q, or blackboard bold

A rational number is a real number. The real numbers that are rational are those whose decimal expansion either terminates after a finite number of digits (example: 3/4 = 0.75), or eventually begins to repeat the same finite sequence of digits over and over (example: 9/44 = 0.20454545...). This statement is true not only in base 10, but also in every other integer base, such as the binary and hexadecimal ones (see Repeating decimal § Extension to other bases).

A real number that is not rational is called irrational. Irrational numbers include 2, π, e, and φ. Since the set of rational numbers is countable, and the set of real numbers is uncountable, almost all real numbers are irrational.

Rational numbers can be formally defined as equivalence classes of pairs of integers (p, q) with q ≠ 0, using the equivalence relation defined as follows:

The fraction p/q then denotes the equivalence class of (p, q).

Rational numbers together with addition and multiplication form a field which contains the integers, and is contained in any field containing the integers. In other words, the field of rational numbers is a prime field, and a field has characteristic zero if and only if it contains the rational numbers as a subfield. Finite extensions of Q are called algebraic number fields, and the algebraic closure of Q is the field of algebraic numbers.

In mathematical analysis, the rational numbers form a dense subset of the real numbers. The real numbers can be constructed from the rational numbers by completion, using Cauchy sequences, Dedekind cuts, or infinite decimals (see Construction of the real numbers).

Terminology

The term rational in reference to the set Q refers to the fact that a rational number represents a ratio of two integers. In mathematics, "rational" is often used as a noun abbreviating "rational number". The adjective rational sometimes means that the coefficients are rational numbers. For example, a rational point is a point with rational coordinates (i.e., a point whose coordinates are rational numbers); a rational matrix is a matrix of rational numbers; a rational polynomial may be a polynomial with rational coefficients, although the term "polynomial over the rationals" is generally preferred, to avoid confusion between "rational expression" and "rational function" (a polynomial is a rational expression and defines a rational function, even if its coefficients are not rational numbers). However, a rational curve is not a curve defined over the rationals, but a curve which can be parameterized by rational functions.

Etymology

Although nowadays rational numbers are defined in terms of ratios, the term rational is not a derivation of ratio. On the opposite, it is ratio that is derived from rational: the first use of ratio with its modern meaning was attested in English about 1660, while the use of rational for qualifying numbers appeared almost a century earlier, in 1570. This meaning of rational came from the mathematical meaning of irrational, which was first used in 1551, and it was used in "translations of Euclid (following his peculiar use of ἄλογος)".

This unusual history originated in the fact that ancient Greeks "avoided heresy by forbidding themselves from thinking of those [irrational] lengths as numbers". So such lengths were irrational, in the sense of illogical, that is "not to be spoken about" (ἄλογος in Greek).

This etymology is similar to that of imaginary numbers and real numbers.

Arithmetic

Irreducible fraction

Every rational number may be expressed in a unique way as an irreducible fraction a/b, where a and b are coprime integers and b > 0. This is often called the canonical form of the rational number.

Starting from a rational number a/b, its canonical form may be obtained by dividing a and b by their greatest common divisor, and, if b < 0, changing the sign of the resulting numerator and denominator.

Embedding of integers

Any integer n can be expressed as the rational number n/1, which is its canonical form as a rational number.

Equality

if and only if

If both fractions are in canonical form, then:

if and only if and

Ordering

If both denominators are positive (particularly if both fractions are in canonical form):

if and only if

On the other hand, if either denominator is negative, then each fraction with a negative denominator must first be converted into an equivalent form with a positive denominator—by changing the signs of both its numerator and denominator.

Addition

Two fractions are added as follows:

If both fractions are in canonical form, the result is in canonical form if and only if b and d are coprime integers.

Subtraction

If both fractions are in canonical form, the result is in canonical form if and only if b and d are coprime integers.

Multiplication

The rule for multiplication is:

where the result may be a reducible fraction—even if both original fractions are in canonical form.

Inverse

Every rational number a/b has an additive inverse, often called its opposite,

If a/b is in canonical form, the same is true for its opposite.

A nonzero rational number a/b has a multiplicative inverse, also called its reciprocal,

If a/b is in canonical form, then the canonical form of its reciprocal is either b/a or b/a, depending on the sign of a.

Division

If b, c, and d are nonzero, the division rule is

Thus, dividing a/b by c/d is equivalent to multiplying a/b by the reciprocal of c/d:

Exponentiation to integer power

If n is a non-negative integer, then

The result is in canonical form if the same is true for a/b. In particular,

If a ≠ 0, then

If a/b is in canonical form, the canonical form of the result is bn/an if a > 0 or n is even. Otherwise, the canonical form of the result is bn/an.

Continued fraction representation

A finite continued fraction is an expression such as

where an are integers. Every rational number a/b can be represented as a finite continued fraction, whose coefficients an can be determined by applying the Euclidean algorithm to (a, b).

Other representations

are different ways to represent the same rational value.

Formal construction

A diagram showing a representation of the equivalent classes of pairs of integers

The rational numbers may be built as equivalence classes of ordered pairs of integers.

More precisely, let (Z × (Z \ {0})) be the set of the pairs (m, n) of integers such n ≠ 0. An equivalence relation is defined on this set by

Addition and multiplication can be defined by the following rules:

This equivalence relation is a congruence relation, which means that it is compatible with the addition and multiplication defined above; the set of rational numbers Q is the defined as the quotient set by this equivalence relation, (Z × (Z \ {0})) / ~, equipped with the addition and the multiplication induced by the above operations. (This construction can be carried out with any integral domain and produces its field of fractions.)

The equivalence class of a pair (m, n) is denoted m/n. Two pairs (m1, n1) and (m2, n2) belong to the same equivalence class (that is are equivalent) if and only if m1n2 = m2n1. This means that m1/n1 = m2/n2 if and only m1n2 = m2n1.

Every equivalence class m/n may be represented by infinitely many pairs, since

Each equivalence class contains a unique canonical representative element. The canonical representative is the unique pair (m, n) in the equivalence class such that m and n are coprime, and n > 0. It is called the representation in lowest terms of the rational number.

The integers may be considered to be rational numbers identifying the integer n with the rational number n/1.

A total order may be defined on the rational numbers, that extends the natural order of the integers. One has

if

Properties

The set Q of all rational numbers, together with the addition and multiplication operations shown above, forms a field.

Q has no field automorphism other than the identity.

With the order defined above, Q is an ordered field that has no subfield other than itself, and is the smallest ordered field, in the sense that every ordered field contains a unique subfield isomorphic to Q.

Q is a prime field, which is a field that has no subfield other than itself. The rationals are the smallest field with characteristic zero. Every field of characteristic zero contains a unique subfield isomorphic to Q.

Q is the field of fractions of the integers Z. The algebraic closure of Q, i.e. the field of roots of rational polynomials, is the field of algebraic numbers.

The rationals are a densely ordered set: between any two rationals, there sits another one, and, therefore, infinitely many other ones. For example, for any two fractions such that

(where are positive), we have

Any totally ordered set which is countable, dense (in the above sense), and has no least or greatest element is order isomorphic to the rational numbers.

Countability

Illustration of the countability of the positive rationals

The set of all rational numbers is countable, as is illustrated in the figure to the right. As a rational number can be expressed as a ratio of two integers, it is possible to assign two integers to any point on a square lattice as in a Cartesian coordinate system, such that any grid point corresponds to a rational number. This method, however, exhibits a form of redundancy, as several different grid points will correspond to the same rational number; these are highlighted in red on the provided graphic. An obvious example can be seen in the line going diagonally towards the bottom right; such ratios will always equal 1, as any non-zero number divided by itself will always equal one.

It is possible to generate all of the rational numbers without such redundancies: examples include the Calkin–Wilf tree and Stern–Brocot tree.

As the set of all rational numbers is countable, and the set of all real numbers (as well as the set of irrational numbers) is uncountable, the set of rational numbers is a null set, that is, almost all real numbers are irrational, in the sense of Lebesgue measure.

Real numbers and topological properties

The rationals are a dense subset of the real numbers: every real number has rational numbers arbitrarily close to it. A related property is that rational numbers are the only numbers with finite expansions as regular continued fractions.

By virtue of their order, the rationals carry an order topology. The rational numbers, as a subspace of the real numbers, also carry a subspace topology. The rational numbers form a metric space by using the absolute difference metric d(x, y) = |xy|, and this yields a third topology on Q. All three topologies coincide and turn the rationals into a topological field. The rational numbers are an important example of a space which is not locally compact. The rationals are characterized topologically as the unique countable metrizable space without isolated points. The space is also totally disconnected. The rational numbers do not form a complete metric space; the real numbers are the completion of Q under the metric d(x, y) = |xy| above.

p-adic numbers

In addition to the absolute value metric mentioned above, there are other metrics which turn Q into a topological field:

Let p be a prime number and for any non-zero integer a, let |a|p = pn, where pn is the highest power of p dividing a.

In addition set |0|p = 0. For any rational number a/b, we set |a/b|p = |a|p/|b|p.

Then dp(x, y) = |xy|p defines a metric on Q.

The metric space (Q, dp) is not complete, and its completion is the p-adic number field Qp. Ostrowski's theorem states that any non-trivial absolute value on the rational numbers Q is equivalent to either the usual real absolute value or a p-adic absolute value.

Distance education

From Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Distance_...