# Ideal solution

An ideal solution or ideal mixture is a solution that exhibits thermodynamic properties analogous to those of a mixture of ideal gases. The enthalpy of mixing is zero as is the volume change on mixing. The vapor pressures of all components obey Raoult's law across the entire range of concentrations, and the activity coefficient (which measures deviation from ideality) is equal to one for each component.
The concept of an ideal solution is fundamental to both thermodynamics and chemical thermodynamics and their applications, such as the explanation of colligative properties.

## Physical origin

Ideality of solutions is analogous to ideality for gases, with the important difference that intermolecular interactions in liquids are strong and cannot simply be neglected as they can for ideal gases. Instead we assume that the mean strength of the interactions are the same between all the molecules of the solution.
More formally, for a mix of molecules of A and B, then the interactions between unlike neighbors (U$_{AB}$) and like neighbors U$_{AA}$ and U$_{BB}$ must be of the same average strength, i.e., 2 U$_{AB}$ = U$_{AA}$ + U$_{BB}$ and the longer-range interactions must be nil (or at least indistinguishable). If the molecular forces are the same between AA, AB and BB, i.e., U$_{AB}$ = U$_{AA}$ = U$_{BB}$, then the solution is automatically ideal.
If the molecules are almost identical chemically, e.g., 1-butanol and 2-butanol, then the solution will be almost ideal. Since the interaction energies between A and B are almost equal, it follows that there is only a very small overall energy (enthalpy) change when the substances are mixed. The more dissimilar the nature of A and B, the more strongly the solution is expected to deviate from ideality.

## Formal definition

Different related definitions of an ideal solution have been proposed. The simplest definition is that an ideal solution is a solution for which each component obeys Raoult's law $p_{i}=x_{i}p_{i}^{*}$ for all compositions. Here $p_{i}$ is the vapor pressure of component $i$ above the solution, $x_{i}$ is its mole fraction and $p_{i}^{*}$ is the vapor pressure of the pure substance $i$ at the same temperature.
This definition depends on vapor pressure, which is a directly measurable property, at least for volatile components. The thermodynamic properties may then be obtained from the chemical potential μ (which is the partial molar Gibbs energy g) of each component. If the vapor is an ideal gas,
    $\mu (T,p_{i})=g(T,p_{i})=g^{\mathrm {u} }(T,p^{u})+RT\ln {\frac {p_{i}}{p^{u}}}.$
The reference pressure $p^{u}$ may be taken as $P^{o}$ = 1 bar, or as the pressure of the mix, whichever is simpler.
On substituting the value of $p_{i}$ from Raoult's law,
    $\mu (T,p_{i})=g^{\mathrm {u} }(T,p^{u})+RT\ln {\frac {p_{i}^{*}}{p^{u}}}+RT\ln x_{i}=\mu _{i}^{*}+RT\ln x_{i}.$
This equation for the chemical potential can be used as an alternate definition for an ideal solution.
However, the vapor above the solution may not actually behave as a mixture of ideal gases. Some authors therefore define an ideal solution as one for which each component obeys the fugacity analogue of Raoult's law $f_{i}=x_{i}f_{i}^{*}$. Here $f_{i}$ is the fugacity of component $i$ in solution and $f_{i}^{*}$ is the fugacity of $i$ as a pure substance. Since the fugacity is defined by the equation
    $\mu (T,P)=g(T,P)=g^{\mathrm {u} }(T,p^{u})+RT\ln {\frac {f_{i}}{p^{u}}}$
this definition leads to ideal values of the chemical potential and other thermodynamic properties even when the component vapors above the solution are not ideal gases. An equivalent statement uses thermodynamic activity instead of fugacity.

## Thermodynamic properties
### Volume

If we differentiate this last equation with respect to $p$ at $T$ constant we get:
    $\left({\frac {\partial g(T,P)}{\partial P}}\right)_{T}=RT\left({\frac {\partial \ln f}{\partial P}}\right)_{T}.$
Since we know from the Gibbs potential equation that:
    $\left({\frac {\partial g(T,P)}{\partial P}}\right)_{T}=v$
with the molar volume $v$, these last two equations put together give:
    $\left({\frac {\partial \ln f}{\partial P}}\right)_{T}={\frac {v}{RT}}.$
Since all this, done as a pure substance, is valid in an ideal mix just adding the subscript $i$ to all the intensive variables and changing $v$ to ${\bar {v_{i}}}$, with optional overbar, standing for partial molar volume:
    $\left({\frac {\partial \ln f_{i}}{\partial P}}\right)_{T,x_{i}}={\frac {\bar {v_{i}}}{RT}}.$
Applying the first equation of this section to this last equation we find:
    $v_{i}^{*}={\bar {v}}_{i}$
which means that the partial molar volumes in an ideal mix are independent of composition. Consequently, the total volume is the sum of the volumes of the components in their pure forms:
    $V=\sum _{i}V_{i}^{*}.$

