Entropy of Ideal-Gas Expansion

Open a valve between a gas-filled flask and an evacuated one, and the gas rushes in to fill both. No work is done, no heat is exchanged, yet something irreversible has clearly happened. That "something" is captured quantitatively by entropy. This example matters because it is the cleanest possible illustration of the Second Law. It shows that entropy is a state function, computable along any convenient reversible path, even when the real process is wildly irreversible. It also cements the distinction between qrev/Tq_{rev}/T and the entropy change itself. This article derives ΔS\Delta S for isothermal and general expansions of an ideal gas. You will see the reversible isothermal case worked from first principles. Then you will see free (Joule) expansion compared directly against it. Finally you will see how both fit into a single general formula for any change in TT and VV.

Key takeaways
  • For an ideal gas, ΔS\Delta S depends only on initial and final states, never on the path taken.
  • Reversible isothermal expansion: ΔS=nRln⁡(V2/V1)\Delta S = nR\ln(V_2/V_1), with ΔU=0\Delta U = 0 and qrev=wrevq_{rev} = w_{rev}.
  • Free expansion into vacuum has q=w=ΔU=0q = w = \Delta U = 0, yet ΔS\Delta S is identical to the reversible case.
  • The general formula ΔS=nCV,mln⁡(T2/T1)+nRln⁡(V2/V1)\Delta S = nC_{V,m}\ln(T_2/T_1) + nR\ln(V_2/V_1) handles any simultaneous TT–VV change.
  • Free expansion is irreversible: ΔSuniverse=ΔSsys>0\Delta S_{universe} = \Delta S_{sys} > 0, since ΔSsurroundings=0\Delta S_{surroundings} = 0.
  • Key idea: Entropy is a state function, so you always calculate ΔS\Delta S using a reversible path, whether or not the real process was reversible.
The core insight

Because entropy is a state function, ΔS\Delta S for any ideal-gas expansion (reversible or not) between the same initial and final (T,V)(T,V) states is always nRln⁡(V2/V1)nR\ln(V_2/V_1) at constant TT; the difference between reversible and irreversible paths shows up not in ΔSsys\Delta S_{sys} but in whether ΔSsurroundings\Delta S_{surroundings} manages to cancel it.

The physical picture

