Thermodynamics: Deriving the Maxwell Relations


Posted by Youssef Moawad on: 02/06/2018, in Physics

Intro and Welcome back to the physics blog!

It has been a good bit of time since I posted the prelude article to this, so it's about time I write this! Welcome back!!

In this blog, I will be deriving Maxwell's relations of thermodynamic potentials. These are a set of relations which are useful because they allow us to change certain quantities, which are often hard to measure in the real world, to others which can be easily measured.

I will assume that you have read the prelude article to this about exact differentials and partial differential relations and are comfortable with these concepts.

Throughout the article, I will also be assuming the reader is familiar with the basics of thermodynamics, including the first and second laws, entropy, etc. Indeed, this topic is mostly mathematical, and once the fundamental equations are found, everything else follows as a direct mathematical manipulation. I will try, however, to give as much context as we go as I can. The main equations I will assume you are familiar with are:

$$ \textrm{Work done on a gas during a change of volume: } \delta W = -PdV $$ $$ \textrm{First law of thermodynamics: } dU = \delta Q + \delta W = \delta Q - PdV $$ $$ \textrm{Second law of thermodynamics in terms of entropy: } \delta Q = TdS $$

where $\delta W$ and $\delta Q$ are inexact differentials. We showed this in the prelude article.

Now that's out of the way, let's get started!

Thermodynamic Potentials

A thermodynamic potential is some quantity used to represent some thermodynamic state in a system. We can define many thermodynamic potentials on a system and they each give a different measure of the "type" of energy the system has. In this article, we will consider four such potentials.

Side note: Natural Variables

Just a short note about natural variables before we begin. Consider a system undergoing some thermodynamic process which we are interested in analysing. Assume that we know that two quantities of that system will be constant throughout the process. Then, if we can find the thermodynamic potential whose natural variables are those quantities, then we can easily analyse the system using that potential. It's a natural choice to use that potential!

A natural variable of a thermodynamic potential is special because when the natural variables of a thermodynamic potential are held constant during a process, it means that we can easily use that potential to analyse the process because that thermodynamic potential will be conserved.

Internal Energy

The first thermodynamic potential we will consider is internal energy, which will most likely be the one you're most familiar with from past studies of thermodynamics. The internal energy of a system is the energy contained in it. This is excluding any energy from outside of the system (due to any external forces) or the kinetic energy of a system as a whole. This is only the energy of the system due to the motion and interactions of the particles that make up the system.

Let's consider the first law of thermodynamics, which gives us a differetial form for the internal energy:

$$ dU = \delta Q + \delta W $$

We know that the work done on a system, $\delta W$, is given by: $ \delta W = -PdV $. Additionally, from the second law of thermodynamics, in terms of entropy, we know that the heat transferred is given by: $ \delta Q = TdS $. Substituting this in the above expression for $dU$, we get:

$$ dU = TdS - PdV $$

This differential form is often known as the fundamental thermodynamic relation.

From the above we know that the natural variables of a thermodynamic potentials are the ones which, if kept constant, mean that the potential is conserved through some process. In this case this means that $ dU = 0 $. This is achieved when $dS$ and $dV$ are both zero. So entropy, S, and volume, V, are the natural variables of internal energy, U.

Enthalpy

Enthalpy (represented by the letter $H$) is a thermodynamic potential of a system, which is equal to the internal energy of the system plus the product of its pressure and volume:

$$ H = U + PV $$

This represents the total heat content of a system and is often the preferred potential to use when studying many chemical reactions which take place at constant pressure. This is because when pressure is constant, the change of enthalpy is equal to the change in internal energy of the system.

There's definitely much more to be said about the usefulness of using enthalpy in certain processes, but I will leave it here and move on to find its differential form. Really all you need to know about enthalpy to continue is its mathematical definition given above.

Let's try to find $dH$ from the above expression:

$$ dH = dU + d(PV) = dU + PdV + VdP $$

What I've done here in the last step is use the product rule for the differential to expand $d(PV)$ into $PdV + VdP$. We can now use the differential form of the internal energy $dU = TdS - PdV$ to substitute for $dU$:

$$ dH = TdS - PdV + PdV + VdP $$ $$ \Rightarrow dH = TdS + VdP $$

