# 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