Work, Heat, and Inexact Differentials

Stand at a trailhead and look up at a summit. Your gain in altitude is fixed the moment you name the two points — it does not care whether you took the steep direct scramble or the gentle switchbacks. But the distance you walk and the calories you burn depend entirely on the route. Thermodynamics runs on exactly this distinction, and it is sharper than it first appears. Internal energy UU, entropy SS, volume, pressure, temperature — these are state functions, with a definite value at every equilibrium state, depending only on where the system is. Work WW and heat QQ are process quantities: they describe transfers that happen during a change and depend on the whole path connecting start to finish. The mathematical name for this difference is exact versus inexact differentials. The change of a state function around any closed loop is zero, ∮dU=0\oint\mathrm{d}U = 0 — the integrability condition that makes UU a genuine function of the state variables. Work and heat enjoy no such closure. The work in expanding a gas from V1V_1 to V2V_2 is −∫p dV-\int p\,\mathrm{d}V, which visibly depends on how the pressure varies along the way. A system can be driven around a closed cycle back to its exact starting state (ΔU=0\Delta U = 0) while having done net work and absorbed net heat — that is precisely what a heat engine does, and no state function could ever manage it. We flag the difference with notation: dU\mathrm{d}U for the exact differential of a state function, δQ\delta Q or δW\delta W for the inexact differential of a process quantity. The δ\delta is a warning label — there is no function W(p,V)W(p,V) of the state whose differential is δW\delta W, so "W2−W1W_2 - W_1" is meaningless. A body does not contain heat or work; it exchanges them. The startling content of the first law is that the specific combination δQ+δW\delta Q + \delta W is exact even though neither term is: dU=δQ+δW\mathrm{d}U = \delta Q + \delta W. The second law goes one better — for reversible processes the inexact δQrev\delta Q_{\mathrm{rev}} becomes exact once divided by the absolute temperature, so 1/T1/T is an integrating factor that manufactures the entropy dS=δQrev/T\mathrm{d}S = \delta Q_{\mathrm{rev}}/T. These two repairs turn the ragged one-forms of heat and work into the exact differentials that organize all of equilibrium thermodynamics.

Key takeaways
  • State functions (UU, SS, VV, pp, TT) depend only on the current equilibrium state; their infinitesimals are exact differentials with ∮d(⋅)=0\oint\mathrm{d}(\cdot)=0.
  • Work WW and heat QQ are process quantities: they depend on the entire path in state space, so δW,δQ\delta W,\delta Q are inexact and ∮δW, ∮δQ\oint\delta W,\ \oint\delta Q need not vanish.
  • The exactness (integrability) test: δF=∑iai dxi\delta F = \sum_i a_i\,\mathrm{d}x_i is exact iff ∂ai/∂xj=∂aj/∂xi\partial a_i/\partial x_j = \partial a_j/\partial x_i for all i,ji,j; δW=−p dV\delta W = -p\,\mathrm{d}V fails it.
  • The first law dU=δQ+δW\mathrm{d}U = \delta Q + \delta W combines two inexact differentials into one exact differential — the path-dependent parts cancel.
  • An integrating factor can rescue an inexact differential: δQrev/T=dS\delta Q_{\mathrm{rev}}/T = \mathrm{d}S is exact, with 1/T1/T the integrating factor — this defines entropy.
  • Sign convention here: dU=δQ+δW\mathrm{d}U = \delta Q + \delta W with δW=−p dV\delta W = -p\,\mathrm{d}V (work done on the system); some texts write dU=δQ−δW\mathrm{d}U = \delta Q - \delta W with δW=+p dV\delta W = +p\,\mathrm{d}V (work done by the system).
  • Key idea: The infinitesimals of work and heat are inexact differentials — line elements with no parent state function — so their integrals are path-dependent; the first law makes the combination δQ+δW\delta Q + \delta W the exact dU\mathrm{d}U, and the second law supplies 1/T1/T as an integrating factor turning δQrev\delta Q_{\mathrm{rev}} into the exact dS\mathrm{d}S.

Where this lives today