where in the last step, $-PdV$ cancels $PdV$ and we're left with that result. This is the differential form of enthalpy. We can apply the same idea we applied to internal energy here to find the natural variables of enthalpy. We can see that $dH = 0$ when $dS$ and $dP$ are zero. So entropy, S, and pressure, P, are the natural variables of enthalpy, H.

Helmholtz Free Energy

The Helmholtz free energy (represented by the letter $F$) of a system is defined as the internal energy of the system minus the product of its entropy and temperature:

$$ F = U - TS $$

This represents the amount of useful work that can be obtained from a closed system at constant temperature and volume. Again, I won't spend too long on the uses of this thermodynamic potential.

Let's now find the differential form of this, the same way we did with enthalpy:

$$ dF = dU - d(TS) = dU - TdS - SdT $$

Substituting in the differential form of internal energy ($dU = TdS - PdV$):

$$ dF = TdS - PdV - TdS - SdT $$ $$ \Rightarrow dF = -PdV - SdT $$

This is the differential form of the Helmholtz free energy. We can now immediately see that volume, V, and temperature, T, are the natural variables of the Helmholtz free energy, F.

Gibbs Free Energy

The last thermodynamic potential we'll consider is the Gibbs free energy (represented by the letter $G$). This potential is used to calculate the amount of work a system can perform at constant temperature and pressure. As such, it is very useful when studying phase transitions, which happen at such conditions. This is defined as the enthalpy of a system minus the product of the temperature and entropy of the system:

$$ G = H - TS $$

Finding the differential form of this (as above):

$$ dG = dH - d(TS) = dH - TdS - SdT $$

Substituting in the differential form of enthalpy ($dH = TdS + VdP$):

$$ dG = TdS + VdP - TdS - SdT $$ $$ \Rightarrow dG = VdP - SdT $$

This is the differential form of the Gibbs free energy. We can see that pressure, P, and temperature, T, are the natural variables of the Gibbs free energy, G.

Deriving Maxwell's Relations

So far we have derived the differential forms of the four thermodynamic potentials in which we're interested and have identified their natural variables. This is summarised in the following table:

Thermodynamic Potential Differential Form Natural Variables
Internal Energy, $U$ $dU = TdS - PdV$ $S$, $V$
Enthalpy, $H$ $dH = TdS + VdP$ $S$, $P$
Helmholtz Free Energy, $F$ $dF = -PdV - SdT$ $V$, $T$
Gibbs Free Energy, $G$ $dG = VdP - SdT$ $P$, $T$

We can now start using these in our derivation of the Maxwell relations. But first, a recap!

Quick Recap: Total Differentials

Total differentials are an important concept for the next few sections so I feel a recap on them here would be helpful. I've already covered this in the the prelude article so if it's fresh in your mind, feel free to skip this.

Consider some function, $f$, of two variables $x$ and $y$, such that $f = f(x,y)$. For any such function (where $f$, $x$ and $y$ can all represent physical quantities), we can define the total differential of this function as:

$$ df = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy $$

In the context of thermodynamics, we will often want to write the partial derivative of some quantity with respect to a variable while explicitly holding some other variable constant. We use this notation for it:

$$(\frac{\partial f}{\partial x})_y$$

This represents the partial derivative of $f$ with respect to $x$ while explicitly keeping $y$ constant. This notation is known as constrained variable notation. Let's rewrite the total differential of $f$ in this notation now:

$$ df = (\frac{\partial f}{\partial x})_ydx + (\frac{\partial f}{\partial y})_xdy $$

Now consider we have some system with three variables: $x$, $y$ and $z$. We can define any of these as a function of the other two, such that: $x = x(y,z)$, $y = y(x,z)$ and $z = z(x,y)$. So, we can express the total differentials of these three variables in terms of the other two, like so:

$$dx = (\frac{\partial x}{\partial y})_zdy + (\frac{\partial x}{\partial z})_ydz$$ $$dy = (\frac{\partial y}{\partial x})_zdx + (\frac{\partial y}{\partial z})_xdz$$ $$dz = (\frac{\partial z}{\partial x})_ydx + (\frac{\partial z}{\partial y})_xdy$$

The important thing to take from here is knowing that as soon as we define a function in terms of two variables, we can immediately write a total differential of that function without actually knowing any other information about the function. And indeed we can do this for all of the thermodynamic potentials we have discussed. As a matter of fact, we will be considering them as functions of their natural variables.

