The First Law of Thermodynamics and Work in Ideal-Gas Processes
Statement
For a closed system of \(n\) moles of an ideal gas, the change in internal energy \(U\) is a state function satisfying \(dU = n C_V\,dT\), and the first law of thermodynamics reads \(dU = dQ - dW\), where \(dQ\) is the heat added to the system and \(dW = p\,dV\) is the work done by the system during a quasi-static volume change. For a quasi-static path between equilibrium states \((p_1,V_1,T_1)\) and \((p_2,V_2,T_2)\), the work and heat depend on the path while \(\Delta U\) depends only on the end states; for the four standard processes (isochoric, isobaric, isothermal, adiabatic) these quantities reduce to closed-form expressions involving \(C_V\), \(C_p\), \(R\), and \(\gamma = C_p/C_V\).
Why it matters
The first law is the bookkeeping rule for energy in thermodynamics. It tells us that heat and work are not stored in the system — only internal energy is — and that the two transfer mechanisms are related by a fixed sign convention. Every engine, refrigerator, and heat pump is analysed by applying this single identity cycle by cycle.
For an ideal gas the internal energy depends only on temperature, which collapses the problem to one variable. The four standard processes then give the complete toolkit for computing work, heat, and energy change in the most common textbook and laboratory scenarios, and the adiabatic relation \(pV^\gamma = \text{const}\) underpins the analysis of compression, expansion, and sound propagation in gases.
Assumptions
Derivation
Result
Reading. The first law partitions every joule of heat into internal-energy change and \(p\,dV\) work. For an ideal gas the internal energy is a pure function of temperature, so the entire thermodynamic state is pinned down by \(T\) (or equivalently \(p\) and \(V\)). The four standard processes are the four ways of holding one variable fixed while the other two adjust, and each gives a closed-form expression for \(W\), \(Q\), and \(\Delta U\).
Units check. \([nC_V\,dT] = \mathrm{mol\cdot J/(mol\cdot K)\cdot K = J}\). \([p\,dV] = \mathrm{Pa\cdot m^3 = (N/m^2)\cdot m^3 = N\cdot m = J}\). \([C_p - C_V] = \mathrm{J/(mol\cdot K)}\), matching \([R] = 8.314\ \mathrm{J/(mol\cdot K)}\). All consistent.
Limiting cases
- Monatomic ideal gas. \(C_V = \tfrac{3}{2}R\), \(C_p = \tfrac{5}{2}R\), \(\gamma = 5/3\). Three translational degrees of freedom; no rotational or vibrational contributions.
- Diatomic ideal gas (room temperature). \(C_V = \tfrac{5}{2}R\), \(C_p = \tfrac{7}{2}R\), \(\gamma = 7/5\). Five active degrees of freedom (3 translational + 2 rotational); vibrational modes frozen out.
- Isothermal limit \(\gamma \to 1\). As \(\gamma \to 1\) the adiabatic curve \(pV^\gamma = \text{const}\) flattens toward the isotherm \(pV = \text{const}\). Physically this corresponds to a gas with very large \(C_V\) (many active degrees of freedom), so a given \(p\,dV\) work draws little energy from \(U\), and \(T\) barely changes.
- Cyclic process. \(\oint dU = 0\) (state function), so \(\oint dQ = \oint dW\). The net work over a cycle equals the net heat, and on a \(p\)-\(V\) diagram equals the area enclosed by the cycle.
Breaks when
- Non-quasi-static (irreversible) process. In a free expansion into a vacuum, \(p_{\text{ext}} = 0\), so \(W = \int p_{\text{ext}}\,dV = 0\). For an ideal gas \(\Delta U = 0\) (no \(T\) change), hence \(Q = 0\). The gas reaches a new equilibrium but the path is not described by \(pV^\gamma = \text{const}\) or any reversible curve; the work formula \(dW = p\,dV\) with the gas pressure is invalid because the gas is not in internal equilibrium during the expansion.
- Real (non-ideal) gas. Intermolecular attractions and finite molecular volume make \(U\) depend on \(V\), so \(dU \neq nC_V\,dT\) in general. Mayer's relation \(C_p - C_V = R\) is replaced by \(C_p - C_V = T\left(\frac{\partial p}{\partial T}\right)_V \left(\frac{\partial V}{\partial T}\right)_p\), which equals \(R\) only in the ideal limit. The adiabatic relation \(pV^\gamma = \text{const}\) no longer holds; one must integrate the real equation of state.
- Open system (mass flow). If gas enters or leaves the control volume, the first law must include flow work \(pV\) carried by the incoming/outgoing mass. The closed-system form \(dU = dQ - p\,dV\) is insufficient; one uses the steady-flow energy equation with enthalpy.
Failure modes
- Sign-convention confusion. Writing \(dU = dQ + p\,dV\) (chemistry convention) but then computing \(W = p\,dV\) as positive for expansion and adding it to \(Q\). The two conventions are consistent only if \(W_{\text{on}} = -W_{\text{by}}\). Pick one and stick to it throughout the problem.
- Using \(C_p\) for an isochoric process. In a rigid container \(dV = 0\), so \(W = 0\) and \(Q = \Delta U = nC_V\Delta T\). Substituting \(C_p\) overestimates the heat by \(nR\Delta T\), the amount that would have gone into \(p\,dV\) work in an isobaric process.
- Treating the adiabatic relation as universal. \(pV^\gamma = \text{const}\) applies only to a reversible adiabatic process of an ideal gas. A free expansion is adiabatic (\(Q=0\)) but not reversible; the gas does not follow \(pV^\gamma = \text{const}\) and the final state is found from \(\Delta U = 0\) alone.
- Assuming \(W = p\,\Delta V\) for all processes. This formula holds only when \(p\) is constant (isobaric). For isothermal or adiabatic processes \(p\) changes with \(V\), and the work must be computed as \(\int p\,dV\) using the appropriate \(p(V)\) relation.
Discussion
The first law is an accounting identity, not a dynamical equation. It does not tell you how fast the energy transfer occurs, only how much goes where. This is its power: the path details (turbulence, shock waves, finite-time effects) are irrelevant to the energy balance as long as the initial and final equilibrium states are known and the process is quasi-static. For irreversible processes the first law still holds, but the work must be computed from the external pressure, not the gas pressure, and the path integral \(\int p_{\text{gas}}\,dV\) is no longer available.
The ideal-gas assumption \(U = U(T)\) is the single most important simplification in introductory thermodynamics. It means that the internal energy is a one-variable function, so \(\Delta U\) is determined by \(\Delta T\) alone, regardless of whether the process is isochoric, isobaric, isothermal, or adiabatic. The heat and work, by contrast, are path-dependent: two different paths connecting the same two states can have the same \(\Delta U\) but different \(Q\) and \(W\). This is the essential distinction between a state function and a path function, and it is the reason the first law is written as an equality of differentials rather than as a relation between state variables alone.
Mayer's relation \(C_p - C_V = R\) is a direct consequence of the ideal-gas equation of state and the definition of enthalpy. It is not an independent empirical fact; it follows from \(H = U + pV\) and \(pV = nRT\). For a real gas the difference \(C_p - C_V\) deviates from \(R\) by a term involving the second virial coefficient, and the deviation is measurable in high-precision calorimetry. The relation is therefore a useful diagnostic: if experimental \(C_p\) and \(C_V\) differ by exactly \(R\), the gas is behaving ideally at that temperature and pressure.
At a deeper level, the first law is the statement of energy conservation applied to a thermodynamic system. In statistical mechanics, the internal energy \(U\) is the ensemble average of the microscopic Hamiltonian, \(\langle H \rangle\), and the first law becomes \(\langle dH \rangle = \langle dQ \rangle - \langle dW \rangle\), where \(\langle dQ \rangle\) is the average energy transferred by random microscopic collisions at the boundary and \(\langle dW \rangle\) is the average work done by macroscopic generalized forces. The distinction between heat and work is then not a fundamental division of energy but a distinction between disordered (stochastic) and ordered (coherent) energy transfer. The second law enters by constraining the direction of the stochastic transfer, but the first law holds regardless of the second law's arrow of time.
Common misconceptions. Heat is not a substance stored in the gas; it is energy in transit due to a temperature difference. Once transferred, it becomes part of the internal energy. Work is not a property of the state; it is a process quantity. A gas at a given \((p,V,T)\) has a definite \(U\) but no definite "work content." Finally, the adiabatic condition \(Q = 0\) does not imply \(T\) is constant; in fact, for an ideal gas an adiabatic expansion always cools the gas, because the work done by the gas is paid for by a decrease in internal energy.
Related pages. Carnot's Theorem and Maximum Engine Efficiency · Equipartition and Its Failure · The Clausius Inequality and Entropy as a State Function · Heat Conduction: Fourier's Law and the Heat Equation · The Ideal Gas Law from Kinetic Theory · The Work-Energy Theorem.
Worked examples
Example 1. Two moles of a monatomic ideal gas (\(C_V = \tfrac{3}{2}R\), \(\gamma = 5/3\)) are compressed adiabatically and reversibly from \(p_1 = 2.0\times10^5\ \mathrm{Pa}\), \(V_1 = 0.020\ \mathrm{m^3}\) to \(V_2 = 0.0050\ \mathrm{m^3}\). Find the final pressure \(p_2\), the work done by the gas, and the change in temperature. Take \(R = 8.314\ \mathrm{J/(mol\cdot K)}\).
Reading. A fourfold compression raises the pressure about tenfold (\(4^{5/3}\)), not fourfold as an isothermal compression would, and the work done on the gas heats it by 366 K. No heat enters; all the energy comes from the external work.
Units check. \([pV] = \mathrm{Pa\cdot m^3 = J}\). \([nC_V\Delta T] = \mathrm{mol\cdot J/(mol\cdot K)\cdot K = J}\). \([W_{\text{by}}] = \mathrm{J}\). Consistent.
Example 2. One mole of a diatomic ideal gas (\(C_V = \tfrac{5}{2}R\), \(\gamma = 7/5\)) undergoes a cyclic process ABCA on a \(p\)-\(V\) diagram: (A) \(\to\) (B) is isobaric expansion at \(p = 3.0\times10^5\ \mathrm{Pa}\) from \(V_A = 0.010\ \mathrm{m^3}\) to \(V_B = 0.020\ \mathrm{m^3}\); (B) \(\to\) (C) is isochoric cooling at \(V_C = 0.020\ \mathrm{m^3}\) to \(p_C = 1.5\times10^5\ \mathrm{Pa}\); (C) \(\to\) (A) is isothermal compression back to \(V_A = 0.010\ \mathrm{m^3}\). Find the net work done by the gas over the cycle and the net heat absorbed. Take \(R = 8.314\ \mathrm{J/(mol\cdot K)}\).
Reading. The cycle produces 920 J of net work. The area enclosed by ABCA on the \(p\)-\(V\) diagram equals this value. Net heat absorbed equals net work output, as required by the first law for a cyclic process.
Units check. \([p\,\Delta V] = \mathrm{Pa\cdot m^3 = J}\). \([nRT\ln(V_2/V_1)] = \mathrm{J}\) (logarithm is dimensionless). \([Q_{\text{net}}] = \mathrm{J}\). Consistent.
Problems
- One mole of an ideal gas at \(T = 300\ \mathrm{K}\) is heated at constant volume, absorbing 500 J of heat. If \(C_V = 20.8\ \mathrm{J/(mol\cdot K)}\), find the final temperature and the work done by the gas.
Solution
Isochoric: \(W = 0\). \(Q = nC_V\Delta T\Rightarrow \Delta T = Q/(nC_V) = 500/(1\times20.8) = 24.0\ \mathrm{K}\). Final temperature \(T_f = 300 + 24.0 = 324\ \mathrm{K}\). Work \(W = 0\ \mathrm{J}\). - Two moles of a monatomic ideal gas (\(C_V = \tfrac{3}{2}R\)) expand isothermally at \(T = 400\ \mathrm{K}\) from \(V_1 = 0.010\ \mathrm{m^3}\) to \(V_2 = 0.040\ \mathrm{m^3}\). Find the work done by the gas and the heat absorbed. (\(R = 8.314\ \mathrm{J/(mol\cdot K)}\).)
Solution
Isothermal: \(\Delta U = 0\), so \(Q = W\). \(W = nRT\ln(V_2/V_1) = 2(8.314)(400)\ln(4) = 6651\times1.386 = 9220\ \mathrm{J}\). Thus \(Q = 9220\ \mathrm{J} \approx 9.2\times10^3\ \mathrm{J}\). - A 3.0 mol sample of a diatomic ideal gas (\(C_V = \tfrac{5}{2}R\), \(\gamma = 7/5\)) is compressed adiabatically from \(p_1 = 1.0\times10^5\ \mathrm{Pa}\), \(V_1 = 0.060\ \mathrm{m^3}\) to \(V_2 = 0.020\ \mathrm{m^3}\). Find the final pressure and the work done on the gas. (\(R = 8.314\ \mathrm{J/(mol\cdot K)}\).)
Solution
\(p_2 = p_1(V_1/V_2)^\gamma = 1.0\times10^5\times(3)^{7/5}\). \(3^{7/5} = 3^{1.4} = e^{1.4\ln 3} = e^{1.4\times1.099} = e^{1.538} = 4.66\). So \(p_2 = 4.66\times10^5\ \mathrm{Pa}\) and \(p_2V_2 = 9311\ \mathrm{J}\). Work by gas: \(W_{\text{by}} = (p_1V_1 - p_2V_2)/(\gamma-1) = (6000 - 9311)/(2/5) = -3311/0.4 = -8278\ \mathrm{J}\). Work on gas \(= +8.28\times10^3\ \mathrm{J}\). - One mole of an ideal gas undergoes a cycle: (1) isobaric expansion at \(p = 2.0\times10^5\ \mathrm{Pa}\) from \(V = 0.010\) to \(0.030\ \mathrm{m^3}\); (2) isochoric cooling until the temperature is back to its initial value; (3) isothermal compression back to the starting state. Find the pressure at the end of step 2, and the net work and net heat over the cycle. (\(R = 8.314\ \mathrm{J/(mol\cdot K)}\).)
Solution
Step 3 is isothermal at the initial temperature, so \(p_3V_3 = p_1V_1\): \(p_3 = (2.0\times10^5)(0.010)/0.030 = 6.67\times10^4\ \mathrm{Pa}\) (the initial temperature is \(T_1 = p_1V_1/nR = 2000/8.314 = 241\ \mathrm{K}\)). Work: \(W_1 = p\,\Delta V = (2.0\times10^5)(0.020) = 4000\ \mathrm{J}\); \(W_2 = 0\); \(W_3 = nRT_1\ln(V_1/V_3) = p_1V_1\ln(1/3) = 2000\times(-1.0986) = -2197\ \mathrm{J}\). \(W_{\text{net}} = 4000 - 2197 = 1803\ \mathrm{J} \approx 1.8\times10^3\ \mathrm{J}\). Over a cycle \(\Delta U = 0\), so \(Q_{\text{net}} = W_{\text{net}} \approx 1.8\times10^3\ \mathrm{J}\). - Derive the adiabatic work formula \(W_{\text{by}} = \dfrac{p_1V_1 - p_2V_2}{\gamma - 1}\) starting from \(W_{\text{by}} = \displaystyle\int_{V_1}^{V_2} p\,dV\) and \(pV^\gamma = p_1V_1^\gamma\). Then apply it to 2.0 mol of a monatomic gas (\(\gamma = 5/3\)) expanding adiabatically from \(p_1 = 5.0\times10^5\ \mathrm{Pa}\), \(V_1 = 0.010\ \mathrm{m^3}\) to \(p_2 = 1.0\times10^5\ \mathrm{Pa}\). Find \(V_2\), \(W_{\text{by}}\), and \(\Delta T\). (\(R = 8.314\ \mathrm{J/(mol\cdot K)}\).)
Solution
Derivation. From \(pV^\gamma = p_1V_1^\gamma\), we have \(p = p_1V_1^\gamma V^{-\gamma}\). Then \[ W_{\text{by}} = \int_{V_1}^{V_2} p_1V_1^\gamma V^{-\gamma}\,dV = p_1V_1^\gamma\left[\frac{V^{1-\gamma}}{1-\gamma}\right]_{V_1}^{V_2} = \frac{p_1V_1^\gamma}{1-\gamma}\left(V_2^{1-\gamma} - V_1^{1-\gamma}\right). \] Since \(p_2 = p_1V_1^\gamma V_2^{-\gamma}\), we have \(p_1V_1^\gamma V_2^{1-\gamma} = p_2V_2\) and \(p_1V_1^\gamma V_1^{1-\gamma} = p_1V_1\). Thus \[ W_{\text{by}} = \frac{p_2V_2 - p_1V_1}{1-\gamma} = \frac{p_1V_1 - p_2V_2}{\gamma - 1}. \] Application. \(p_2/p_1 = (V_1/V_2)^\gamma\Rightarrow V_2 = V_1(p_1/p_2)^{1/\gamma} = 0.010(5)^{3/5}\). \(5^{3/5} = e^{0.6\ln 5} = e^{0.6\times1.609} = e^{0.966} = 2.63\). So \(V_2 = 0.02627\ \mathrm{m^3}\). \(p_1V_1 = 5000\ \mathrm{J}\), \(p_2V_2 = 1.0\times10^5\times0.02627 = 2627\ \mathrm{J}\). \(W_{\text{by}} = (5000 - 2627)/(5/3 - 1) = 2373/(2/3) = 3560\ \mathrm{J} \approx 3.6\times10^3\ \mathrm{J}\). \(\Delta U = -W_{\text{by}} = -3560\ \mathrm{J} = nC_V\Delta T = 2\times\frac{3}{2}(8.314)\Delta T = 24.94\,\Delta T\). \(\Delta T = -3560/24.94 = -143\ \mathrm{K}\). The gas cools by 143 K.