Pressure–volume work is the first place where the abstract bookkeeping of the first law becomes something you can actually see, measure and calculate. When a gas pushes a piston, or when a piston squeezes a gas, energy crosses the boundary between system and surroundings not as heat but as mechanical work, and the size of that transfer depends on the external pressure resisting the motion and on how the volume changes. This lesson builds directly on the first law, ##\Delta U = q + w##, and turns it into a working tool for gases.
The central question is deceptively simple: how much work does a gas do when it expands, and how much work must be done on it when it is compressed? The answer depends on the path. A gas expanding against a fixed external pressure delivers a different amount of work than the same gas expanding slowly and reversibly through a series of equilibrium states, even when the initial and final volumes are identical. Understanding why that difference exists, and how to compute both cases, is the heart of this lesson.
We will derive ##w = -p_{ex}\Delta V## for constant external pressure, extend it to variable pressure and to the reversible isothermal result ##w = -nRT\ln(V_f/V_i)##, and then examine free expansion, where no work is done at all. Along the way we will work the standard numerical problems, convert litre-atmospheres into joules, read work as the area under a curve on a ##pV## diagram, and confront the mistakes that cost marks in examinations.
On This Page
Work as a Path Function: Setting Up the Piston
Before any formula appears, fix the physical picture. A cylinder fitted with a frictionless piston contains a gas at pressure ##p_{in}##; outside, the surroundings exert a pressure ##p_{ex}## on the piston face. If the piston has cross-sectional area ##A## and moves a distance ##l##, the volume swept out is ##l \times A = \Delta V##. The force the surroundings apply to the piston is ##p_{ex}A##, so the mechanical work associated with that displacement is force times distance, ##p_{ex}Al##, which is ##p_{ex}\Delta V## in magnitude.
The sign convention adopted throughout chemical thermodynamics is that work done on the system is positive and work done by the system is negative. During compression the volume decreases, so ##\Delta V = V_f - V_i## is negative, and the work done on the gas must come out positive. Writing ##w = -p_{ex}\Delta V## delivers exactly that: a negative volume change multiplied by a negative sign gives a positive ##w##. During expansion the same expression automatically yields a negative ##w##, correctly signalling that the system has done work on the surroundings.
This is the single most important structural point of the lesson: work is not a state function. It depends on the route taken between the initial and final states, and the external pressure is the variable that encodes the route. Two expansions from the same ##V_i## to the same ##V_f## at the same temperature can exchange wildly different amounts of energy as work, and the first law accommodates this because the heat ##q## adjusts to keep ##\Delta U## fixed for a given temperature change.
Constant External Pressure: The Single-Step Result
When the external pressure is held constant and the change is achieved in a single step, the work is simply ##w = -p_{ex}(V_f - V_i)##. Nothing in this expression refers to the pressure inside the gas; only the resisting pressure of the surroundings matters. A gas at 10 atm expanding against a constant 1 atm therefore does work proportional to 1 atm, not 10 atm, because the piston face only ever feels the external pressure. This is the single most common conceptual trap in the topic, and we return to it later.
If the pressure is not constant but changes in a finite number of discrete steps, the total work is the sum over the steps, ##w = -\sum p\Delta V##. Each step contributes a rectangular block of area on the ##pV## diagram, and the total is the sum of those rectangles. The approximation improves as the steps become smaller, which sets up the natural passage to the continuous limit.
Variable Pressure and the Infinitesimal Limit
Now let the external pressure change continuously so that at every instant it is only infinitesimally different from the gas pressure. During compression ##p_{ex} = p_{in} + dp##; during expansion ##p_{ex} = p_{in} - dp##. In this limit the sum becomes an integral, ##w = -\int_{V_i}^{V_f} p_{ex}\,dV##, and the work is the exact area under the curve on the ##pV## diagram. Because ##dp \times dV## is vanishingly small, the external pressure can be replaced by the internal pressure of the gas, giving ##w_{rev} = -\int_{V_i}^{V_f} p\,dV##.
This is the definition of a reversible process: a change carried out so slowly, through a succession of equilibrium states, that at any moment an infinitesimal alteration of the external pressure can reverse its direction. System and surroundings remain in near-equilibrium throughout. No real process satisfies this exactly, because a finite driving force is always needed to make anything happen at a measurable rate, but the reversible path is the limiting idealisation against which real paths are judged.
Reversible Isothermal Work for an Ideal Gas
To evaluate the integral for a reversible path we need the pressure of the gas as a function of volume. For ##n## moles of an ideal gas, ##pV = nRT##, so ##p = nRT/V##. Substituting into ##w_{rev} = -\int p\,dV## and holding temperature constant, as required for an isothermal process, gives ##w_{rev} = -nRT\int_{V_i}^{V_f} dV/V##. The integral of ##1/V## is the natural logarithm, so the result is the compact and powerful expression below.
The two forms are identical, differing only in whether the logarithm is taken to base ##e## or base 10; the factor 2.303 is simply ##\ln 10##. For an expansion, ##V_f > V_i##, the logarithm is positive, and ##w_{rev}## is negative, meaning the system does work on the surroundings. For a compression the sign flips and work is done on the system. Because ##pV = nRT## at constant temperature, the volume ratio can be replaced by an inverse pressure ratio, so the same work can be written as ##-nRT\ln(p_i/p_f)##.
Why Reversible Work Is the Maximum
Picture the ##pV## diagram. The reversible isothermal expansion traces the hyperbolic curve ##p = nRT/V## from ##V_i## to ##V_f##, and the work is the entire area beneath that curve. An irreversible expansion against a constant external pressure traces a horizontal line at the lower value ##p_{ex}##, and the work is only the rectangle beneath that line. Since the isotherm lies above any constant-pressure line that starts at the same initial state and ends at the same final volume, the reversible area is always larger. Reversible expansion therefore yields the maximum possible work.
The same logic runs in reverse for compression. To compress the gas reversibly, the external pressure must be raised only infinitesimally above the internal pressure at each stage, so the work that must be supplied is the minimum consistent with the volume change. Any real compression, driven by a finite excess pressure, costs more work and dissipates the surplus as heat. Reversibility thus brackets the problem from both sides: maximum work out during expansion, minimum work in during compression.
Reading the Area Under the Isotherm
The graphical interpretation is not decoration; it is the most reliable way to avoid sign and magnitude errors. On a ##pV## plot, the area under the path between ##V_i## and ##V_f## equals the magnitude of pressure–volume work, and the direction of the volume change fixes the sign. Finite-step compression produces a staircase of rectangles whose total area underestimates the smooth curve; as the steps shrink, the staircase converges to the exact integral. This is precisely the geometric content of replacing ##-\sum p\Delta V## by ##-\int p\,dV##.
Students should also notice what the diagram does not show. The area depends on the shape of the path, not merely on its endpoints, which is the visual proof that work is a path function. Two different curves joining the same two states enclose different areas and therefore correspond to different work. Heat capacity, by contrast, is irrelevant to the geometry; what matters is the pressure–volume relationship followed during the change.
We Also Published
Free Expansion and the Isothermal Energy Balance
Free expansion is the limiting case in which a gas expands into a vacuum, so ##p_{ex} = 0##. Substituting into ##w = -p_{ex}\Delta V## gives zero work, and the same conclusion follows from the integral form, because the integrand vanishes everywhere along the path. No work is done during free expansion of an ideal gas, whether the process is described as reversible or irreversible. The gas pushes against nothing, so it delivers no energy to the surroundings.
Joule established experimentally that for an ideal gas expanding isothermally into a vacuum, no heat is absorbed either, so ##q = 0## and therefore ##\Delta U = 0##. This is consistent with the microscopic picture: for an ideal gas the internal energy depends only on temperature, and the temperature does not change. The result is a striking one, because the gas has doubled or quintupled its volume while exchanging neither work nor heat with its surroundings.
For an isothermal irreversible change the first law gives ##q = -w = p_{ex}(V_f - V_i)##, while for an isothermal reversible change ##q = -w = nRT\ln(V_f/V_i)##. In both cases the heat absorbed exactly cancels the work done, keeping ##\Delta U## at zero. For an adiabatic change, by contrast, ##q = 0## and therefore ##\Delta U = w_{ad}##, so any work done by the gas comes at the expense of its internal energy and its temperature falls.
Worked Problem: Expansion into a Vacuum
Two litres of an ideal gas at 10 atm expand isothermally at 25 °C into a vacuum until the total volume is 10 litres. The external pressure is zero, so ##w = -p_{ex}(V_f - V_i) = 0 \times 8 = 0##. No work is done and, by Joule's observation, no heat is absorbed. The volume change of 8 litres is real, but it costs the gas nothing in energy terms because there is no resisting pressure to overcome. This is the cleanest illustration that work requires both a displacement and a force opposing it.
Worked Problem: Expansion Against 1 atm
Now repeat the same expansion against a constant external pressure of 1 atm. The work is ##w = -p_{ex}(V_f - V_i) = -1 \times 8 = -8## litre-atm, so the gas does 8 litre-atm of work on the surroundings and absorbs ##q = +8## litre-atm of heat to keep its temperature constant. Converting to joules using 1 L atm = 101.3 J gives approximately 810 J. Notice how the answer changes completely while the initial and final states remain identical, which is the path-function character of work made concrete.
Worked Problem: Reversible Isothermal Expansion
For one mole of an ideal gas at 298 K expanding reversibly from 2 litres to 10 litres, the work follows from ##w = -2.303\,nRT\log(V_f/V_i)##. Substituting gives ##w = -2.303 \times 1 \times 0.08206 \times 298 \times \log 5##. The logarithm of 5 is 0.699, and the product works out to approximately ##-40.8## litre-atm, which converts to about ##-4130## J. The gas therefore does roughly 4.1 kJ of work on the surroundings, and absorbs the same amount of heat to remain isothermal.
Compare this with the 1 atm result of about 810 J. The reversible path extracts five times as much work from the same expansion, purely because the external pressure is allowed to fall continuously along the isotherm instead of being fixed at the final value. This numerical comparison is the most persuasive demonstration that reversibility is not a technicality but a statement about the maximum useful work a system can deliver.
Setting Out the Calculation Cleanly
Examiners reward structure. State the given quantities with units, write the appropriate formula, substitute with units carried through, and only then convert. The code below shows a compact way to check the arithmetic for any set of inputs, which is useful when practising variations on the standard problem.
import math
R = 8.314 # J per mol per K
T = 298.0 # K
n = 1.0 # mol
Vi, Vf = 2.0, 10.0 # litres
# Reversible isothermal work (J)
w_rev = -n * R * T * math.log(Vf / Vi)
# Irreversible work against constant external pressure (J)
p_ex_atm = 1.0
w_irr = -p_ex_atm * (Vf - Vi) * 101.3
print(round(w_rev, 1), round(w_irr, 1))
Running this returns approximately ##-3989## J and ##-810## J. The small difference from the hand calculation above arises because the hand version used ##R = 0.08206## L atm per mol per K and then converted, while the code uses ##R = 8.314## J per mol per K directly. Both routes are correct; the discrepancy is rounding, not physics, and students should be comfortable with either.
Common Mistakes to Avoid
The most frequent error is using the internal pressure of the gas in place of the external pressure when computing irreversible work. A gas at 10 atm expanding against 1 atm does work proportional to 1 atm, not 10 atm, because the piston face only experiences the external pressure. Substituting ##p_{in}## inflates the answer and reveals a misunderstanding of what the boundary actually transmits. The internal pressure belongs only in the reversible integral, where it equals the external pressure at every stage.
Other recurring slips include dropping the negative sign, mixing litre-atmospheres with joules without converting, and applying the logarithmic formula to an irreversible process. A further trap is forgetting that the reversible formula requires constant temperature; for a non-isothermal path the integral of ##p\,dV## must be evaluated along the actual path, not assumed to follow the isotherm. Finally, remember that free expansion does no work but is emphatically not reversible in the thermodynamic sense, since the gas cannot spontaneously recompress itself.
Reversibility as a Limiting Idealisation
Every real process is irreversible. A gas expanding through a valve, a piston driven by a finite pressure difference, a reaction proceeding at a measurable rate: all of these involve gradients that dissipate energy as heat and cannot be run backwards without leaving a permanent change in the surroundings. The reversible path, in which the driving force is reduced to an infinitesimal, is a limiting construction that no apparatus can achieve in finite time. Its value is that it defines the best possible outcome.
This idealisation is what makes the second law quantitative. Because reversible expansion gives the maximum work a system can deliver and reversible compression requires the minimum work to be supplied, the reversible path sets the benchmark against which the efficiency of real engines, refrigerators and electrochemical cells is measured. When a textbook says a process is 60 per cent efficient, the missing 40 per cent is the gap between the real irreversible path and the reversible limit.
For the chemistry that follows, the reversible result also prepares the ground for enthalpy. At constant pressure, the work term becomes ##-p\Delta V##, and substituting it into the first law produces ##\Delta U = q_p - p\Delta V##, which rearranges to define a new state function, enthalpy, as ##H = U + pV##. The pressure–volume work developed here is therefore not an isolated topic but the bridge between internal energy and the enthalpy changes that dominate the rest of the course.
Where the Idealisation Breaks Down
Real gases deviate from ##pV = nRT## at high pressure and low temperature, so the reversible isothermal work computed from the ideal expression becomes an approximation. Attractive intermolecular forces mean that a real gas expanding into a vacuum does some work against its own cohesion, so its temperature falls slightly, unlike an ideal gas. These corrections belong to later treatments, but recognising the assumption now prevents the formula from being applied where it does not belong.
Friction in the piston and turbulence in the gas are further sources of irreversibility that no amount of careful design eliminates. They convert ordered mechanical energy into disordered thermal energy, which is precisely the entropy production that the next lessons will quantify. The reversible path is the one on which no such dissipation occurs, and that is why it yields the extremal work values.
Preparing for Enthalpy
The next lesson introduces enthalpy as the heat exchanged at constant pressure, and the derivation rests entirely on the work expression derived here. Writing the first law as ##\Delta U = q + w## and substituting ##w = -p\Delta V## for a constant-pressure process gives ##\Delta U = q_p - p\Delta V##, so ##q_p = \Delta U + p\Delta V = \Delta H##. The pressure–volume term is the same one we have just integrated, now appearing as the correction that converts internal energy into enthalpy.
Students who are fluent with ##w = -p_{ex}\Delta V## and its reversible counterpart will find the enthalpy definition natural rather than mysterious. The habit of tracking whether a process is at constant volume or constant pressure, and whether it is reversible or irreversible, carries straight through into thermochemistry, where the distinction between ##\Delta U## and ##\Delta H## is the difference between a bomb calorimeter and an open vessel.
Applications and Advanced Points
Pressure–volume work is not confined to textbook pistons. The compression stroke of an internal combustion engine is an irreversible compression in which work is supplied to the gas and its temperature rises sharply; the power stroke is an expansion in which work is extracted. The reversible isothermal result sets the theoretical ceiling on what any such cycle can deliver, and the gap between that ceiling and the real engine is the subject of the second law. The same reasoning governs the design of compressors in refrigeration and the expansion of gases through turbines.
In biological systems the concept reappears in a different guise. Breathing involves pressure–volume work as the diaphragm changes the volume of the thoracic cavity against atmospheric pressure, and the mechanical work of the heart is pressure–volume work performed on the blood. Even chemical reactions in solution, where volume changes are tiny, carry a ##p\Delta V## term that distinguishes ##\Delta U## from ##\Delta H##; for reactions producing or consuming gases, this term can be several kilojoules per mole and cannot be ignored.
Beyond the ideal gas, the reversible integral ##-\int p\,dV## remains valid for any substance provided the equation of state is known. For a van der Waals gas the pressure includes corrections for molecular volume and attraction, and the integral yields a different work value from the ideal case. The structure of the argument, however, is unchanged: identify the path, express pressure as a function of volume, and integrate. That method is the durable takeaway of this lesson.
Consolidating the Key Results
The lesson reduces to a small set of results that must be known cold. For constant external pressure, ##w = -p_{ex}\Delta V##. For a reversible isothermal change of an ideal gas, ##w = -nRT\ln(V_f/V_i)##. For free expansion, ##w = 0##. For constant volume, ##w = 0## and ##\Delta U = q_V##. For an adiabatic change, ##q = 0## and ##\Delta U = w_{ad}##. Each follows from the same integral once the path is specified, and each carries a sign that can be checked against physical intuition.
The deeper lesson is conceptual. Work is energy in transit, driven by a pressure difference across a boundary, and its magnitude depends on how that difference is managed. Reversibility is the limiting management strategy that extracts the most work on expansion and demands the least on compression. With that understanding in place, the definition of enthalpy in the next lesson becomes a natural bookkeeping device rather than a formula to memorise.
From our network :
- How to Print Cheaply: Cutting the Cost per PageA practical, measured guide to lowering what each printed page costs — duplex and draft modes, third-party ink, yield mathematics, and knowing when a new printer beats refills.
- Trump Political Strategy How Geopolitical Stunts Serve As Media Diversions
- Do You Need a New Router or Is Your Internet Plan the Problem?A practical comparison of the signs that point to router limits versus signs your broadband speed or provider is the bottleneck, so you can decide what to replace before spending money.
- Analyzing Trump Deportation Numbers Insights Into The 2026 Immigration Crackdown
- Where to Put Your Wireless Router for Better CoverageA practical, physics-grounded guide to router placement: why the centre of the home beats the corner, how walls and metal sap signal, and how to run a simple survey that proves the improvement.
- 98% of Global MBA Programs Now Prefer GRE Over GMAT Focus EditionExplore why 98% of global MBA programs now prefer the GRE over GMAT Focus. Learn about the shorter GRE format, verbal logic importance, and strategic versatility for students.
- 10 Physics Numerical Problems with Solutions for IIT JEEPrepare for IIT JEE with 10 physics numerical problems, complete with detailed solutions and conceptual explanations. Ideal for mastering kinematics, thermodynamics, electromagnetism, and optics.
- AI-Powered 'Precision Diagnostic' Replaces Standard GRE Score ReportsDiscover the new GRE Precision Diagnostic. Learn how AI-powered behavioral analytics and time-to-solve tracking are replacing standard GRE score reports to empower students.
- EV 2.0: The Solid-State Battery Breakthrough and Global Factory ExpansionDiscover the impact of the Solid-State Battery Breakthrough on the EV market. Learn about CATL and BYD stock growth, global factory expansion in Europe, and the future of EV 2.0 technology.
RESOURCES
- 7.18: Reversible vs. Irreversible Pressure-Volume Workchem.libretexts.orgWe summarize these conditions by saying that reversible pressure–volume work can occur only if the system and its surroundings are at mechanical equilibrium.
- Confusion in the pressure-volume work in an irreversible processphysics.stackexchange.comOct 5, 2014 ... Now to take the gas at state where volume is V2, suddenly the external pressure is reduced to P2 .…
- Work Done in Reversible and Irreversible Process | CK-12 Foundationflexbooks.ck12.orgAs the volume increases, the gas pressure decreases (for an isothermal expansion of an ideal gas, P ∝ 1 V ). The work done…
- Is thermodynamic work always defined, even for irreversible ...physics.stackexchange.comFeb 28, 2017 ... ... pressure-volume (PV) work on the system. For a infinitesimal reversible process (where the only type of work done is…
- Pressure–Volume Integral Expressions for Work in Irreversible ...pubs.acs.orgMar 1, 2007 ... In addition, the contribution to w of the atmosphere in such processes is evaluated. An example is given that illustrates…
- Derivation of the pressure-volume work (displacement work)tec-science.comMay 18, 2021 ... For this purpose, we consider the thermodynamic process of a gas which is enclosed in a cylinder and sealed with…
- Derivation of the Theoretical Minimum Energy of Separation of ...pubs.acs.orgNov 17, 2020 ... We then present the SEC of a thermodynamically reversible RO process using pressure–volume work, followed by the practical minimum energy ...
- Gibbs free energy - Wikipediaen.wikipedia.orgIn thermodynamics, the Gibbs free energy is a thermodynamic potential that can be used to calculate the maximum amount of work, other than pressure–volume ...
- Reversible process (thermodynamics) - Wikipediaen.wikipedia.orgThe dependence of work on the path of the thermodynamic process is also unrelated to reversibility, since expansion work, which can be visualized on…
- #thermodynamics Work in a Pressure–Volume (p–V) System Made ...facebook.comJul 15, 2026 ... thermodynamics Work in a Pressure–Volume (p–V) System Made Simple! From constant pressure processes to reversible expansion and compression, ...
- 1.3 Changing the State of a System with Heat and Work - MITweb.mit.eduFor simple compressible substances in reversible processes, the work done ... pressure-volume diagram, as in Figure 1.11(a). Figure 1.11: Work in $ P ...
- Pressure-volume work (formula for work) (article) - Khan Academykhanacademy.orgWhen a system has work done on it, the internal energy of the system increases. Like heat, the energy change from work always occurs…