Internal Energy Maxwell Relation

Let's start by again considering the differential form of the internal energy, given by $dU = TdS - PdV$. Consider now $U$ as a function of entropy, S, and volume, V, such that $U = U(S,V)$. Notice that these are the natural variables of internal energy. We can now write the total differential of $U(S,V)$ as:

$$ dU = (\frac{\partial U}{\partial S})_VdS + (\frac{\partial U}{\partial V})_SdV $$

We can now equate the two expressions for $dU$ (the above and the differential form), to see that:

$$ (\frac{\partial U}{\partial S})_VdS + (\frac{\partial U}{\partial V})_SdV = TdS - PdV $$

From here, we can equate the coefficients of $dS$ and $dV$:

$$ (\frac{\partial U}{\partial S})_V = T $$ $$ (\frac{\partial U}{\partial V})_S = -P $$

Let's only consider the first of these for now: $ (\frac{\partial U}{\partial S})_V = T $. Consider here differentiating both sides with respect to $V$ while keeping $S$ constant. This means we apply $\frac{\partial}{\partial V})_S$ to both sides, such that:

$$ \frac{\partial}{\partial V})_S(\frac{\partial U}{\partial S})_V = (\frac{\partial T}{\partial V})_S $$

Here the left hand side can be expressed as $ \frac{\partial}{\partial V})_S \frac{\partial}{\partial S})_V U $, such that we can indeed flip the order of differentiation freely. This is due to the equality of the mixed second order partial derivatives. This is important because now will consider the second equation, $ (\frac{\partial U}{\partial V})_S = -P $.

Consider differentiating both sides of $ (\frac{\partial U}{\partial V})_S = -P $ with respect to $S$ while keeping $V$ constant. This means applying $\frac{\partial}{\partial S})_V$ to both sides:

$$ \frac{\partial}{\partial S})_V(\frac{\partial U}{\partial V})_S = -(\frac{\partial P}{\partial S})_V $$

Again notice how we can express the left hand side as $ \frac{\partial}{\partial S})_V \frac{\partial}{\partial V})_S U $, and that we can flip the order here as well. We have:

$$ \frac{\partial}{\partial S})_V \frac{\partial}{\partial V})_S U = \frac{\partial}{\partial V})_S \frac{\partial}{\partial S})_V U $$

And from the two results above, we can say that:

$$ (\frac{\partial T}{\partial V})_S = -(\frac{\partial P}{\partial S})_V $$

And this is indeed our first Maxwell Relation. All the others follow similar logic to the one applied here but using the other three thermodynamic potentials.

Enthalpy Maxwell Relation

Take the differential form of enthalpy ($ dH = TdS + VdP $) and consider the enthalpy, $H$, as a function of its natural variables, $S$ and $P$, such that $H = H(S,P)$. We can find the total differential of enthalpy from this:

$$ dH = (\frac{\partial H}{\partial S})_PdS + (\frac{\partial H}{\partial P})_SdP $$

Now equate this to the differential form to get:

$$ (\frac{\partial H}{\partial S})_PdS + (\frac{\partial H}{\partial P})_SdP = TdS + VdP $$

Equating coefficients of $dS$ and $dP$, we get:

$$ (\frac{\partial H}{\partial S})_P = T $$ $$ (\frac{\partial H}{\partial P})_S = V $$

Differentiating both sides of the first of these expresssions with respect to $P$ while keeping $S$ constant, we get:

$$ \frac{\partial}{\partial P})_S(\frac{\partial H}{\partial S})_P = (\frac{\partial T}{\partial P})_S $$

And differentiating the second expression with respect to $S$ while keeping $P$ constant, we have:

$$ \frac{\partial}{\partial S})_P(\frac{\partial H}{\partial P})_S = (\frac{\partial V}{\partial S})_P $$

By the equality of the mixed second order partial derivatives, these expressions are equivalent, so we have:

$$ (\frac{\partial T}{\partial P})_S = (\frac{\partial V}{\partial S})_P $$

This is our second Maxwell Relation.

Helmholtz Free Energy Maxwell Relation

This follows the same procedure here as we did in the above two, so I will simply include the mathematical steps without much commentary. If any part of this is unclear, please feel free to let me know!

