The question the second law leaves open
Put a hot block against a cold one and heat crosses in one direction only. You have never seen the cold one get colder while the hot one gets hotter, even though energy would balance perfectly if it did. In the last lesson you met Carnot's result: no engine running between and can beat . That was a statement about engines. But the ban on cold-to-hot heat flow is not about engines at all, and neither is the fact that a gas released into a vacuum never gathers itself back into one corner.
So there must be some quantity that keeps score. Something that goes up when a process runs the way processes actually run, and that would have to go down for the backwards version, which is why the backwards version never happens. That quantity is entropy, and the useful thing about it is that you can compute it with numbers and units, not just wave at it.
A quantity that depends only on where you are
Start from the Carnot engine, because it is the one process you already know exactly. Over one cycle it takes from the hot reservoir and dumps into the cold one, and Carnot's efficiency forces
Rearrange that into . Count heat going into the working substance as positive and heat leaving as negative, and the two terms cancel: the sum of around the whole cycle is zero. Heat itself does not come back to zero over a cycle: the engine absorbed more than it rejected, that was the point. But heat divided by the temperature at which it crossed does.
A quantity whose total change around any closed loop is zero is a state function: its value depends only on which state you are in, not on how you got there. You have met one before: potential energy has exactly this property, which is why between two points does not care about the path. So define entropy by its changes along a reversible path:
Read it in words. is a small amount of heat entering the system, in joules, and is the absolute temperature in kelvin at which it enters. Their ratio has units of J/K, and that is what entropy is measured in. Heat in raises entropy; heat out lowers it. The same joule bought at a low temperature buys more entropy than at a high one, because you are dividing by a smaller number.
The subscript "rev" is doing real work and is not decoration. The formula only tells you if you evaluate it along a reversible path, one where the system has a single well-defined temperature at every instant. Real processes usually do not. That sounds crippling. In a moment it turns out to be the source of the technique.
Absolute temperature, always. A kelvin in the denominator, never a celsius reading. Writing for a process at C instead of is the single most common arithmetic wreck in this topic.
The three integrals you will actually do
Almost every entropy calculation in a problem set is one of three shapes.
A reservoir, or anything at fixed temperature. If never changes, it comes out of the integral and . A "large bath", a "huge reservoir", a furnace wall "held at 400 K": these are all telling you that the body is big enough that the heat you give it does not shift its temperature. Melting and boiling are in this family too, because a phase change happens at one fixed temperature: .
A body that warms up. Here changes as the heat goes in, so you need the integral. With heat capacity held constant, , and
That is the whole of the calculus you need here: the integral of is . If you have not met logarithms in this role, all you need is that and that of a number less than 1 is negative, so cooling gives negative entropy change, as it should.
An ideal gas going anywhere. Put the first law inside the definition. For moles, , and , so
Integrate each piece and you get two logs:
Nothing but the endpoints survives. The path that got the gas there has vanished from the answer, which is the state-function property showing up concretely. Set and you have the isothermal case, . Set and you have constant-volume heating. For constant pressure it is easier to swap in and the temperature ratio, , since at fixed pressure the volume ratio equals the temperature ratio anyway.
Quick check
A gas in an insulated cylinder is compressed slowly and reversibly by a piston. What is its entropy change?
Invent a path
Since depends only on the endpoints, you are free to reach them any way you like. This is a licence, and it is the central trick of the topic.
The real process might be violent: a partition yanked out, two blocks slammed together, a paddle stirring a fluid. None of those has a reversible path, and at no instant does the system have one temperature you could put in a denominator. So do not use the real process. Write down the initial state and the final state, throw away everything that happened in between, and invent a slow reversible path connecting the same two states. The number you get is the entropy change of the real process, because entropy does not know the difference.
Take the standard case. One mole of ideal gas sits behind a partition in an insulated box; you remove the partition and it fills twice the volume. No heat entered, no work was done on anything, so the internal energy and therefore the temperature are unchanged. The substitute path is a slow isothermal expansion from to , and along it J/K. That is the answer for the free expansion too.
Saying the free expansion has because . The was true of the real, irreversible path, and that path is not one the definition accepts. Whenever a process is sudden, unresisted, or driven by a finite temperature difference, stop and build a reversible substitute before you put anything over a .
Entropy of the universe, and why it only goes up
The system is never the whole story. Add up the entropy change of everything involved (the system plus every reservoir it touched) and call it . The second law, in its most usable form, says this total is zero for a reversible process and strictly positive for a real one. It never goes down.
You can see where the positivity comes from with the simplest irreversible process there is. Let leak from a body at to one at , both big enough not to change temperature:
Positive whenever , which is the only direction it runs. Try it backwards and the expression flips sign, which is the ban you were looking for at the start. And notice what happens as : the entropy generated goes to zero. That is why reversible heat transfer has to happen across a vanishing temperature difference, and hence infinitely slowly.
A real engine is the same bookkeeping. The working substance returns to its initial state each cycle, so its own is zero; all the entropy shows up in the reservoirs, . Carnot's engine makes that exactly zero. Every worse engine rejects more heat than Carnot's and makes it positive. So Carnot's limit is not a separate law: it is what looks like when you apply it to an engine.
Worked examples
One. Heating a pot of water. 2.0 kg of water, J/kg·K, taken slowly from C to C. The body warms, so this is the log case. First convert: K, K. The heat capacity is J/K. Then
Positive, because heat went in. If you had used with J you would have had to pick a , and there is no single right one to pick: that is the signal that the log is required.
Two. A hot ball in a cold bath. A 0.50 kg lead ball, J/kg·K, at C, dropped into a very large water bath held at C. Find the entropy change of ball plus bath.
Two bodies, two different treatments, and that is the whole lesson of this example. The ball's temperature slides from 373 K to 293 K, so it gets the log:
The bath does not change temperature, so it gets . The heat it receives is what the ball gave up, J, arriving at 293 K:
Total: J/K. Positive, as it must be, because dropping a hot thing into a cold bath is irreversible. The ball's loss is real; the bath's gain is bigger because the joules arrived at a lower temperature than they left.
Three. Both variables moving. 2.0 mol of a monatomic ideal gas, , goes from 300 K at volume to 250 K at along "some complicated path". The phrase is a gift: it means you are not supposed to care. Use the two-log formula.
Temperature term: J/K, and , giving J/K. Volume term: J/K, and , giving J/K. Add them:
Cooling pulled entropy down, expanding pushed it up more.
Four. Squeezing work out of a cooling block. A 1.0 kg copper block, J/kg·K, starts at 500 K and is used as the hot source of a reversible engine whose cold reservoir is a huge bath at 300 K. The engine runs until the block has cooled to 300 K. How much work comes out?
You cannot use directly, because is falling the whole time. Use entropy instead. Reversible means , and that one equation is enough.
The block cools from 500 K to 300 K, so its entropy change is the log case:
The bath is at fixed 300 K, so its entropy change is . For the total to be zero, , giving J. The heat the block gave up is straightforward energy bookkeeping: J. Energy in equals energy out, so
About 18.0 kJ, out of 77.2 kJ available: an overall efficiency of 23%, below the 40% a Carnot engine gets at a fixed 500 K, because the source spends most of its life cooler than that. The same move (set and solve) handles two finite bodies driven to a common temperature, where the condition collapses to , the geometric mean rather than the average.
Quick check
Two identical blocks at 400 K and 200 K end at a common temperature. In which case is the final temperature lower: placed in direct contact, or connected through a reversible engine?
What entropy is counting
The formula came from engines, but the meaning comes from counting. A macrostate is what you can measure: pressure, temperature, how many molecules are on the left. A microstate is one specific arrangement of every molecule. Boltzmann's result is that
where is the number of microstates in the macrostate and J/K. Take four labelled molecules in a box you imagine split down the middle. "All four on the left" can happen exactly one way, . "Two on each side" can happen ways. So the even split has more entropy by J/K.
The log is what makes this match the thermodynamic entropy: counts multiply when you combine systems, logs add, and entropy is additive. It also explains the free expansion in one line. Double the volume and each of molecules has twice as many places to be, so is multiplied by and . For a mole, , and you are back to . Two routes, the same number.
Recognising an entropy problem
Reach for entropy when you see any of these.
The question asks directly for "the entropy change of the universe", or of a body, in J/K. That is the obvious one, and the work is just deciding, for each body in the problem, whether it is a reservoir (), a phase change (), a body that warms (), or a gas (two logs).
A process is described as sudden, free, unresisted, or as happening across a finite temperature gap. Those words mean irreversible, which means invent a path, and they also mean the answer for the universe will be positive. If you get a negative total, you have made a sign error.
The word "reversible" appears and a temperature is changing. Then is an equation you can solve, and it is usually the only one that gives you the unknown: the maximum work, or the final common temperature. This is the pattern that turns a very hard problem into two lines.
A problem gives you a complicated or unspecified path between two known states. That is an invitation to ignore the path entirely.
You now have both halves of the second law: the engine statement from the previous lesson and the entropy statement here. Next you put them on a picture, where areas are work and the shape of the loop tells you what the cycle is doing, in PV diagrams and real cycles.