Isothermal Expansion of an Ideal Gas

Picture a gas-filled cylinder sitting in a large water bath at constant temperature, with a piston free to move outward. As the gas expands, it pushes the piston and does work on the surroundings, yet a thermometer in the bath never budges. Where does the energy for that work come from, and why does the answer depend on exactly how you let the piston move? This question sits at the heart of the First Law of thermodynamics and explains why "reversible" and "irreversible" are not just jargon but numbers you can calculate. Isothermal expansion of an ideal gas is the cleanest system for seeing that work is path-dependent while internal energy is not. This article derives the work, heat, and internal-energy change for both reversible and single-stage (irreversible) isothermal expansions. You will see the key integral worked out in full. Then you will apply it to two numeric examples. Finally you will see how this result sets up heat capacities and adiabatic processes.

Key takeaways
  • For an ideal gas, ΔU=0\Delta U = 0 in any isothermal process, because UU depends only on TT.
  • The First Law then forces q=−wq = -w: all work done is exactly compensated by heat flow.
  • Reversible isothermal work is wrev=−nRTln⁡(V2/V1)w_{rev} = -nRT\ln(V_2/V_1), the maximum work extractable from expansion.
  • Irreversible (single-stage, constant external pressure) expansion does less work in magnitude, since wirrev=−Pext(V2−V1)w_{irrev} = -P_{ext}(V_2 - V_1).
  • The gap between wrevw_{rev} and wirrevw_{irrev} is "lost work," the thermodynamic cost of running a process too fast.
  • Key idea: internal energy is a state function fixed by TT alone, but work and heat split the energy budget differently depending on the path taken between the same two states.
The core insight

Because UU depends only on temperature for an ideal gas, any isothermal path between the same initial and final volumes gives ΔU=0\Delta U = 0, so all the work the gas does must be paid for, exactly and instantaneously, by heat absorbed from the surroundings; the size of that work (and heat) payment depends on the path, and the reversible path always extracts the maximum possible work.

The physical picture

Consider one mole of an ideal gas confined in a cylinder with a movable, frictionless piston, immersed in a huge thermal reservoir held at temperature TT. The gas starts at volume V1V_1 and pressure P1P_1, and ends at volume V2>P1V_2 > P_1's corresponding volume — that is, the gas expands to V2V_2. Because the reservoir is enormous, the gas temperature stays pinned at TT throughout, no matter how much heat flows. Two extreme ways to run this expansion give very different work outputs. In a reversible expansion, the external pressure is adjusted at every instant to be only infinitesimally less than the gas pressure, so the gas is always essentially in equilibrium. This requires an infinite sequence of tiny steps — in practice, an idealization approached by very slow expansion. In an irreversible (single-stage) expansion, the external pressure is dropped abruptly to its final value P2P_2 and held there; the gas rushes out against this constant, lower resistance until it reaches equilibrium. Both processes start and end at the same TT, V1V_1, V2V_2. Since UU is a state function of TT only for an ideal gas, ΔU=0\Delta U = 0 for both paths. But the paths trace different curves on a PP-VV diagram, and the area under each curve — the work — is different.

Figure
Reversible versus single-stage irreversible expansion on a P–V diagram, same endpoints
V P reversible isotherm P proportional to 1/V single-stage: constant P2 from V1 to V2 V1 V2 P1 P2 shaded area under each curve equals magnitude of work done by gas

The blue curve is the reversible isotherm, P=nRT/VP = nRT/V; the dashed red path is the single abrupt drop to P2P_2. The reversible curve always lies above the irreversible one between V1V_1 and V2V_2, so the area under it — the reversible work — is always larger.

Figure
Energy bookkeeping for the two paths, same ΔU = 0
Reversible path w_rev = -nRT ln(V2/V1) q_rev = +nRT ln(V2/V1) ΔU = q_rev + w_rev = 0 Irreversible path w_irrev = -P2(V2 - V1) q_irrev = +P2(V2 - V1) ΔU = q_irrev + w_irrev = 0 Both give ΔU = 0, but the magnitudes of w and q differ between the two paths.