Picture one mole of ideal gas confined to volume V1V_1 inside a cylinder fitted with a frictionless piston, held in a heat bath at temperature TT. If the piston is withdrawn infinitely slowly, the gas pressure is always essentially equal to the external pressure. The gas does maximum possible work, and heat flows in reversibly from the bath to keep TT constant, since ΔU=0\Delta U = 0 for an ideal gas at constant TT. Now consider the opposite extreme: the same gas, same initial volume V1V_1, but this time separated by a stopcock from an evacuated chamber of volume V2−V1V_2 - V_1. Open the stopcock. The gas expands freely against zero external pressure. No work is done on or by the surroundings, no heat crosses the boundary, and the temperature of an ideal gas is unchanged (Joule's experiment showed this directly, since UU depends only on TT for an ideal gas). Both processes start and end at the same TT, V1V_1, V2V_2. Because entropy is a state function, both processes must have the same ΔSsys\Delta S_{sys}. What differs is the fate of the surroundings.

Figure
Reversible expansion versus free expansion between the same states
Same start and end states, two different paths V₁, T (piston) Reversible: piston withdrawn slowly q_rev = w_rev in from bath Gas fills V₂ slowly ΔS_sys = ΔS_surr magnitude, opposite sign ΔS_universe = 0 (reversible) Stopcock: vacuum side Free expansion: q = w = 0, T unchanged Both paths: same ΔS_sys ΔS_sys = nR ln(V₂ ⁄ V₁) Reversible: ΔS_surr = −nR ln(V₂ ⁄ V₁) ΔS_univ = 0 Free expansion: ΔS_surr = 0 (isolated) ΔS_univ = nR ln(V₂ ⁄ V₁) > 0

The second figure below shows the general relation as a surface: ΔS\Delta S depends jointly on the temperature ratio and the volume ratio, and the isothermal expansion is just one slice through it.

Figure
ΔS as a function of volume ratio at fixed temperature
ΔS = nR ln(V₂ ⁄ V₁) for n = 1 mol V₂ ⁄ V₁ ΔS / J K⁻¹ x=1, ΔS=0 x=5, ΔS=8.31×ln5≈13.4 J/K x=10, ΔS=8.31×ln10≈19.1 J/K

The core relations

ΔSsys=nRln⁡ ⁣(V2V1)(isothermal, ideal gas)\Delta S_{sys} = nR\ln\!\left(\frac{V_2}{V_1}\right) \quad (\text{isothermal, ideal gas})

where: nn is moles of gas, R=8.314 J K−1mol−1R = 8.314\ \text{J K}^{-1}\text{mol}^{-1}, V1V_1, V2V_2 are initial and final volumes.

ΔSsys=nCV,mln⁡ ⁣(T2T1)+nRln⁡ ⁣(V2V1)(general T,V change)\Delta S_{sys} = nC_{V,m}\ln\!\left(\frac{T_2}{T_1}\right) + nR\ln\!\left(\frac{V_2}{V_1}\right) \quad (\text{general } T,V \text{ change})

where: CV,mC_{V,m} is molar heat capacity at constant volume, assumed constant over the range.

ΔSsys=nCp,mln⁡ ⁣(T2T1)−nRln⁡ ⁣(p2p1)(equivalent, in T,p)\Delta S_{sys} = nC_{p,m}\ln\!\left(\frac{T_2}{T_1}\right) - nR\ln\!\left(\frac{p_2}{p_1}\right) \quad (\text{equivalent, in } T,p)

where: Cp,m=CV,m+RC_{p,m} = C_{V,m} + R for an ideal gas.

ΔSuniverse=ΔSsys+ΔSsurr,ΔSsurr=−qrev, surr to sysT\Delta S_{universe} = \Delta S_{sys} + \Delta S_{surr}, \qquad \Delta S_{surr} = -\frac{q_{rev,\,surr\,to\,sys}}{T}

where: for free expansion ΔSsurr=0\Delta S_{surr} = 0 because q=0q=0 for the isolated system, giving ΔSuniverse>0\Delta S_{universe} > 0.

Worked examples

Derivation AReversible isothermal expansion of an ideal gas

Goal: find ΔS\Delta S when nn mol of ideal gas expands reversibly and isothermally from V1V_1 to V2V_2 at temperature TT.

Step 1. Start from the thermodynamic definition of entropy. For any reversible path connecting the two states,

dS=dqrevT.dS = \frac{dq_{rev}}{T}.

This is valid here because we are told the path is reversible; entropy itself is path-independent, but we need a reversible path to compute it, and we are lucky enough to already have one.

Step 2. Apply the First Law along this path.

dU=dqrev+dwrev=dqrev−p dV.dU = dq_{rev} + dw_{rev} = dq_{rev} - p\,dV.

For an ideal gas, UU depends only on TT (Joule's law), and TT is constant, so dU=0dU = 0 along this path. Hence

dqrev=p dV.dq_{rev} = p\,dV.

Step 3. Substitute the ideal-gas equation of state. With p=nRT/Vp = nRT/V,

dqrev=nRTV dV.dq_{rev} = \frac{nRT}{V}\,dV.

Step 4. Divide by TT and integrate.

dS=dqrevT=nRV dV⟹ΔS=nR∫V1V2dVV=nRln⁡ ⁣(V2V1).dS = \frac{dq_{rev}}{T} = \frac{nR}{V}\,dV \quad\Longrightarrow\quad \Delta S = nR\int_{V_1}^{V_2}\frac{dV}{V} = nR\ln\!\left(\frac{V_2}{V_1}\right).

Step 5. Recognize path-independence. Because SS is a state function, this expression is the entropy change for any process (reversible or not) connecting the same initial state (T,V1)(T, V_1) to the same final state (T,V2)(T, V_2) — including free expansion, where no reversible path exists physically but one can still be imagined to compute ΔS\Delta S.

ΔS=nRln⁡ ⁣(V2V1)\boxed{\Delta S = nR\ln\!\left(\frac{V_2}{V_1}\right)}

Example 1 — Foundational: reversible isothermal expansion. A sample of 2.00 mol of ideal gas expands reversibly and isothermally at 298 K from 10.0 L to 30.0 L. Find ΔSsys\Delta S_{sys}, ΔSsurr\Delta S_{surr}, qrevq_{rev}, wrevw_{rev}, and ΔSuniverse\Delta S_{universe}. Step 1: Entropy change of the system.

ΔSsys=nRln⁡ ⁣(V2V1)=(2.00 mol)(8.314 J K−1mol−1)ln⁡ ⁣(30.010.0)\Delta S_{sys} = nR\ln\!\left(\frac{V_2}{V_1}\right) = (2.00\ \text{mol})(8.314\ \text{J K}^{-1}\text{mol}^{-1})\ln\!\left(\frac{30.0}{10.0}\right)
=(16.63 J K−1)(1.0986)=18.3 J K−1.= (16.63\ \text{J K}^{-1})(1.0986) = 18.3\ \text{J K}^{-1}.

Step 2: Work done by the gas (reversible, isothermal).

wrev=−nRTln⁡ ⁣(V2V1)=−(2.00)(8.314)(298)ln⁡(3.00)w_{rev} = -nRT\ln\!\left(\frac{V_2}{V_1}\right) = -(2.00)(8.314)(298)\ln(3.00)
=−(4955 J)(1.0986)=−5443 J=−5.44 kJ.= -(4955\ \text{J})(1.0986) = -5443\ \text{J} = -5.44\ \text{kJ}.

(Negative sign: work is done by the gas on the surroundings.) Step 3: Heat absorbed by the gas. Since ΔU=0\Delta U = 0 (isothermal, ideal gas),

qrev=−wrev=+5.44 kJ.q_{rev} = -w_{rev} = +5.44\ \text{kJ}.

Step 4: Entropy change of surroundings. The surroundings lose 5.44 kJ of heat reversibly at 298 K:

ΔSsurr=−qrevT=−5443 J298 K=−18.3 J K−1.\Delta S_{surr} = \frac{-q_{rev}}{T} = \frac{-5443\ \text{J}}{298\ \text{K}} = -18.3\ \text{J K}^{-1}.

Step 5: Total.

ΔSuniverse=18.3+(−18.3)=0.\Delta S_{universe} = 18.3 + (-18.3) = 0.

Sanity check: a reversible process must give exactly zero net entropy change for the universe. It does. ✓

Example 2 — Applied: free expansion versus reversible expansion, same states. The same 2.00 mol of gas at 298 K is instead allowed to expand freely (Joule expansion) from 10.0 L into an evacuated vessel, reaching a final volume of 30.0 L. Compare ΔSsys\Delta S_{sys}, ΔSsurr\Delta S_{surr}, and ΔSuniverse\Delta S_{universe} with Example 1, and then find ΔS\Delta S if the gas simultaneously cools from 298 K to 280 K during a separate, non-isothermal reversible expansion to the same final volume, taking CV,m=32RC_{V,m} = \tfrac{3}{2}R (monatomic ideal gas). Step 1: Since the initial and final states (T=298 K,V1=10.0 L)(T = 298\ \text{K}, V_1 = 10.0\ \text{L}) and (298 K,30.0 L)(298\ \text{K}, 30.0\ \text{L}) are identical to Example 1, and SS is a state function,

ΔSsys=18.3 J K−1(unchanged).\Delta S_{sys} = 18.3\ \text{J K}^{-1} \quad (\text{unchanged}).

Step 2: For free expansion, the system is thermally and mechanically isolated during the process: q=0q = 0 and w=0w = 0, so no heat crosses into the surroundings.

ΔSsurr=0.\Delta S_{surr} = 0.

Step 3: Total entropy change.

ΔSuniverse=18.3+0=+18.3 J K−1>0.\Delta S_{universe} = 18.3 + 0 = +18.3\ \text{J K}^{-1} > 0.

This confirms the process is irreversible, consistent with the Second Law (ΔSuniverse≥0\Delta S_{universe} \geq 0). Step 4: Now the non-isothermal case. Using the general formula with T1=298T_1 = 298 K, T2=280T_2 = 280 K, V1=10.0V_1=10.0 L, V2=30.0V_2 = 30.0 L, n=2.00n=2.00 mol, CV,m=1.5(8.314)=12.47 J K−1mol−1C_{V,m} = 1.5(8.314) = 12.47\ \text{J K}^{-1}\text{mol}^{-1}:

ΔS=nCV,mln⁡ ⁣(T2T1)+nRln⁡ ⁣(V2V1)\Delta S = nC_{V,m}\ln\!\left(\frac{T_2}{T_1}\right) + nR\ln\!\left(\frac{V_2}{V_1}\right)
=(2.00)(12.47)ln⁡ ⁣(280298)+18.3 J K−1= (2.00)(12.47)\ln\!\left(\frac{280}{298}\right) + 18.3\ \text{J K}^{-1}
=(24.94 J K−1)(−0.0620)+18.3 J K−1=−1.55+18.3=16.7 J K−1.= (24.94\ \text{J K}^{-1})(-0.0620) + 18.3\ \text{J K}^{-1} = -1.55 + 18.3 = 16.7\ \text{J K}^{-1}.

Sanity check: cooling lowers entropy (negative first term), expansion raises it (positive second term); since expansion dominates here, ΔS\Delta S is still positive but smaller than the pure isothermal value — physically reasonable.

Limiting cases & common traps

SituationWhat happens to ΔS_sysWhat happens to ΔS_surrΔS_universe
Reversible isothermal expansionnRln⁡(V2/V1)>0nR\ln(V_2/V_1) > 0−nRln⁡(V2/V1)-nR\ln(V_2/V_1)0
Free (Joule) expansion, same statesnRln⁡(V2/V1)>0nR\ln(V_2/V_1) > 0 (same!)0>0> 0
Reversible compression (V2<V1V_2<V_1)negativepositive0
V2=V1V_2 = V_1 (no volume change)0 (isothermal term vanishes)——
Adiabatic reversible expansion0 (by definition of adiabatic reversible)00

The chemist behind it

James Prescott Joule's expansion experiment, cooling an ideal-gas concept into concrete apparatus, showed that gas expanding into a vacuum causes no temperature change, which is exactly what makes ΔU=0\Delta U = 0 and dqrev=p dVdq_{rev}=p\,dV valid in Step 2 of the derivation above. Rudolf Clausius later gave the concept its name and its rigorous mathematical footing through the inequality dS≥dq/TdS \geq dq/T, unifying Joule's empirical observation with the abstract Second Law statement that entropy of an isolated system cannot decrease.

Origins · 1 minRudolf Clausius and how this was discovered
RC
Rudolf Clausius
1822–1888 · coined "entropy" and formulated the Second Law inequality dS ≥ dq/T that governs this very example

Ask the tutor: How does this same free-expansion logic extend to derive the entropy of mixing two different ideal gases?

Why is ΔS the same for reversible and free expansion if one process is "orderly" and the other is "chaotic"?

Entropy is a state function: it depends only on the initial and final thermodynamic states (T,V)(T,V), not on the trajectory connecting them. Both processes here start and end at identical TT, V1V_1, V2V_2, so ΔSsys\Delta S_{sys} must be identical. What differs is ΔSsurroundings\Delta S_{surroundings}: zero for free expansion (isolated, no heat exchanged) but exactly −ΔSsys-\Delta S_{sys} for the reversible path, keeping ΔSuniverse=0\Delta S_{universe}=0 only in the reversible case.

Does free expansion violate the First Law since ΔU = 0 but no work is done?

No violation at all. The First Law states ΔU=q+w\Delta U = q + w. In free expansion both q=0q=0 and w=0w=0 independently, since there is no external pressure to push against and no thermal reservoir contact, so ΔU=0\Delta U = 0 trivially. This happens to coincide with ΔU=0\Delta U=0 from Joule's law (ideal gas, constant TT), but the two zero results come from different physical reasons.

Can ΔS ever be negative for an ideal gas expansion?

Not for isothermal expansion into a larger volume: ln⁡(V2/V1)>0\ln(V_2/V_1) > 0 whenever V2>V1V_2>V_1, making ΔSsys\Delta S_{sys} strictly positive. However, in the general formula, if the gas simultaneously cools enough (large negative ln⁡(T2/T1)\ln(T_2/T_1) term), the net ΔS\Delta S could in principle become negative even with expanding volume, though such a path could not occur spontaneously in an isolated system.

How does this connect to entropy of mixing?

Mixing two different ideal gases, each initially confined to its own volume, then allowed to occupy the combined volume, is mathematically two independent free expansions happening simultaneously. Each gas's partial pressure drops as it expands into the shared volume, and the total entropy of mixing sums two terms of the form nRln⁡(Vfinal/Vinitial)nR\ln(V_{final}/V_{initial}), one per gas. This is developed in detail in the treatment of entropy of mixing.

Why use R and not the Boltzmann constant k in these formulas?

RR and kBk_B describe the same physics at different scales: R=NAkBR = N_A k_B, where NAN_A is Avogadro's number. Since these formulas are written per mole (nn moles of gas), the molar gas constant RR is the natural choice. Working per molecule instead, you would use kBk_B and replace nn with the number of molecules NN; the statistical mechanical derivation via S=kBln⁡WS = k_B \ln W gives the identical numerical result.

Before this