# Lecture 23: The Second Law of Thermodynamics and Entropy

## Physics I — Mechanics & Thermodynamics

---

## Learning Objectives

By the end of this lecture, students will be able to:

1. State the second law of thermodynamics in its various formulations
2. Define entropy and calculate entropy changes for reversible processes
3. Explain why entropy increases in irreversible processes
4. Apply the second law to determine whether a process is possible or impossible
5. Connect the macroscopic concept of entropy to microscopic disorder
6. Understand the concept of reversible vs. irreversible processes

---

## Lecture Content

### I. Limitations of the First Law

The first law of thermodynamics (conservation of energy) does not tell us the **direction** of spontaneous processes. A hot cup of coffee cools down, but it never spontaneously heats up, even though energy conservation would permit it. Gas expands to fill a room, but never spontaneously compresses into one corner. A bouncing ball comes to rest, but a ball at rest never spontaneously begins bouncing. The first law is satisfied by both the forward and reverse directions of all these processes, yet only the forward direction occurs naturally. The **second law of thermodynamics** provides the missing directional information.

### II. Statements of the Second Law

The second law can be stated in several equivalent ways. The **Clausius statement** says that heat does not spontaneously flow from a cold body to a hot body; moving heat from cold to hot requires work input, as in refrigerators and heat pumps. The **Kelvin-Planck statement** says that it is impossible to construct a heat engine that converts heat completely into work with no other effect; some heat must always be exhausted to a cold reservoir, so no heat engine can be 100% efficient. The **entropy statement** says that in any real (irreversible) process, the total entropy of the universe increases: Delta S_universe >= 0, with equality holding only for reversible processes. All three statements are logically equivalent.

### III. Reversible and Irreversible Processes

A **reversible process** can be reversed by an infinitesimal change in conditions, passing through a continuous sequence of equilibrium states. Such processes are idealized: they occur infinitely slowly (quasi-statically), with no friction, turbulence, or heat transfer across a finite temperature difference. An isothermal expansion or compression performed infinitely slowly is an example.

An **irreversible process** cannot be undone without leaving some change in the surroundings. All real processes are irreversible to some degree. Examples include free expansion of a gas, heat conduction across a temperature difference, friction, and mixing. Reversible processes matter because they are the theoretical ideals that set the maximum possible efficiency for any engine or device.

### IV. Entropy — Definition

**Entropy** (S) is a state function that quantifies the disorder or the number of available microstates of a system. The thermodynamic definition, due to Clausius, is dS = dQ_rev / T. For a finite reversible process, Delta S = integral of dQ_rev / T.

Although heat Q is a path-dependent quantity, entropy change depends only on the initial and final states because it is a state function. To calculate Delta S for an irreversible process, one finds any reversible path between the same initial and final states and integrates dQ_rev / T along that path. The SI unit of entropy is J/K.

### V. Entropy Changes for Common Processes

For an **isothermal process** at constant T, Delta S = Q_rev / T. For example, the isothermal expansion of an ideal gas gives Delta S = nR ln(V_f / V_i). For a **temperature change** at constant volume or pressure, Delta S = n C ln(T_f / T_i), where C is C_V or C_P as appropriate, assuming C is constant over the temperature range. For a **phase change** at constant temperature, Delta S = Q / T = mL / T. Melting increases entropy (a solid becoming a liquid gains disorder), and boiling increases it significantly more (a liquid becoming a gas gains far more disorder).

**Free expansion** of a gas into vacuum is particularly instructive. Here Q = 0, W = 0, and Delta U = 0 for an ideal gas. Yet Delta S > 0, because entropy increases even though no heat was exchanged. The entropy change is Delta S = nR ln(V_f / V_i), the same as for a reversible isothermal expansion between the same states.

For **heat transfer between two objects** at different temperatures, the total entropy change Delta S_total = Delta S_hot + Delta S_cold is always positive for spontaneous heat transfer, confirming the directionality observed in nature.

<image>Panel A: An insulated container divided by a partition. On the left, gas molecules are confined; on the right, vacuum. The partition is removed (free expansion). After expansion, molecules fill the entire container. Delta S > 0 is written, even though Q = 0. Panel B: A diagram showing heat Q flowing from a hot reservoir at T_H to a cold reservoir at T_C. The entropy decrease of the hot reservoir (Delta S_H = -Q/T_H) is smaller in magnitude than the entropy increase of the cold reservoir (Delta S_C = +Q/T_C), so Delta S_total = Q(1/T_C - 1/T_H) > 0. This is annotated to explain why heat flows from hot to cold.</image>

### VI. The Second Law in Terms of Entropy

**For an isolated system**, Delta S >= 0. Entropy can only remain the same (in a reversible process) or increase (in an irreversible process). The entropy of the universe never decreases.

**For a non-isolated system**, the system's entropy can decrease, as when water freezes, but only if the surroundings' entropy increases by an equal or greater amount: Delta S_universe = Delta S_system + Delta S_surroundings >= 0. The second law therefore determines the direction of spontaneous processes: nature moves toward states of higher total entropy. At equilibrium, entropy is maximized and no further spontaneous change occurs.

### VII. Microscopic Interpretation of Entropy

Boltzmann provided a microscopic definition of entropy: S = k_B ln(Omega), where k_B = 1.38 x 10^-23 J/K is the Boltzmann constant and Omega is the number of microstates (microscopic arrangements) consistent with the macroscopic state. A macrostate with more microstates is more probable and has higher entropy. Gas filling an entire container has an enormous number of microstates and high entropy, whereas gas confined to one half of the container has far fewer microstates and lower entropy. The probability of spontaneously returning to the confined state is astronomically small.

The second law is fundamentally **statistical**: it is overwhelmingly probable, rather than absolutely certain, that entropy increases. For macroscopic systems containing on the order of 10^23 particles, the probability of a spontaneous entropy decrease is so vanishingly small as to be effectively impossible.

There is also an intimate connection between entropy and information. Higher entropy corresponds to less knowledge about the system's specific microstate, while lower entropy means more order and more information.

<image>Panel A: A box with 4 gas molecules. All possible arrangements are listed: all 4 on the left (1 way), 3 on left / 1 on right (4 ways), 2 on left / 2 on right (6 ways), 1 on left / 3 on right (4 ways), all 4 on right (1 way). The most probable macrostate (2-2 split, 6 microstates) has the highest entropy. Panel B: A bar graph of number of microstates vs. macrostate for a larger system (e.g., 100 molecules), showing a sharply peaked distribution around the even split. The peak represents the equilibrium state with maximum entropy. The connection S = k_B ln(Omega) is written below.</image>