The core relations

ΔU=0(ideal gas, isothermal process)\Delta U = 0 \quad (\text{ideal gas, isothermal process})

where: UU depends on TT alone for an ideal gas, so any process with T1=T2T_1 = T_2 has zero internal-energy change.

wrev=−nRTln⁡V2V1=−nRTln⁡P1P2w_{rev} = -nRT\ln\frac{V_2}{V_1} = -nRT\ln\frac{P_1}{P_2}

where: nn = moles, RR = gas constant, TT = absolute temperature, V1,V2V_1, V_2 = initial/final volumes, sign convention: ww is work done on the gas.

qrev=−wrev=nRTln⁡V2V1q_{rev} = -w_{rev} = nRT\ln\frac{V_2}{V_1}

where: heat absorbed by the gas from the reservoir exactly balances the work it performs.

wirrev=−Pext(V2−V1)w_{irrev} = -P_{ext}(V_2 - V_1)

where: PextP_{ext} is the (constant) external pressure applied during a single-stage expansion, typically Pext=P2P_{ext} = P_2.

∣wrev∣≥∣wirrev∣for expansion (V2>V1)|w_{rev}| \geq |w_{irrev}| \quad \text{for expansion } (V_2 > V_1)

where: the reversible path always extracts the maximum work obtainable between the same two states, consistent with the Maximum Work Theorem.

Derivation AWork and heat for the reversible isothermal expansion

Goal. Find wrevw_{rev}, qrevq_{rev}, and ΔU\Delta U for one mole of ideal gas expanding reversibly and isothermally from V1V_1 to V2V_2 at temperature TT.

Step 1: Set up the differential work. For any process, the work done on the gas as it changes volume by dVdV against an external pressure is

dw=−Pext dV.dw = -P_{ext}\,dV.

In a reversible process the gas is never far from equilibrium, so PextP_{ext} equals the gas's own pressure PP at every instant:

dwrev=−P dV.dw_{rev} = -P\,dV.

Step 2: Insert the ideal-gas equation of state. Since PV=nRTPV = nRT, we have P=nRT/VP = nRT/V. At constant TT, this substitution is valid at every point along the path:

dwrev=−nRTV dV.dw_{rev} = -\frac{nRT}{V}\,dV.

Step 3: Integrate from V1V_1 to V2V_2. Because TT is constant, nRTnRT comes out of the integral:

wrev=−nRT∫V1V2dVV=−nRT[ln⁡V]V1V2=−nRTln⁡V2V1.w_{rev} = -nRT\int_{V_1}^{V_2}\frac{dV}{V} = -nRT\left[\ln V\right]_{V_1}^{V_2} = -nRT\ln\frac{V_2}{V_1}.

For an expansion, V2>V1V_2 > V_1, so ln⁡(V2/V1)>0\ln(V_2/V_1) > 0 and wrev<0w_{rev} < 0: the gas does work on the surroundings (energy leaves the gas as work).

Step 4: Use the ideal-gas law to rewrite in terms of pressure. Since P1V1=P2V2=nRTP_1 V_1 = P_2 V_2 = nRT at fixed TT, we have V2/V1=P1/P2V_2/V_1 = P_1/P_2, giving the equivalent form

wrev=−nRTln⁡P1P2.w_{rev} = -nRT\ln\frac{P_1}{P_2}.

