# Introduction to Mathematical Physics/Statistical physics/Entropy maximalization

In general, a system is described by two types of variables. External variables whose values are fixed at by the exterior and internal variables that are free to fluctuate, only their mean being fixed to . Problem to solve is thus the following:

**Problem:**

Find distribution probability over the states of the considered system that maximizes the entropy

and that verifies following constraints:

Entropy functional maximization is done using Lagrange multipliers technique. Result is:

where function , called partition function, \index{partition function} is defined by:

Numbers are the Lagrange multipliers of the maximization problem considered.

**Example:**

In the case where energy is free to fluctuate around a fixed average, Lagrange multiplier is:

where is temperature.\index{temperature} We thus have a mathematical definition of temperature.

**Example:**

In the case where the number of particles is free to fluctuate around a fixed average, associated Lagrange multiplier is noted where is called the chemical potential.

Relations on means^{[1]} that:

This relation that binds to is called a {\bf Legendre transform}.\index{Legendre transformation} is function of the 's and 's, is a function of the 's and 's.

- ↑ They are used to determine Lagrange multipliers from associated means } can be written as:
It is useful to define a function by:

It can be shown\footnote{ By definition

thus

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "/mathoid/local/v1/":): {\displaystyle S/k=1\ln Z+\lambda_1 \bar{X^{1}_l}+\lambda_2 \bar{X^{2}_l}+ ... }**