$$ dF = -PdV - SdT $$ $$ \textrm{Consider } F = F(V,T) $$ $$ \Rightarrow dF = (\frac{\partial F}{\partial V})_TdV + (\frac{\partial F}{\partial T})_VdT $$ $$ \Rightarrow (\frac{\partial F}{\partial V})_TdV + (\frac{\partial F}{\partial T})_VdT = -PdV - SdT $$ $$ \Rightarrow (\frac{\partial F}{\partial V})_T = -P, (\frac{\partial F}{\partial T})_V = -S $$ $$ \Rightarrow \frac{\partial}{\partial T})_V(\frac{\partial F}{\partial V})_T = -(\frac{\partial P}{\partial T})_V, $$ $$ \frac{\partial}{\partial V})_T(\frac{\partial F}{\partial T})_V = -(\frac{\partial S}{\partial V})_T $$ $$ \Rightarrow -(\frac{\partial P}{\partial T})_V = -(\frac{\partial S}{\partial V})_T $$

And finally:

$$ \Rightarrow (\frac{\partial P}{\partial T})_V = (\frac{\partial S}{\partial V})_T $$

This is the third Maxwell Relation.

Gibbs Free Energy Maxwell Relation

Again, like the above, I will simply include the mathematical steps here:

$$ dG = VdP - SdT $$ $$ \textrm{Consider } G = G(P,T) $$ $$ \Rightarrow dG = (\frac{\partial G}{\partial P})_TdP + (\frac{\partial G}{\partial T})_PdT $$ $$ \Rightarrow (\frac{\partial G}{\partial P})_TdP + (\frac{\partial G}{\partial T})_PdT = VdP - SdT $$ $$ \Rightarrow (\frac{\partial G}{\partial P})_T = V, (\frac{\partial G}{\partial T})_P = -S $$ $$ \Rightarrow \frac{\partial}{\partial T})_P(\frac{\partial G}{\partial P})_T = (\frac{\partial V}{\partial T})_P, $$ $$ \frac{\partial}{\partial P})_T(\frac{\partial G}{\partial T})_P = -(\frac{\partial S}{\partial P})_T $$

And finally:

$$ \Rightarrow (\frac{\partial V}{\partial T})_P = -(\frac{\partial S}{\partial P})_T $$

And that's our fourth Maxwell Relation.

Conclusions

In this post we derived the four most common Maxwell Relations. There are summarised here:

$$ (\frac{\partial T}{\partial V})_S = -(\frac{\partial P}{\partial S})_V $$ $$ (\frac{\partial T}{\partial P})_S = (\frac{\partial V}{\partial S})_P $$ $$ (\frac{\partial P}{\partial T})_V = (\frac{\partial S}{\partial V})_T $$ $$ (\frac{\partial V}{\partial T})_P = -(\frac{\partial S}{\partial P})_T $$

Keep in mind that these are not the only Maxwell Relations we can find. Indeed, there are other thermodynamic potentials that we can define over a system, each one bringing a Maxwell Relation. In addition, there could be other physical quantities that potentials we discussed here could depend on. For example, we might have a system affected by some magnetic field, in which case, we would have to take that into account for internal energy. And this would change our Maxwell Relation.

Maxwell Relations are useful because often times there are quantities in which we are interested, perhaps like $ (\frac{\partial S}{\partial P})_T $, which are not easily measurable. We can use a Maxwell Relation to change these into ones we can more readily measure, $ -(\frac{\partial V}{\partial T})_P $ for this example.

What's next?

In a future post, we will use these Maxwell Relations to derive relationships between the heat capacities of systems. So be on the lookout for that sometime soon. There's also a mnemonic that helps with remembering the Maxwell Relations about which I may write a brief post.


I hope you found this post informative! Please do feel free to leave a comment below or contact me directly to give me some feedback. Feedback is always appreciated and will help improve the blog and future articles. Thanks!

Update (16/04/2018): A Mnemonic to Remember the Maxwell Relations is now up, here.

Tagged as: physics, thermodynamics, maxwell, maxwellrelations

Related

You may also be interested in:

Prelude to Maxwell Relations: Exact Differentials and Partial Differential Relations

Particle Physics, Part 1: Why is the Standard Model so cool?

Symmetries: The Beauty in Physics


Comments

Subscribe

If you like the blog, please consider subscribing so you can keep updated with what I write. You can subscribe here. Thanks!