Maxwell's 'demon', which seems on the face of it to disprove the second law of thermodynamics, has a curious place in the development of the study of energy physics. Even today, the story is surprising. One surprise is that James Clerk Maxwell himself did not spot the flaw in his own argument. After all, far from being a slouch, he was probably the outstanding scientist of the nineteenth century. A second surprise is that generations of physics students have been given the impression that Maxwell's demon is a true paradox, thereby needlessly obfuscating the whole question of the second law.
According to the historian P. M. Harman, the demon first appeared in 1867 when P. G. Tait, professor of natural philosophy at the University of Edinburgh, asked Maxwell to comment on a manuscript entitled A Sketch of Thermodynamics (it was published the following year). Maxwell promised to “pick some holes here and there”, and duly created the demon as a means of demonstrating that the second law is statistical and therefore has a different status from 'dynamic' laws such as those of Newton.
A deeply religious man, Maxwell would not have called his device, essentially a gedanken (thought) experiment, a 'demon'. That term was coined by William Thomson (later Lord Kelvin). In his reply to Tait, Maxwell envisaged a vessel separated into two halves by a diaphragm, with each half containing equal numbers of gas molecules, but those on one side “having the greater energy of motion”.
He continued: “Now conceive a finite being who knows the paths and velocities of all the molecules by simple inspection but who can do no work, except to open and close a door in the diaphragm, by means of a slide without mass.” The finite being's task is first to select a molecule from one half with below-average velocity and to let it through his door, and then to select a molecule from the other side with a greater-than-average velocity and to let that pass in the other direction, preserving the quantities of gas in the two halves. It will then be found that “the hot system has got hotter and the cold colder and yet no work has been done, only the intelligence of a very observant and neat fingered being has been employed”.
On the face of things, this outcome may be taken as a disproof of the second law of thermodynamics in its simple form: “that heat does not flow from a colder to a hotter body without the expenditure of work,” as Maxwell put it. Now, in the era of quantum physics, we know that collecting information about the velocities of all the molecules in the two compartments — by means of a Doppler measurement of scattered X-rays, for example — would entail the expenditure of work and the selective transfer of energy to individual molecules. Maxwell's demon is therefore no longer regarded as a limitation of the second law.
It is, however, also fair to ask whether Maxwell's mechanism would have been effective, in the manner he outlined, even in the classical world that he inhabited (albeit whose foundations he had already helped to weaken with the electromagnetic theory of radiation). Unfortunately, the design of the movable element of the demon's door is undefined except as a “slide”, perhaps a piece of the diaphragm that separates the two volumes of gas. Presumably, it is constrained to move only in one direction by appropriate frictionless flanges, and of course the hole in the diaphragm would need to be commensurate with, but larger than, the diameter of the gas molecules.
The movable cover has one overriding function: to reflect back into the originating half of the vessel those molecules that do not satisfy the criteria of the demon's selection programme. There are two ways in which this might be achieved. Either the cover has enough inertial mass to reflect all molecules that impact upon it (in which case the demon would have to do work to move it before the calculated impact of a molecule, which contradicts the hypothesis) or it is an elastic membrane without mass.
Unfortunately, for the demon's supposed functioning, the second possibility would be subject to the constraints of the second law. First, in the normal impact of a molecule of velocity v, the molecule would first do work on the membrane of amount 0.5mv2, where m is the molecular mass, depositing that energy as heat. On the assumption that the elasticity of the membrane is unchanged by this dissipation of heat, the molecule would then rebound back into the container from whence it came with its original velocity.
But tensile strength is a decreasing function of temperature for all real materials, implying that molecules can be returned with their original velocities only if the heat conductivity of the membrane and of its connections to the underlying diaphragm is infinite. Nobody knows how the elastic properties of massless membranes vary with temperature, but their tensile strength cannot increase with increasing temperature, for that would be a means by which the temperature of the gas on each side of the diaphragm could spontaneously increase.
What this implies is that the functioning of Maxwell's demon must itself contradict the second law. Inevitably, it must be a device for creating negative entropy, which makes it entirely unsuitable as an element in a thought experiment that is meant to demonstrate the limitations of the second law of thermodynamics.
Harman, P. M. The Natural Philosophy of James Clerk Maxwell (Cambridge Univ. Press, 1998).