Skip to main content
Physics LibreTexts

10.2: Maxwell’s Demon

  • Page ID
    32052
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    There is a very interesting thought experiment due to Maxwell which is perhaps best phrased as a potential violation of the second law of thermodynamics. The resolution of this problem highlights the role of entropy as information.

    We consider a gas of particles in equilibrium in a box at some temperature \(T\). The velocities of the particles follow the Maxwell distribution from Equation 7.3.7,

    \[f(v)d^3v = \left( \frac{m}{2 \pi kT} \right)^{\frac{3}{2}} \text{exp} \left( -\frac{mv}{2kT} \right)\;d^3v \label{10.2.1} \]

    The mean square speed given by

    \[ \langle v^2 \rangle = \frac{3kT}{m} \label{10.2.2} \]

    may be used as a measure of the temperature. Now we consider a partition which divides the box into two parts. Further, we consider a small gate in the partition which can be opened and closed and requires a very small amount of energy, which can be taken to be zero in an idealized limit. Further, we assume there is a creature (“Maxwell’s demon") with a large brain capacity to store a lot of data sitting next to this box. Now the demon is supposed to do the following. Every time he sees a molecule of high speed coming towards the gate from the left side, he opens the gate and lets it through to the right side. If he sees a slowly moving molecule coming towards the gate from the right side, he opens it and lets the molecule through to the left side. If he sees a slow-moving molecule on the left side, or a fast-moving one on the right side, he does nothing. Now after a while, the mean square speed on the left will be smaller than what it was originally, showing that the temperature on the left side is lower than \(T\). Correspondingly, the mean square speed on the right side is higher and so the temperature there is larger than \(T\). Effectively, heat is being transferred from a cold body (left side of the box) to a hot body (the right side of the box). Since the demon imparts essentially zero energy to the system via opening and closing the gate, this transfer is done with no other change, thus seemingly providing a violation of the second law. This is the problem.

    We can rephrase this in terms of entropy change. To illustrate the point, it is sufficient to consider the simple case of \(N\) particles in the volume \(V\) forming an ideal gas with the demon separating them into two groups of \( \frac{N}{2} \) particles in volume \( \frac{V}{2} \) each. If the initial temperature is \(T\) and the final temperatures are \(T_1\) and \(T_2\), then the conservation of energy gives \(T = \frac{1}{2} (T_1 + T_2)\). Further, we can use the the Sackur-Tetrode formula (7.2.25) for the entropies,

    \[ S\;=\;N\;k\;\left[ \frac{5}{2} + \log \left( \frac{V}{N} \right) + \frac{3}{2}\log \left( \frac{U}{N} \right) + \frac{3}{2}\log \left( \frac{4 \pi m}{3(2 \pi ħ)^2} \right) \right] \label{10.2.3}\]

    The change in entropy when the demon separates the molecules is then obtained as

    \[ ∆S = S_1 + S_2 − S = \frac{3N}{2} \log \left( \frac{\sqrt{T_1T_2}}{T} \right) \label{10.2.4} \]

    Since

    \[ \left( \frac{T_1 + T_2}{2} \right)^2 = T_1 T_2 + \left( \frac{T_1 - T_2}{2} \right)^2 ≥ T_1T_2 \label{10.2.5} \]

    we see that \(∆S ≤ 0\). Thus the process ends up decreasing the entropy in contradiction to the second law.

    The resolution of this problem is in the fact that the demon must have information about the speeds of molecules to be able to let the fast ones to the right side and the slow ones to the left side. This means that using the Sackur-Tetrode formula for the entropy of the gas in the initial state is not right. We are starting off with a state of entropy (of gas and demon combined) which is less than what is given by Equation \ref{10.2.3}, once we include the information carried by (or obtained via the observation of velocities by) the demon, since the specification of more observables decreases the entropy as we have seen in the last section. While it is difficult to estimate quantitatively this entropy, the expectation is that with this smaller value of \(S\) to begin with, \(∆S\) will come out to be positive and that there will be no contradiction with the second law. Of course, this means that we are considering a generalization of the second law, namely that the entropy of an isolated system does not decrease over time, provided all sources of entropy in the information-theoretic sense are taken into account.


    This page titled 10.2: Maxwell’s Demon is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by V. Parameswaran Nair.

    • Was this article helpful?