Step 5: Apply the First Law. The First Law states ΔU=q+w\Delta U = q + w. For an ideal gas, U=U(T)U = U(T) only (a consequence of the equation of state and the vanishing of intermolecular forces — Joule's law). Since T1=T2=TT_1 = T_2 = T,

ΔU=0.\Delta U = 0.

Substituting into the First Law:

0=qrev+wrev⟹qrev=−wrev=nRTln⁡V2V1.0 = q_{rev} + w_{rev} \quad\Longrightarrow\quad q_{rev} = -w_{rev} = nRT\ln\frac{V_2}{V_1}.

Step 6: Box the result.

wrev=−nRTln⁡V2V1,qrev=nRTln⁡V2V1,ΔU=0\boxed{w_{rev} = -nRT\ln\frac{V_2}{V_1}, \qquad q_{rev} = nRT\ln\frac{V_2}{V_1}, \qquad \Delta U = 0}

This is the maximum work obtainable from the expansion between V1V_1 and V2V_2: any faster, less-controlled path does less work in magnitude, as the next section shows numerically.

Worked examples

Example 1 — Foundational: reversible vs. irreversible expansion of an ideal gas. Suppose 2.00 mol of an ideal gas at T=298 KT = 298\text{ K} expands isothermally and reversibly from V1=10.0 LV_1 = 10.0\text{ L} to V2=30.0 LV_2 = 30.0\text{ L}. Reversible work:

wrev=−nRTln⁡V2V1=−(2.00 mol)(8.314 J K−1mol−1)(298 K)ln⁡30.010.0w_{rev} = -nRT\ln\frac{V_2}{V_1} = -(2.00\text{ mol})(8.314\text{ J K}^{-1}\text{mol}^{-1})(298\text{ K})\ln\frac{30.0}{10.0}
wrev=−(2.00)(8.314)(298)ln⁡(3.00)=−(4955.1 J)(1.0986)=−5443 Jw_{rev} = -(2.00)(8.314)(298)\ln(3.00) = -(4955.1\text{ J})(1.0986) = -5443\text{ J}

So wrev=−5.44 kJw_{rev} = -5.44\text{ kJ} (work done on the gas is negative — the gas does 5.44 kJ of work on the surroundings). Heat and ΔU:

ΔU=0,qrev=−wrev=+5.44 kJ\Delta U = 0, \qquad q_{rev} = -w_{rev} = +5.44\text{ kJ}

The gas absorbs 5.44 kJ of heat from the reservoir and converts every joule of it into work, exactly maintaining TT. Now compare a single-stage irreversible expansion against a constant external pressure equal to the final pressure P2P_2. First find P2P_2:

P2=nRTV2=(2.00)(8.314)(298)30.0×10−3 m3=4955.1 J0.0300 m3=165,170 Pa=1.652 barP_2 = \frac{nRT}{V_2} = \frac{(2.00)(8.314)(298)}{30.0\times10^{-3}\text{ m}^3} = \frac{4955.1\text{ J}}{0.0300\text{ m}^3} = 165{,}170\text{ Pa} = 1.652\text{ bar}

Irreversible work:

wirrev=−P2(V2−V1)=−(165,170 Pa)(30.0−10.0)×10−3 m3w_{irrev} = -P_2(V_2 - V_1) = -(165{,}170\text{ Pa})(30.0 - 10.0)\times10^{-3}\text{ m}^3
wirrev=−(165,170)(0.0200 m3)=−3303 J=−3.30 kJw_{irrev} = -(165{,}170)(0.0200\text{ m}^3) = -3303\text{ J} = -3.30\text{ kJ}

So ∣wirrev∣=3.30 kJ<∣wrev∣=5.44 kJ|w_{irrev}| = 3.30\text{ kJ} < |w_{rev}| = 5.44\text{ kJ}, confirming the reversible path extracts more work. Correspondingly qirrev=+3.30 kJq_{irrev} = +3.30\text{ kJ} — less heat is drawn from the reservoir, since less work needs paying for. Note ΔU=0\Delta U = 0 for both paths: the difference between 5.44 kJ and 3.30 kJ of work is not stored in the gas; it is simply work that was never done, and heat that was never withdrawn from the bath.

Example 2 — Applied: comparing three expansions to find the "lost work." A chemical engineer wants to quantify the efficiency penalty of running an isothermal expansion irreversibly instead of reversibly. Take 1.00 mol of ideal gas at T=350 KT = 350\text{ K}, expanding from P1=5.00 barP_1 = 5.00\text{ bar} to P2=1.00 barP_2 = 1.00\text{ bar}. Step A: reversible work. Using wrev=−nRTln⁡(P1/P2)w_{rev} = -nRT\ln(P_1/P_2):

wrev=−(1.00 mol)(8.314 J K−1mol−1)(350 K)ln⁡5.001.00w_{rev} = -(1.00\text{ mol})(8.314\text{ J K}^{-1}\text{mol}^{-1})(350\text{ K})\ln\frac{5.00}{1.00}
wrev=−(2909.9 J)(1.6094)=−4683 J=−4.68 kJw_{rev} = -(2909.9\text{ J})(1.6094) = -4683\text{ J} = -4.68\text{ kJ}

Step B: single-stage irreversible expansion against Pext=P2=1.00 bar=1.00×105 PaP_{ext} = P_2 = 1.00\text{ bar} = 1.00\times10^5\text{ Pa}. First get volumes:

V1=nRTP1=2909.9 J5.00×105 Pa=5.820×10−3 m3V_1 = \frac{nRT}{P_1} = \frac{2909.9\text{ J}}{5.00\times10^5\text{ Pa}} = 5.820\times10^{-3}\text{ m}^3
V2=nRTP2=2909.9 J1.00×105 Pa=2.910×10−2 m3V_2 = \frac{nRT}{P_2} = \frac{2909.9\text{ J}}{1.00\times10^5\text{ Pa}} = 2.910\times10^{-2}\text{ m}^3
wirrev=−P2(V2−V1)=−(1.00×105 Pa)(2.910×10−2−5.820×10−3) m3w_{irrev} = -P_2(V_2 - V_1) = -(1.00\times10^5\text{ Pa})(2.910\times10^{-2} - 5.820\times10^{-3})\text{ m}^3
wirrev=−(1.00×105)(2.328×10−2)=−2328 J=−2.33 kJw_{irrev} = -(1.00\times10^5)(2.328\times10^{-2}) = -2328\text{ J} = -2.33\text{ kJ}

Step C: quantify the lost work. The "lost work" is the shortfall between the maximum (reversible) work and the actual work delivered:

wlost=∣wrev∣−∣wirrev∣=4.68 kJ−2.33 kJ=2.35 kJw_{lost} = |w_{rev}| - |w_{irrev}| = 4.68\text{ kJ} - 2.33\text{ kJ} = 2.35\text{ kJ}

This 2.35 kJ never left the reservoir as heat and never appeared as useful work — it simply represents energy that could have been extracted had the process been run reversibly (quasistatically, through a continuum of external pressures), but was squandered because the piston was allowed to fly out against a single fixed low pressure. In both cases ΔU=0\Delta U = 0; the "lost work" shows up as unrecovered capacity to do work, a preview of entropy production and the Second Law, not as any change in the gas's internal energy. Sanity check: ln⁡(5.00)=1.609\ln(5.00) = 1.609, a sensible value; both wrevw_{rev} and wirrevw_{irrev} are negative (gas doing work on surroundings, as expected for expansion); ∣wrev∣>∣wirrev∣|w_{rev}| > |w_{irrev}| as required by the Maximum Work Theorem.

Limiting cases & common traps

SituationWhat happensCommon pitfall
V2=V1V_2 = V_1 (no volume change)w=q=0w = q = 0 triviallyForgetting that isothermal ≠ automatically zero work; work is zero only if ΔV=0\Delta V = 0 too
Free expansion into vacuum (Pext=0P_{ext}=0)w=0w = 0, and since ΔU=0\Delta U=0, also q=0q=0Students assume heat must flow because gas expands; it need not, if no work is done
Multistage irreversible expansion (several pressure steps)Work magnitude increases toward wrevw_{rev} as steps →∞\to \inftyTreating any finite number of stages as equal to the reversible limit
Compression instead of expansionSigns flip: wrev>0w_{rev} > 0 (work done on gas), reversible work is now the minimum magnitude neededAssuming "reversible always means more work in magnitude" regardless of direction
Real (non-ideal) gasUU may depend on VV too (Joule–Thomson effects), so ΔU≠0\Delta U \neq 0 even isothermallyApplying ΔU=0\Delta U = 0 blindly to non-ideal gases

The chemist behind it

James Prescott Joule performed the free-expansion experiments in the 1840s that first suggested UU depends only on TT for a gas approaching ideal behavior — heat and work are interconvertible, but for a gas expanding into a vacuum with no external pressure to push against, no work is done and (to the accuracy of his measurements) no temperature change occurred either. This is the empirical seed of "Joule's law" for ideal gases, (∂U/∂V)T=0(\partial U/\partial V)_T = 0, that makes ΔU=0\Delta U = 0 valid for any isothermal ideal-gas process, reversible or not — the very fact this entire article leans on.

Origins · 1 minJames Prescott Joule and how this was discovered
JP
James Prescott Joule
1818–1889 · English physicist whose free-expansion and mechanical-equivalent-of-heat experiments established that internal energy of an ideal gas depends on temperature alone

Ask the tutor: Want to see how this same isothermal expansion looks if the gas is instead expanded adiabatically, and why the adiabat drops below the isotherm on a P–V diagram?

Why is ΔU exactly zero for isothermal ideal-gas expansion but not for real gases?

For an ideal gas, molecules do not interact, so internal energy is purely kinetic and depends only on temperature — this is Joule's law, (∂U/∂V)T=0(\partial U/\partial V)_T = 0. Real gases have intermolecular attractions and repulsions whose potential energy changes as molecules move farther apart during expansion, so UU can depend on volume even at fixed TT. This produces a small but measurable Joule–Thomson-type effect absent in the ideal-gas limit used throughout this article.

Why does the reversible path always give the maximum work?

At every instant in a reversible expansion, the external pressure matches the gas pressure almost exactly, so no driving force is wasted overcoming a pressure mismatch. Any irreversible path applies a mismatched (usually smaller) external pressure, which does less work per unit volume change. Summed over the whole path, the reversible process always yields work whose magnitude is greater than or equal to any irreversible alternative between the same endpoints — the Maximum Work Theorem.

Does the ideal gas actually cool down during expansion before heat flows back in?

In the idealized reversible or single-stage irreversible descriptions here, we assume the gas remains in thermal contact with an infinite reservoir, so TT never actually drops — heat flows in continuously (or in the irreversible case, as needed) to compensate exactly. In a real, insulated system without a reservoir, expansion without heat input would indeed cool the gas; that scenario is instead the adiabatic process, covered separately.

How does this connect to the Maximum Work and Reversibility concept from prerequisite material?

The maximum-work theorem states that of all possible paths connecting two equilibrium states, the reversible path always delivers the greatest work output (or requires the least work input for compression). Isothermal ideal-gas expansion is the standard proving ground for that theorem: the reversible logarithmic work, −nRTln⁡(V2/V1)-nRT\ln(V_2/V_1), is provably always greater in magnitude than any single-stage or multistage irreversible alternative between the same V1V_1 and V2V_2.

What comes next after mastering this topic?

The next natural steps are heat capacity at constant volume, CVC_V, which quantifies how UU changes with TT for non-isothermal processes, and adiabatic processes, where q=0q=0 instead of ΔT=0\Delta T=0. Comparing isothermal and adiabatic expansions on the same PP-VV diagram is a classic way to see why adiabats are always steeper than isotherms.

Before this

Where this leads