The exact/inexact distinction is not a nineteenth-century curiosity — it is the daily grammar of energy engineering. Every cycle diagram in a thermodynamics course (Otto, Diesel, Brayton, Rankine) exploits the fact that ∮δW\oint\delta W is a nonzero enclosed area while ∮dU=0\oint\mathrm{d}U = 0; the whole enterprise of extracting work from heat depends on heat and work being process quantities. The idea of an integrating factor reaches far beyond thermodynamics. Carathéodory's 1909 axiomatic reformulation of the second law is built entirely on when a one-form (the heat) admits an integrating factor, connecting thermodynamics to the differential geometry of Pfaffian systems. And in modern stochastic thermodynamics, heat and work are tracked as fluctuating, path-dependent quantities along individual trajectories of tiny systems — a colloidal bead in an optical trap, a single biomolecule pulled by force — where the Jarzynski and Crooks relations turn statements about these inexact differentials into equalities that hold arbitrarily far from equilibrium. The humble δ\delta has become a research tool.

The physical picture

Return to the mountain. Altitude is a state function — the elevation gain between trailhead and summit is fixed, and a round trip returns you to the same height. Distance walked and calories burned are process quantities — they depend on the route entirely. Internal energy is the altitude; work and heat are the distance and the calories. Two different hikers reaching the same summit can burn wildly different calories; two different thermodynamic paths between the same states can involve wildly different heat and work. A differential such as δW=−p dV\delta W = -p\,\mathrm{d}V tells you only the work for a tiny step dV\mathrm{d}V at the current pressure. To get the total you must integrate along a specified path p(V)p(V) — and different paths between the same endpoints give different totals because pp takes different values along the way. There is simply no "work content" W(p,V)W(p,V) to subtract. The figure makes the path-dependence unmissable: the work is the area under the curve, and two curves with the same endpoints enclose different areas.

Figure
Work is the area under the p–V path: same endpoints, different areas, different work
Two paths A→B: work = area under each curve — the totals differ V p A B isothermal: larger area drop p, then expand: smaller area No "work content" W(p,V) exists — the integral ∫p dV remembers the whole route.

The cancellation in dU=δQ+δW\mathrm{d}U = \delta Q + \delta W is like two unreliable bookkeepers whose individual entries drift but whose net balance is always exactly right. Heat and work each depend on the path, yet their sum is rigidly fixed by the endpoints. Nature guarantees this even while forbidding you to define either quantity alone as a state function. An integrating factor is a magic divisor that repairs the defect. The reversible heat δQrev\delta Q_{\mathrm{rev}} is path-dependent, but δQrev/T\delta Q_{\mathrm{rev}}/T is a perfect differential whose loop integral vanishes — a parent function (the entropy) exists. That single mathematical fact is the gateway from heat engines to entropy, and the figure below shows the repair in action: the inexact form has curling "field lines," the divided form does not.

Figure
An integrating factor repairs inexactness: δQ curls, but δQ/T is a perfect differential
δQ = C_V dT + (nRT/V) dV ∂(C_V)/∂V − ∂(p)/∂T = −nR/V ≠ 0 (inexact) δQ/T = (C_V/T) dT + (nR/V) dV cross-derivatives both 0 (exact) ∮δQ ≠ 0 no parent function ∮dS = 0 S = C_V ln T + nR ln V Divide the inexact heat one-form by T and it becomes the exact differential of entropy.

The core equations

