# Gibbs-Duhem and Maxwell relations

## Gibbs-Duhem relation

We start from the differential of the Gibbs free energy:

{\displaystyle {\begin{aligned}dG=\sum _{i}{\frac {\partial G}{\partial x_{i}}}_{|T,N}dx_{i}+{\frac {\partial G}{\partial T}}_{|P,N}dT+\sum _{i}{\frac {\partial G}{\partial N_{i}}}_{|P,T,N_{j\neq i}}dN_{i}=\\=\sum _{i}X_{i}dx_{i}-SdT+\sum _{j}\mu _{j}dN_{j}\end{aligned}}}
(where we are considering a system composed of different types of particles and that can be characterized with different generalized displacements). However, differentiating ${\textstyle G(T,\lbrace X_{i}\rbrace ,\lbrace N_{j}\rbrace )=\sum _{j}\mu _{j}N_{j}}$ we get:
${\displaystyle dG=\sum _{j}N_{j}d\mu _{j}+\sum _{j}\mu _{j}dN_{j}}$
and equating with the previous expression of ${\displaystyle dG}$ we obtain:
${\displaystyle SdT-\sum _{i}X_{i}dx_{i}+\sum _{j}N_{j}d\mu _{j}=0}$
which is called Gibbs-Duhem relation. We can see that as a consequence of this relation the intensive variables of the system are not all independent from each other: in particular, an ${\displaystyle r}$-component ${\displaystyle PVT}$ system will have ${\displaystyle r+1}$ independent intensive thermodynamic variables; for a simple ${\displaystyle PVT}$ system the Gibbs-Duhem relation reduces to:
${\displaystyle SdT-VdP+Nd\mu =0}$

## Maxwell relations

We have previously seen that for a ${\displaystyle PVT}$ system we have:

${\displaystyle T={\frac {\partial U}{\partial S}}_{|V,N}\quad \qquad -P={\frac {\partial U}{\partial V}}_{|S,N}}$
we also know (Schwartz's theorem) that (since ${\displaystyle U}$ is a sufficiently regular function) we must have:
${\displaystyle {\frac {\partial ^{2}U}{\partial V\partial S}}={\frac {\partial ^{2}U}{\partial S\partial V}}}$
which means:
${\displaystyle {\frac {\partial T}{\partial V}}_{|S,N}=-{\frac {\partial P}{\partial S}}_{|V,N}}$
or similarly, deriving ${\displaystyle U}$ with respect to ${\displaystyle S}$ and ${\displaystyle N}$, or ${\displaystyle V}$ and ${\displaystyle N}$:
${\displaystyle {\frac {\partial T}{\partial N}}_{|S,V}={\frac {\partial \mu }{\partial S}}_{|N,V}\qquad -{\frac {\partial P}{\partial N}}_{|S,V}={\frac {\partial \mu }{\partial V}}_{|S,N}}$
These are called Maxwell relations. If we consider ${\displaystyle F}$ instead of ${\displaystyle U}$, we get:
${\displaystyle {\frac {\partial S}{\partial V}}_{|T,N}={\frac {\partial P}{\partial T}}_{|V,N}\qquad {\frac {\partial S}{\partial N}}_{|V,T}={\frac {\partial \mu }{\partial P}}_{|T,N}\qquad {\frac {\partial S}{\partial N}}_{|P,T}=-{\frac {\partial \mu }{\partial T}}_{|P,N}}$
or, with ${\displaystyle G}$:
${\displaystyle {\frac {\partial S}{\partial P}}_{|T,N}=-{\frac {\partial V}{\partial T}}_{|P,N}\qquad {\frac {\partial S}{\partial N}}_{|P,T}=-{\frac {\partial \mu }{\partial T}}_{|P,N}\qquad {\frac {\partial V}{\partial N}}_{|P,T}={\frac {\partial \mu }{\partial P}}_{|T,N}}$
other similar relations can be found using other thermodynamic potentials or also for magnetic systems. The usefulness of these relations will become clear in the next section.