### Enthalpy and heat capacity

Proceeding in a similar way but taking the derivative with respect to $T$ we get a similar result for molar enthalpies:
    ${\frac {g(T,P)-g^{\mathrm {gas} }(T,p^{u})}{RT}}=\ln {\frac {f}{p^{u}}}.$
Remembering that $\left({\frac {\partial {\frac {g}{T}}}{\partial T}}\right)_{P}=-{\frac {h}{T^{2}}}$ we get:
    $-{\frac {{\bar {h_{i}}}-h_{i}^{\mathrm {gas} }}{R}}=-{\frac {h_{i}^{*}-h_{i}^{\mathrm {gas} }}{R}}$
which in turn means that ${\bar {h_{i}}}=h_{i}^{*}$ and that the enthalpy of the mix is equal to the sum of its component enthalpies.
Since ${\bar {u_{i}}}={\bar {h_{i}}}-p{\bar {v_{i}}}$ and $u_{i}^{*}=h_{i}^{*}-pv_{i}^{*}$, similarly
    $u_{i}^{*}={\bar {u_{i}}}.$
It is also easily verifiable that
    $C_{pi}^{*}={\bar {C_{pi}}}.$

### Entropy of mixing

Finally since
    ${\bar {g_{i}}}=\mu _{i}=g_{i}^{\mathrm {gas} }+RT\ln {\frac {f_{i}}{p^{u}}}=g_{i}^{\mathrm {gas} }+RT\ln {\frac {f_{i}^{*}}{p^{u}}}+RT\ln x_{i}=\mu _{i}^{*}+RT\ln x_{i}$
we find that
    $\Delta g_{i,\mathrm {mix} }=RT\ln x_{i}.$
Since the Gibbs free energy per mole of the mixture $G_{m}$ is $G_{m}=\sum _{i}x_{i}{g_{i}}$ then
    $\Delta G_{\mathrm {m,mix} }=RT\sum _{i}{x_{i}\ln x_{i}}.$
At last we can calculate the molar entropy of mixing since $g_{i}^{*}=h_{i}^{*}-Ts_{i}^{*}$ and ${\bar {g_{i}}}={\bar {h_{i}}}-T{\bar {s_{i}}}$
    $\Delta s_{i,\mathrm {mix} }=-R\sum _{i}\ln x_{i}$
    $\Delta S_{\mathrm {m,mix} }=-R\sum _{i}x_{i}\ln x_{i}.$

## Consequences

Solvent–solute interactions are the same as solute–solute and solvent–solvent interactions, on average. Consequently, the enthalpy of mixing (solution) is zero and the change in Gibbs free energy on mixing is determined solely by the entropy of mixing. Hence the molar Gibbs free energy of mixing is
    $\Delta G_{\mathrm {m,mix} }=RT\sum _{i}x_{i}\ln x_{i}$
or for a two-component ideal solution
    $\Delta G_{\mathrm {m,mix} }=RT(x_{A}\ln x_{A}+x_{B}\ln x_{B})$
where m denotes molar, i.e., change in Gibbs free energy per mole of solution, and $x_{i}$ is the mole fraction of component $i$. Note that this free energy of mixing is always negative (since each $x_{i}\in [0,1]$, each $\ln x_{i}$ or its limit for $x_{i}\to 0$ must be negative (infinite)), i.e., ideal solutions are miscible at any composition and no phase separation will occur.
The equation above can be expressed in terms of chemical potentials of the individual components
    $\Delta G_{\mathrm {m,mix} }=\sum _{i}x_{i}\Delta \mu _{i,\mathrm {mix} }$
where $\Delta \mu _{i,\mathrm {mix} }=RT\ln x_{i}$ is the change in chemical potential of $i$ on mixing. If the chemical potential of pure liquid $i$ is denoted $\mu _{i}^{*}$, then the chemical potential of $i$ in an ideal solution is
    $\mu _{i}=\mu _{i}^{*}+RT\ln x_{i}.$
Any component $i$ of an ideal solution obeys Raoult's Law over the entire composition range:
    $\ p_{i}=(p_{i})_{\text{pure}}x_{i}$
where $(p_{i})_{\text{pure}}$ is the equilibrium vapor pressure of pure component $i$ and $x_{i}\,$is the mole fraction of component $i$ in solution.

## Non-ideality

Deviations from ideality can be described by the use of Margules functions or activity coefficients. A single Margules parameter may be sufficient to describe the properties of the solution if the deviations from ideality are modest; such solutions are termed regular.
In contrast to ideal solutions, where volumes are strictly additive and mixing is always complete, the volume of a non-ideal solution is not, in general, the simple sum of the volumes of the component pure liquids and solubility is not guaranteed over the whole composition range. By measurement of densities, thermodynamic activity of components can be determined.