The relationship for chemical potential \[\mu = \mu^o + RT \ln \left( \dfrac{p}{p^o} \right) \nonumber \] was derived assuming ideal gas behavior. But for real gases that deviate widely from ideal behavior, the expression has only limited applicability. In order to use the simple expression on real gases, a “fudge” factor is introduced called fugacity . Using fugacity instead of pressure, the chemical potential expression becomes \[\mu = \mu^o + RT \ln \left( \dfrac{f}{f^o} \right) \nonumber \] where \(f\) is the fugacity. Fugacity is related to pressure, but contains all of the deviations from ideality within it. To see how it is related to pressure, consider that a change in chemical potential for a single component system can be expressed as \[d\mu - Vdp - SdT \nonumber \] and so \[ \left(\dfrac{\partial \mu}{\partial p} \right)_T = V \label{eq3} \] Differentiating the expression for chemical potential above with respect to pressure at constant volume results in \[ \left(\dfrac{\partial \mu}{\partial p} \right)_T = \left \{ \dfrac{\partial}{\partial p} \left[ \mu^o + RT \ln \left( \dfrac{f}{f^o} \right) \right] \right \} \nonumber \] which simplifies to \[ \left(\dfrac{\partial \mu}{\partial p} \right)_T = RT \left[ \dfrac{\partial \ln (f)}{\partial p} \right]_T = V \nonumber \] Multiplying both sides by \(p/RT\) gives \[\left[ \dfrac{\partial \ln (f)}{\partial p} \right]_T = \dfrac{pV}{RT} =Z \nonumber \] where \(Z\) is the compression factor as discussed previously. Now, we can use the expression above to obtain the fugacity coefficient \(\gamma\), as defined by \[ f= \gamma p \nonumber \] Taking the natural logarithm of both sides yields \[ \ln f= \ln \gamma + \ln p \nonumber \] or \[ \ln \gamma = \ln f - \ln p \nonumber \] Using some calculus and substitutions from above, \[ \int \left(\dfrac{\partial \ln \gamma}{\partial p} \right)_T dp = \int \left(\dfrac{\partial \ln f}{\partial p} - \dfrac{\partial \ln p }{\partial p} \right)_T dp \nonumber \] \[= \int \left(\dfrac{Z}{\partial p} - \dfrac{1}{\partial p} \right)_T dp \nonumber \] Finally, integrating from \(0\) to \(p\) yields \[\ln \gamma = \int_0^{p} \left( \dfrac{ Z-1}{p}\right)_T dp \nonumber \] If the gas behaves ideally, \(\gamma = 1\). In general, this will be the limiting value as \(p \rightarrow 0\) since all gases behave ideal as the pressure approaches 0. The advantage to using the fugacity in this manner is that it allows one to use the expression \[ \mu = \mu^o + RT \ln \left( \dfrac{f}{f^o}\right) \nonumber \] to calculate the chemical potential, insuring that Equation \ref{eq3} holds even for gases that deviate from ideal behavior!