# Introduction to Mathematical Physics/Statistical physics/Entropy maximalization

In general, a system is described by two types of variables. External variables $y^i$ whose values are fixed at $y_j$ by the exterior and internal variables $X^i$ that are free to fluctuate, only their mean being fixed to $\bar{X^i}$. Problem to solve is thus the following:

Problem:

Find distribution probability $P_l$ over the states $(l)$ of the considered system that maximizes the entropy

$S=-k_B\sum P_l \ln (P_l)$

and that verifies following constraints:

$\begin{matrix} \sum X_{l}^iP_l&=&\bar{X^i}\\ \sum P_l&=&1 \end{matrix}$

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

$P_l=\frac{1}{Z}e^{-\lambda_1 X^{1}_l-\lambda_2 X^{2}_l- ...}$

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

$Z=\sum_{(l)} e^{-\lambda_1 X^{1}_l-\lambda_2 X^{2}_l- ...}$

Numbers $\lambda_i$ 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:

$\beta=\frac{1}{k_BT}$

where $T$ 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 $\beta\mu$ where $\mu$ is called the chemical potential.

Relations on means[1] that:

$S/k=\sum \lambda_i \bar{X^i}+\ln(Z)$

This relation that binds $L$ to $S$ is called a {\bf Legendre transform}.\index{Legendre transformation} $L$ is function of the $y^i$'s and $\lambda_j$'s, $S$ is a function of the $y^i$'s and $\bar{X^j}$'s.

1. They are used to determine Lagrange multipliers $\lambda_i$ from associated means $\bar{X_i}$} can be written as:

$-\frac{\partial}{\partial \lambda_i}\ln Z(y,\lambda_1,\lambda_2,...) = \bar{X_i}$

It is useful to define a function $L$ by:

$L=\ln Z(y,\lambda_1,\lambda_2,...)$

It can be shown\footnote{ By definition

$S=-k_B\sum P_l \ln (P_l)$

thus

$S/k=-\sum P_l\ln(\frac{1}{Z}e^{-\lambda_1 X^{1}_l-\lambda_2 X^{2}_l- ...})$

$S/k=1\ln Z+\lambda_1 \bar{X^{1}_l}+\lambda_2 \bar{X^{2}_l}+ ...$