The first thing to write is the work of a quasi-static pressure. Adopting the physics convention — WW is work done on the system — compressing the gas (dV<0\mathrm{d}V<0) does positive work on it, so we need a minus sign. (Many thermodynamics texts, and Fermi's classic, instead track work done by the system and write δW=+p dV\delta W = +p\,\mathrm{d}V with dU=δQ−δW\mathrm{d}U = \delta Q - \delta W; identical physics, opposite sign bookkeeping — check which one a source uses.)

δW=−p dV(1)\delta W = -p\,\mathrm{d}V \qquad (1)

where: δW\delta W — inexact differential of work done on the system; pp — pressure at the moving boundary; dV\mathrm{d}V — infinitesimal volume change. Compression (dV<0\mathrm{d}V<0) gives δW>0\delta W>0; expansion gives δW<0\delta W<0 (the gas spends its energy). The first law in differential form combines this with heat, and asserts the sum is exact.

dU=δQ+δW(2)\mathrm{d}U = \delta Q + \delta W \qquad (2)

where: dU\mathrm{d}U — exact differential of internal energy; δQ\delta Q — inexact heat absorbed; δW\delta W — inexact work on the system. The physics is entirely in the claim that the sum is dU\mathrm{d}U of a state function. The precise test for whether any one-form is exact is the equality of its mixed partials.

δF=∑iai(x) dxi  is exact  ⟺  ∂ai∂xj=∂aj∂xi  ∀ i,j(3)\delta F = \sum_i a_i(\mathbf{x})\,\mathrm{d}x_i\ \text{ is exact} \iff \frac{\partial a_i}{\partial x_j} = \frac{\partial a_j}{\partial x_i}\ \ \forall\, i,j \qquad (3)

where: ai(x)a_i(\mathbf{x}) — coefficient functions of the state variables; the condition is Clairaut's theorem run backwards — a parent FF with ∂F/∂xi=ai\partial F/\partial x_i = a_i exists precisely when the cross-derivatives agree. The cleanest operational distinction between state and process quantities is the cyclic integral.

∮dU=0,∮δW≠0,∮δQ≠0(4)\oint\mathrm{d}U = 0, \qquad \oint\delta W \neq 0, \qquad \oint\delta Q \neq 0 \qquad (4)

where: ∮\oint — integral around a closed path in state space. Only the state function returns to its value; the process quantities generally do not — and their nonvanishing loop integrals are what an engine harvests. The total work for a finite process is a line integral over the chosen path.

W1→2=−∫Γp dV(depends on the path Γ)(5)W_{1\to 2} = -\int_{\Gamma} p\,\mathrm{d}V \quad (\text{depends on the path }\Gamma) \qquad (5)

where: Γ\Gamma — the specific route in (p,V)(p,V) space; the explicit Γ\Gamma-dependence is the mathematical face of path-dependence. Finally, the second law's gift: divide the reversible heat by the absolute temperature and it becomes exact.

dS=δQrevT,1T is an integrating factor(6)\mathrm{d}S = \frac{\delta Q_{\mathrm{rev}}}{T}, \qquad \frac{1}{T}\ \text{is an integrating factor} \qquad (6)

where: dS\mathrm{d}S — exact differential of entropy; δQrev\delta Q_{\mathrm{rev}} — heat along a reversible path; TT — absolute thermodynamic temperature. The integrating factor is what makes entropy a state function at all.

Derivation AThe integrating factor: 1/T turns inexact heat into exact entropy

This is the central technical fact of the chapter, and we prove it explicitly on an ideal gas so it carries a verifiable number rather than remaining a slogan. The reversible heat one-form δQrev\delta Q_{\mathrm{rev}} fails the exactness test — its mixed partials disagree, so no "heat content" function exists. Dividing by the absolute temperature TT produces a one-form whose mixed partials do agree, so a parent function (the entropy) exists. The strategy: write δQrev\delta Q_{\mathrm{rev}} in the independent variables (T,V)(T,V) using the first law and the ideal-gas law, apply the cross-derivative test to prove inexactness, then apply it again to δQrev/T\delta Q_{\mathrm{rev}}/T to prove exactness, and finally exhibit the parent function.

Step 1. For a reversible ideal-gas step, combine dU=CV dT\mathrm{d}U = C_V\,\mathrm{d}T (ideal gas, UU depends on TT only) with the first law and δW=−p dV\delta W = -p\,\mathrm{d}V:

δQrev=dU−δW=CV dT+p dV=CV dT+nRTV dV\delta Q_{\mathrm{rev}} = \mathrm{d}U - \delta W = C_V\,\mathrm{d}T + p\,\mathrm{d}V = C_V\,\mathrm{d}T + \frac{nRT}{V}\,\mathrm{d}V

using p=nRT/Vp = nRT/V.

Step 2. Apply the exactness test in variables (T,V)(T,V). The coefficient of dT\mathrm{d}T is a=CVa = C_V (constant) and of dV\mathrm{d}V is b=nRT/Vb = nRT/V. Compute the cross-derivatives:

∂a∂V=0,∂b∂T=nRV≠0.\frac{\partial a}{\partial V} = 0, \qquad \frac{\partial b}{\partial T} = \frac{nR}{V} \neq 0.

Why this proves inexactness: the two disagree, so no function Q(T,V)Q(T,V) has these as its partials — δQrev\delta Q_{\mathrm{rev}} is inexact.

Step 3. Now divide the whole one-form by TT:

δQrevT=CVT dT+nRV dV.\frac{\delta Q_{\mathrm{rev}}}{T} = \frac{C_V}{T}\,\mathrm{d}T + \frac{nR}{V}\,\mathrm{d}V.

The new coefficients are a′=CV/Ta' = C_V/T and b′=nR/Vb' = nR/V. Their cross-derivatives are

∂a′∂V=0=∂b′∂T.\frac{\partial a'}{\partial V} = 0 = \frac{\partial b'}{\partial T}.

Why this matters: they now agree, so the divided form is exact — a parent function exists.

Step 4. Read off the parent by integrating each term:

S=CVln⁡T+nRln⁡V+const.S = C_V\ln T + nR\ln V + \text{const}.

Its differential reproduces δQrev/T\delta Q_{\mathrm{rev}}/T exactly, so SS is the entropy — a state function born from an inexact differential by the integrating factor 1/T1/T. Verified: the two cross-derivative computations (−nR/V≠0-nR/V \neq 0 for δQ\delta Q; both zero for δQ/T\delta Q/T) and the parent S=CVln⁡T+nRln⁡VS = C_V\ln T + nR\ln V are checked symbolically with sympy in verify_aq-sm-work-heat-inexact-differentials.py. Cf. Pathria & Beale §1.1, Fermi Ch. 4.

Go deeper · Derivation B · 1 minPath dependence of work: an explicit two-path comparison
Derivation BPath dependence of work: an explicit two-path comparison

We compute the work for an ideal gas carried between the same two endpoints along two different paths and show the totals differ — a direct, numerical proof that δW\delta W is inexact and has no parent function. Let state A be (p1,V1)(p_1,V_1) and B be (p2,V2)(p_2,V_2) on the same isotherm, so p1V1=p2V2=nRTp_1V_1 = p_2V_2 = nRT with V2>V1V_2 > V_1 and p2<p1p_2 < p_1. Path 1 is the reversible isotherm; path 2 first drops the pressure at fixed volume (no work) and then expands at the lower constant pressure. If the two works disagree, no function W(p,V)W(p,V) can exist.

Step 1. Path 1, isothermal. The pressure follows the hyperbola p=nRT/Vp = nRT/V throughout, and the work done by the gas is

Wby(1)=∫V1V2nRTV dV=nRTln⁡V2V1.W^{(1)}_{\text{by}} = \int_{V_1}^{V_2}\frac{nRT}{V}\,\mathrm{d}V = nRT\ln\frac{V_2}{V_1}.

Step 2. Path 2, isochoric drop then isobaric expansion. Dropping p1→p2p_1\to p_2 at fixed V1V_1 does zero work; expanding at constant p2p_2 from V1V_1 to V2V_2 does

Wby(2)=p2(V2−V1).W^{(2)}_{\text{by}} = p_2(V_2 - V_1).

Step 3. Compare with a concrete case: 11 mol at T=300 KT = 300\ \mathrm{K}, V2=2V1V_2 = 2V_1. Then Wby(1)=nRTln⁡2=1729 JW^{(1)}_{\text{by}} = nRT\ln 2 = 1729\ \mathrm{J}, while Wby(2)=p2(V2−V1)=(nRT/V2)(V2−V1)=nRT(1−V1/V2)=nRT⋅12=1247 JW^{(2)}_{\text{by}} = p_2(V_2 - V_1) = (nRT/V_2)(V_2 - V_1) = nRT(1 - V_1/V_2) = nRT\cdot\tfrac12 = 1247\ \mathrm{J}. Why they differ: the isotherm keeps the pressure high early in the expansion, enclosing more area under the pp–VV curve; the rectangular path does its expansion entirely at the lower pressure.

Step 4. Same endpoints, different work: 1729 J≠1247 J1729\ \mathrm{J} \neq 1247\ \mathrm{J}. Because the line integral ∫p dV\int p\,\mathrm{d}V depends on the route, δW\delta W has no parent function — it is inexact. (Both paths share the same ΔU=0\Delta U = 0, since both endpoints lie on one isotherm and UU is a state function.) Verified: Wby(1)=1728.9 JW^{(1)}_{\text{by}} = 1728.9\ \mathrm{J} and Wby(2)=1247.2 JW^{(2)}_{\text{by}} = 1247.2\ \mathrm{J} recomputed in the verify script; the inequality confirms inexactness. Cf. Fermi Ch. 1, Reif §4.1.

Limiting cases

How the same endpoints give different WW and QQ for an ideal gas going from (V1,T)(V_1,T) to (V2,T)(V_2,T) (work quoted as done by the gas; Won=−WbyW_{\text{on}} = -W_{\text{by}}):

CaseResultMeaning
Isothermal reversibleWby=nRTln⁡V2V1,  Q=Wby,  ΔU=0W_{\text{by}} = nRT\ln\frac{V_2}{V_1},\ \ Q = W_{\text{by}},\ \ \Delta U = 0Constant TT, so ΔU=0\Delta U = 0; all absorbed heat leaves as work.
Free (Joule) expansionW=0,  Q=0,  ΔU=0W = 0,\ \ Q = 0,\ \ \Delta U = 0Expansion into vacuum: no work, no heat, same ΔU\Delta U — but W,QW,Q differ completely from the isotherm.
Adiabatic reversibleδQ=0,  Wby=−ΔU=CV(T1−T2)\delta Q = 0,\ \ W_{\text{by}} = -\Delta U = C_V(T_1 - T_2)No heat; the temperature drops, so the endpoints differ in TT.
Closed cycle∮dU=0,  ∮δQ=−∮δW≠0\oint\mathrm{d}U = 0,\ \ \oint\delta Q = -\oint\delta W \neq 0State function returns; heat and work need not — this is how engines run.

Worked examples

Example 1 — Same endpoints, two paths, two different works (a real number).

Step 1. Take 1 mol of ideal gas at T=300 KT = 300\ \mathrm{K}, expanding from V1V_1 to V2=2V1V_2 = 2V_1 along (Path A) a reversible isotherm and (Path B) an isochoric pressure drop followed by isobaric expansion at the lower pressure.

Step 2. Path A work by the gas: WA=nRTln⁡(V2/V1)=(1)(8.314)(300)ln⁡2W_A = nRT\ln(V_2/V_1) = (1)(8.314)(300)\ln 2. Compute ln⁡2=0.6931\ln 2 = 0.6931, so WA=8.314×300×0.6931=1729 JW_A = 8.314 \times 300 \times 0.6931 = \mathbf{1729\ J}.

Step 3. Path B work by the gas: only the isobaric leg contributes, WB=p2(V2−V1)W_B = p_2(V_2 - V_1). Using p2=nRT/V2p_2 = nRT/V_2 and V2−V1=V2/2V_2 - V_1 = V_2/2, this is WB=nRT⋅12=(1)(8.314)(300)(0.5)=1247 JW_B = nRT\cdot\tfrac12 = (1)(8.314)(300)(0.5) = \mathbf{1247\ J}.

Step 4. The two differ by 482 J\mathbf{482\ J} despite identical endpoints — a direct demonstration that work is path-dependent. Both share ΔU=0\Delta U = 0 (endpoints on one isotherm), so by the first law each path's heat equals its work by: QA=1729 JQ_A = 1729\ \mathrm{J}, QB=1247 JQ_B = 1247\ \mathrm{J} — heat is path-dependent too.

Example 2 — Testing exactness of the heat one-form and finding the integrating factor.

Step 1. Write the reversible heat for an ideal gas in variables (T,V)(T,V): δQrev=CV dT+(nRT/V) dV\delta Q_{\mathrm{rev}} = C_V\,\mathrm{d}T + (nRT/V)\,\mathrm{d}V. The coefficients are a=CVa = C_V (of dT\mathrm{d}T) and b=nRT/Vb = nRT/V (of dV\mathrm{d}V).

Step 2. Cross-derivatives: (∂a/∂V)T=0(\partial a/\partial V)_T = 0 and (∂b/∂T)V=nR/V(\partial b/\partial T)_V = nR/V. For 1 mol at V=0.0224 m3V = 0.0224\ \mathrm{m^3} (molar volume at STP), nR/V=8.314/0.0224=371 J m−3K−1nR/V = 8.314/0.0224 = \mathbf{371\ J\,m^{-3}K^{-1}}, which is nonzero — so δQrev\delta Q_{\mathrm{rev}} is inexact.

Step 3. Divide by TT: δQrev/T=(CV/T) dT+(nR/V) dV\delta Q_{\mathrm{rev}}/T = (C_V/T)\,\mathrm{d}T + (nR/V)\,\mathrm{d}V. New cross-derivatives: ∂(CV/T)/∂V=0\partial(C_V/T)/\partial V = 0 and ∂(nR/V)/∂T=0\partial(nR/V)/\partial T = 0. They agree, so δQrev/T\delta Q_{\mathrm{rev}}/T is exact.

Step 4. The parent function is S=CVln⁡T+nRln⁡V+constS = C_V\ln T + nR\ln V + \text{const}. Its differential is exactly δQrev/T\delta Q_{\mathrm{rev}}/T, so 1/T1/T is the integrating factor and SS is the entropy. This is the mathematical birth certificate of entropy from an inexact differential.

Going further

References. Fermi, Thermodynamics, Ch. 1–2 · Pathria & Beale, Statistical Mechanics, 3rd ed., Ch. 1 · Kardar, Statistical Physics of Particles, Ch. 1 · Reif, Fundamentals of Statistical and Thermal Physics, Ch. 4 · Callen, Thermodynamics and an Introduction to Thermostatistics, Ch. 4 · Landau & Lifshitz, Statistical Physics Part 1, §§11–13

Provenance. All equations are standard textbook results. A verifier should recompute: (1) the exactness test ∂ai/∂xj=∂aj/∂xi\partial a_i/\partial x_j = \partial a_j/\partial x_i for δW=−p dV\delta W = -p\,\mathrm{d}V (fails) and for δQrev/T\delta Q_{\mathrm{rev}}/T (holds), per Pathria & Beale §1.1 and Fermi Ch. 4; (2) the two-path works WA=nRTln⁡2=1729 JW_A = nRT\ln 2 = 1729\ \mathrm{J} and WB=1247 JW_B = 1247\ \mathrm{J} for 1 mol at 300 K, V2=2V1V_2 = 2V_1; (3) the parent function S=CVln⁡T+nRln⁡VS = C_V\ln T + nR\ln V. The sign convention dU=δQ+δW\mathrm{d}U = \delta Q + \delta W with δW=−p dV\delta W = -p\,\mathrm{d}V (work on the system) is stated explicitly; the Fermi/IUPAC work-by-the-system alternative is noted. Constants: R=8.314 J mol−1K−1R = 8.314\ \mathrm{J\,mol^{-1}K^{-1}}.

Builds on: Zeroth Law of Thermodynamics and Empirical Temperature · Partial derivatives and total differentials · Line integrals in state space Leads to: First Law of Thermodynamics and Internal Energy · Second Law of Thermodynamics and Entropy · Reversible and Irreversible Processes · Carnot Cycle and Thermodynamic Temperature · Maxwell Relations

Origins · 1 minHermann von Helmholtz and how this was discovered
HV
Hermann von Helmholtz
1821–1894 · Potsdam, Königsberg, Bonn, Heidelberg, Berlin

Helmholtz placed the interconversion of work and heat on a firm footing in his 1847 memoir Über die Erhaltung der Kraft, arguing that mechanical work, heat, electricity and the rest are interconvertible forms of a single conserved quantity. That principle is exactly what makes internal energy UU a state function: even though δQ\delta Q and δW\delta W are separately inexact and path-dependent, their sum dU=δQ+δW\mathrm{d}U=\delta Q+\delta W is exact. His later free-energy potential F=U−TSF=U-TS then quantified how much of that internal energy is actually extractable as work once the inexact, entropy-producing part of heat is subtracted — the practical payoff of distinguishing exact from inexact differentials.

History
1824
— Carnot analyzes idealized reversible engines, implicitly using path-dependence of heat and work
1834
— Clapeyron casts Carnot's reasoning in the p–V diagram, making ∮p dV an area
1847
— Helmholtz states conservation of energy, making internal energy a state function while work and heat remain process quantities
1850
— Clausius states the first and second laws; distinguishes state from process quantities
1854
— Clausius introduces the inequality ∮δQ/T ≤ 0 and the integrating factor 1/T
1865
— Clausius names the exact differential δQ_rev/T the entropy
1909
— Carathéodory recasts the second law on the existence of an integrating factor for the heat one-form
What exactly is an inexact differential?

It is a differential form δF=∑iai dxi\delta F = \sum_i a_i\,\mathrm{d}x_i for which no function FF exists whose partial derivatives are the aia_i. The test is whether the mixed partials agree: ∂ai/∂xj=∂aj/∂xi\partial a_i/\partial x_j = \partial a_j/\partial x_i. If they do, FF exists (exact); if not, no parent function exists (inexact). For δW=−p dV\delta W = -p\,\mathrm{d}V written in (p,V)(p,V), the coefficients are 00 and −p-p, and ∂(0)/∂V=0≠∂(−p)/∂p=−1\partial(0)/\partial V = 0 \neq \partial(-p)/\partial p = -1, so it is inexact. The physical consequence is that ∫δW\int\delta W depends on the path.

Why does the article use δ instead of d for heat and work?

The δ\delta (some books use dˉ\bar{\mathrm{d}} or đ) is a deliberate warning that the quantity is not the differential of any state function. Writing dQ\mathrm{d}Q would falsely suggest a function QQ of the state exists whose small change is dQ\mathrm{d}Q — it does not. The δ\delta says: "this is a small amount of heat exchanged in this step, but there is no total heat you are incrementing." It is the notational conscience of the whole exact/inexact distinction.

Isn't δW = −p dV just always equal to the change in some "work function"?

No, and that is the whole point. −p dV-p\,\mathrm{d}V gives the work for one infinitesimal step, but to total it up you integrate along a path p(V)p(V), and different paths give different answers. There is no function W(p,V)W(p,V) such that dW=−p dV\mathrm{d}W = -p\,\mathrm{d}V; if there were, the work between two states would be path-independent, which contradicts the explicit two-path calculation (1729 J vs 1247 J for the same endpoints). Work is genuinely a functional of the path, not a difference of endpoint values.

How can 1/T possibly be the right integrating factor and not some other function?

For an ideal gas you can check it directly — dividing by TT makes the cross-derivatives vanish (see Derivation A), while dividing by, say, pp or VV does not. But the deeper answer is that the second law forces the integrating factor to be a universal function of temperature alone, the same for every substance. Carathéodory's theorem guarantees that the heat one-form for a simple system admits an integrating denominator, and the requirement that it be substance-independent pins it (up to scale) to the absolute temperature TT. That universality is why 1/T1/T works for gases, solids, magnets — everything.

Do free expansion and reversible isothermal expansion really have the same ΔU?

Yes — that is exactly what makes the comparison so instructive. Both take an ideal gas from V1V_1 to V2V_2 at the same temperature (free expansion keeps TT constant because UU of an ideal gas depends on TT only and ΔU=0\Delta U = 0 when Q=W=0Q = W = 0). Since the endpoints are identical, ΔU\Delta U is identical: zero. But the free expansion has W=0W = 0, Q=0Q = 0, while the reversible isotherm has Wby=Q=nRTln⁡(V2/V1)>0W_{\text{by}} = Q = nRT\ln(V_2/V_1) > 0. Identical ΔU\Delta U, utterly different heat and work — the cleanest possible demonstration that QQ and WW are process quantities.

Does the same p dV that is inexact become part of the exact dU?

It does, and that cancellation is the magic of the first law. The work one-form −p dV-p\,\mathrm{d}V is inexact on its own, and the heat one-form δQ\delta Q is inexact on its own, but their sum δQ+(−p dV)=dU\delta Q + (-p\,\mathrm{d}V) = \mathrm{d}U is exact. The path-dependent piece of the work is precisely cancelled by a path-dependent piece of the heat, leaving a quantity (dU\mathrm{d}U) that only sees the endpoints. So the very term p dVp\,\mathrm{d}V that ruins exactness by itself becomes a legitimate part of an exact differential once heat is added back.

Before this

Where this leads