---
title: First Law of Thermodynamics
module: Thermodynamics
moduleNumber: 8
lessonNumber: 2
order: 802
summary: >
  Heat a gas and it may warm, expand, or both; compress it and the same energy can
  reappear as a temperature rise. The first law settles the bookkeeping: internal
  energy is a state property whose change equals the heat added plus the work done on
  the system, $\Delta E_{\rm int}=Q_{\rm in}+W_{\rm on}$. We fix a system boundary and
  one sign convention, compute boundary work as $\int p\,\d V$ along a path, and use
  calorimetry to measure heat and heat capacities. The recurring point is that heat
  and work are path-dependent transfers while their sum is not, so an energy ledger
  closes only once every boundary crossing is named.
topics: [Thermodynamics]
draft: false
sources:
  - book: Tipler & Mosca
    ref: "Ch. 18 — Heat and the First Law of Thermodynamics; §§18-1, 18-3–18-5, 18-9"
---

## System boundaries and energy transfer

Thermodynamic accounting begins by declaring a system boundary. The system may be
a gas in a cylinder, water in a calorimeter, a metal sample, or a combination of
objects. Everything outside that boundary is the surroundings. Energy crossing the
boundary because of a temperature difference is heat transfer. Energy crossing
because an external force acts through a displacement is work. The same physical
interaction can be internal or external depending on the selected system. A paddle
stirring water does external work if the system is the water alone; it is internal
interaction if the paddle, motor, and water are included together.

Heat is an energy-transfer process, not a material stored inside an object. After
energy enters a cooler object by heating, it becomes part of that object's internal
energy. Internal energy includes microscopic kinetic and interaction energies in
the centre-of-mass frame of the system. A body can have high internal energy without
currently receiving heat, and it can receive heat without all of that energy appearing
immediately as a temperature rise. The words heat and internal energy identify
different roles in an energy account.

The direction of heat transfer follows temperature difference. When two bodies at
different temperatures are placed in thermal contact, energy is transferred from
the warmer body to the cooler body until thermal equilibrium is reached. Insulation
reduces this transfer but does not erase the system boundary. A calorimeter is
designed so that heat transfer across its outer boundary is negligible over the
measurement interval; heat transfer between objects inside the calorimeter remains
central to the calculation.

Work also depends on the boundary. Compression of a gas by an external piston is
work done on the gas. Expansion against a piston is work done by the gas on the
surroundings. Electrical, stirring, stretching, and shaft interactions can likewise
transfer energy by work. A complete solution identifies each transfer mechanism,
its direction across the declared boundary, and the interval during which it acts.
Leaving the system unnamed makes the sign of every energy term ambiguous.

## The first law and its sign convention

Tipler and Mosca write the first law as

$$
\Delta E_{\rm int}=Q_{\rm in}+W_{\rm on}.
$$

Here $Q_{\rm in}$ is positive when heat enters the system and negative when heat
leaves it. The work term $W_{\rm on}$ is positive when the surroundings do work on
the system and negative when the system does work on the surroundings. The equation
is conservation of energy written for internal energy. It does not say that heat
and work are state properties. They are path-dependent energy transfers; internal
energy is the state quantity whose change is determined after the transfers are
accounted for.

Compression illustrates the signs. An insulated gas compressed by a piston has
$Q_{\rm in}=0$ and positive $W_{\rm on}$, so its internal energy increases. An
insulated gas expanding against a piston has negative $W_{\rm on}$, so its internal
energy decreases if no other energy transfer occurs. If a gas is heated while it
expands, the positive heat input and negative work-on term compete. Temperature
change cannot be inferred from the heat term alone without evaluating the work.

Water stirred by a paddle tests the sign convention numerically. The paddle does
$25\ \mathrm{kJ}$ of work on the selected water system while poor insulation allows
$15\ \mathrm{kcal}$ of heat to leave. Converting the heat loss gives
$Q_{\rm in}=-62.7\ \mathrm{kJ}$ and $W_{\rm on}=+25\ \mathrm{kJ}$. The first law
gives $\Delta E_{\rm int}=-37.7\ \mathrm{kJ}$. The work input is real, but the
larger heat loss produces a net decrease in internal energy.

State changes provide a consistency check. If a system returns to its original
state, its internal energy change is zero even though it may have absorbed heat
and done work along the way. The algebra then requires the total heat transfer into
the system to be the negative of total work done on it. Treating both heat and work
as positive when energy leaves the system mixes
two different sign conventions and should be rewritten before numbers are used.

$$
% caption: The first-law signs follow the direction of transfer across the system boundary. Heat entering and work done on the system raise internal energy; reverse transfers carry negative signs.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\fill[acc!8] (2.2,0.9) rectangle (4.6,2.7);
\draw[black,thick] (2.2,0.9) rectangle (4.6,2.7);
\node[acc] at (3.4,1.8) {system};
\draw[acc,->,thick] (2.9,3.55)--(2.9,2.75) node[midway,right] {heat in};
\draw[acc,->,thick] (5.7,1.9)--(4.65,1.9) node[midway,above] {work on};
\draw[black,->,thick] (2.15,1.4)--(1.05,1.4) node[midway,above] {heat out};
\draw[black,->,thick] (4.0,0.85)--(4.0,0.05) node[midway,right] {work out};
\node[black,anchor=south] at (3.4,3.9) {inward transfers are positive};
\end{tikzpicture}
$$

## Heat capacity and calorimetry

Heating a sample that remains in one phase over a modest temperature range transfers
$Q=mc\Delta T$. The specific heat capacity $c$ is energy
per unit mass per kelvin; the heat capacity $C=mc$ is energy per kelvin for the
whole sample. Celsius-degree and kelvin temperature differences have equal size,
so either may be used for a temperature change. Absolute temperature is required
for gas-law ratios, but not for a simple difference such as heating water from
$20\ \mathrm{degree}$ to $25\ \mathrm{degree}$.

Calorimetry applies energy conservation to a set of objects in an insulated
container. If the system includes a warm metal sample, water, and the calorimeter
cup, and negligible energy crosses the outer boundary, then the signed transfers
within it sum to zero. A hot object has negative $Q$ because its temperature change
is negative; cooler water and cup have positive $Q$. The final equilibrium
temperature is common to all objects that remain in thermal contact long enough,
but their temperature changes differ because their initial temperatures differ.

The energy balance for a metal of unknown specific heat placed in water is
$m_m c_m(T_f-T_{mi})+m_w c_w(T_f-T_{wi})+C_c(T_f-T_{ci})=0$. The cup term must be
included when the calorimeter has appreciable heat capacity. Omitting it attributes
the heat absorbed by the cup to the water and biases the inferred metal
specific heat. The same equation can solve for a final temperature, an unknown
mass, or an unknown heat capacity after the system and sign convention are fixed.

The model has clear limits. It assumes negligible external heat leakage, no phase
change, no chemical reaction, and known heat capacities over the interval. A final
temperature outside the possible range is a diagnostic: it can indicate an
incorrect sign, an omitted calorimeter component, or an impossible assumption that
all of a phase change occurred. Calorimetry succeeds when every energy-storing
object inside the boundary is included, rather than by equating two unsigned
numbers called heat lost and heat gained.

$$
% caption: An insulated calorimeter contains all objects in the energy balance. Heat lost by the initially warmer sample is gained by the water and the cup until one final equilibrium temperature is reached.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black,dashed] (0.55,-0.15) rectangle (5.55,3.5);
\node[black,anchor=west] at (0.65,3.25) {insulated boundary};
\draw[black,thick] (1.1,0.2) rectangle (4.9,2.85);
\node[black,anchor=west] at (4.0,2.62) {cup};
\fill[acc!12] (1.4,0.45) rectangle (4.6,2.3);
\draw[black,thick] (1.4,0.45) rectangle (4.6,2.3);
\node[acc,anchor=west] at (1.6,0.95) {water};
\draw[fill=white,draw=black,line width=.4pt] (2.55,1.7) circle (7pt);
\node[black,anchor=west] at (2.8,1.7) {warm sample};
\draw[acc,->,thick] (2.55,1.45)--(2.55,0.95) node[midway,right] {heat};
\end{tikzpicture}
$$

### Work depends on the process path

A gas in a cylinder transfers mechanical work when its piston moves. During a small
volume change, work done by the gas on the surroundings is
$\d W_{\rm by}=p\d V$ for a quasistatic process, where the gas pressure is defined
at each stage. Taking work done on the system as positive gives
$\d W_{\rm on}=-p\d V$. Expansion has positive $\d V$ and therefore negative
work-on; compression has negative $\d V$ and positive work-on. The sign follows the
direction of energy transfer, not whether the word "work" appears with a positive
number in a formula copied from another convention.

On a pressure--volume diagram, the magnitude of work done by the gas is the area
under the process curve. A constant-pressure expansion from $V_i$ to $V_f$ gives
$W_{\rm by}=p(V_f-V_i)$. A curved path requires the integral of pressure with
respect to volume. Pressure times volume has units of energy because a pascal times
a cubic metre is a joule. This unit check detects errors when graph axes are labelled in
kilopascals and litres: their product must be converted consistently before it is
reported as joules.

Work is path-dependent. Two processes can begin at the same initial pressure and
volume and end at the same final pressure and volume while producing different
areas under their curves. A process that maintains higher pressure during expansion
does more work on the surroundings than one that expands at lower pressure. Internal
energy, by contrast, is a state function. Its change between the same two
equilibrium states is fixed, so the heat transfer must differ between the two paths
by the amount required by the first law.

For example, a gas expanding at constant pressure
$2.0\times10^5\ \mathrm{Pa}$ through $3.0\times10^{-3}\ \mathrm{m^3}$ does
$600\ \mathrm J$ of work on the surroundings. In the work-on convention,
$W_{\rm on}=-600\ \mathrm J$. If its internal energy rises by $150\ \mathrm J$,
the first law requires $Q_{\rm in}=+750\ \mathrm J$. The gas absorbs more energy
as heat than it stores internally because the remaining energy leaves as boundary
work. Reversing the path reverses the signs of both volume change and work.

Quasistatic does not mean that no energy is dissipated; it means the gas passes
through states close enough to equilibrium that pressure can be assigned along the
path. A rapid expansion can have pressure variations and turbulence, making a
single gas pressure inadequate for calculating work from one simple curve. The
boundary force and piston displacement still define work, but the model needs more
detail than a smooth equilibrium PV path.

$$
% caption: Work by a gas is the signed area beneath its process curve on a pressure–volume diagram. Two paths between the same states enclose different areas and so deliver different work, even though the internal-energy change is identical.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(6.2,0) node[right] {volume};
\draw[->,black] (0,0)--(0,3.5) node[above] {pressure};
\fill[acc!10] (1.0,0)--(1.0,2.75)--(5.1,2.75)--(5.1,0)--cycle;
\draw[acc,very thick,->] (1.0,2.75)--(5.1,2.75);
\draw[acc,very thick,->] (5.1,2.75)--(5.1,0.8);
\draw[black,thick,->] (1.0,2.75) .. controls (2.4,1.75) and (3.9,1.1) .. (5.1,0.8);
\draw[fill=white,draw=black,line width=.4pt] (1.0,2.75) circle (2pt);
\draw[fill=white,draw=black,line width=.4pt] (5.1,0.8) circle (2pt);
\node[acc,anchor=south] at (3.05,2.8) {higher-pressure path};
\node[black,anchor=north] at (3.7,1.35) {lower-pressure path};
\node[black,anchor=east] at (0.9,2.8) {i};
\node[black,anchor=west] at (5.2,0.8) {f};
\end{tikzpicture}
$$

### Constant-volume and constant-pressure processes

At constant volume, the boundary does not move and $\Delta V=0$. The boundary-work
term is therefore zero: $W_{\rm on}=0$. The first law reduces to
$\Delta E_{\rm int}=Q_{\rm in}$. Heat supplied to a rigid sealed gas changes its
internal energy rather than being divided between internal energy and expansion
work. Pressure can still change substantially because temperature changes at fixed
volume. A rigid metal vessel and a gas thermometer approximate this process when
the vessel expansion is negligible.

At constant pressure, a heated gas generally expands and does work on the
surroundings. The gas volume change is positive, so work done on the gas is
negative. Heat input must then cover both the internal-energy increase and the
energy transferred out as piston work. The same temperature rise requires more heat
at constant pressure than at constant volume for an ideal gas, because the
constant-pressure process includes an additional expansion channel. The distinction
comes from the process constraint, not from a different definition of temperature.

A gas absorbs $500\ \mathrm J$ at constant volume. With no other work, its internal
energy increases by $500\ \mathrm J$. In a constant-pressure process that absorbs the
same $500\ \mathrm J$ while the gas does $180\ \mathrm J$ of work,
$W_{\rm on}=-180\ \mathrm J$ and the internal-energy increase is only
$320\ \mathrm J$. The boundary condition, not the heat input alone, sets how the
supplied energy is partitioned.

The process label must be checked against the apparatus. A piston under a fixed
load can approximate constant pressure only if the external force and piston area
remain effectively constant. A sealed flask can approximate constant volume only
if its thermal expansion is negligible over the temperature interval. In a real
experiment, neither condition is exact; pressure and volume measurements show
whether the intended approximation is adequate for the required precision.

$$
% caption: Constant volume prevents boundary work because the piston is clamped. At constant pressure the same heating raises the piston, so part of the transferred energy leaves the gas as work on the surroundings.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black,thick] (0.4,0.4) rectangle (2.5,2.5);
\fill[acc!12] (0.6,0.6) rectangle (2.3,1.9);
\draw[black,very thick] (0.5,1.93)--(2.4,1.93);
\draw[acc,->,thick] (1.45,3.3)--(1.45,2.6) node[midway,right] {heat};
\node[black,anchor=north] at (1.45,0.35) {volume held};
\draw[black,thick] (4.3,0.4) rectangle (6.4,2.5);
\fill[acc!12] (4.5,0.6) rectangle (6.2,1.22);
\draw[black,very thick] (4.4,1.25)--(6.3,1.25);
\draw[black,dashed,thick] (4.4,2.05)--(6.3,2.05);
\draw[acc,->,thick] (5.35,3.3)--(5.35,2.6) node[midway,right] {heat};
\draw[black,->,thick] (6.62,1.3)--(6.62,2.0) node[midway,right] {piston rises};
\node[black,anchor=north] at (5.35,0.35) {pressure held};
\end{tikzpicture}
$$

### Phase-change calorimetry

During a phase change at fixed pressure, energy transfer can occur with no change
in temperature. The energy is used to change molecular separation and interaction
energy rather than the average translational kinetic energy that sets temperature.
Melting requires the latent heat of fusion, and vaporization requires the latent
heat of vaporization. Mass $m$ requires energy magnitude $mL$, where $L$ is the
appropriate latent heat. The sign follows the direction: melting and
vaporization absorb heat; freezing and condensation release heat.

For instance, melting $0.200\ \mathrm{kg}$ of ice at its melting temperature
requires $Q=(0.200\ \mathrm{kg})(333.5\ \mathrm{kJ\,kg^{-1}})=66.7\ \mathrm{kJ}$.
The final liquid water is still at the melting temperature if no additional energy
is supplied after the ice disappears. A calculation that applies $mc\Delta T$ to
this stage predicts zero energy because $\Delta T=0$; it misses the phase energy
entirely. Latent-heat terms and sensible-heat terms describe different portions of
the process and must be written separately.

Calorimetry involving a phase change starts by testing whether enough energy is
available to complete the change. Warm water cooling to the melting temperature may
release enough energy to melt only part of an added ice sample. If ice remains,
the final equilibrium state contains both ice and water at the melting temperature.
Assuming that all ice melts would produce an impossible final temperature below the
melting point. The phase inventory is therefore an unknown that must be determined
before solving a temperature equation.

A complete energy balance can contain several stages: cooling a liquid, freezing,
cooling the solid, or the reverse sequence during heating. Each stage has a clear
formula and temperature range. The total transfer is the algebraic sum of the
individual terms. Phase-change calorimetry remains an application of the first law;
it differs from ordinary calorimetry only because internal energy changes can occur
without a temperature change.

$$
% caption: A heating curve has sloped intervals where temperature rises and flat intervals where a phase change absorbs energy at constant temperature. Each plateau length reflects a latent heat rather than a heat capacity.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(6.4,0) node[right] {energy added};
\draw[->,black] (0,0)--(0,3.5) node[above] {temperature};
\draw[acc,very thick] (0.35,0.35)--(1.45,1.25)--(3.35,1.25)--(4.45,2.5)--(5.95,2.5);
\node[black,anchor=south east] at (1.15,1.3) {solid warms};
\node[black,anchor=north] at (2.4,1.15) {melting};
\node[black,anchor=south east] at (4.35,2.55) {liquid warms};
\node[black,anchor=south] at (5.2,2.55) {boiling};
\end{tikzpicture}
$$

### Internal energy of an ideal gas

An ideal gas has internal energy depending only on temperature. The idealization
neglects intermolecular potential energy except during brief collisions, so the
internal energy is the sum of molecular kinetic-energy contributions available at
the stated temperature. The translational result for a monatomic ideal gas is
$E_{\rm int}=(3/2)nRT$. A temperature rise therefore increases internal energy
whether the gas was heated at fixed volume, compressed by an insulated piston, or
taken through some combination of heat and work. Pressure and volume can change
along different paths while the same initial and final temperatures give the same
internal-energy change.

The heat capacity at constant volume, $C_V$, connects a small temperature change
to internal-energy change: $\d E_{\rm int}=C_V\d T$. A fixed amount of monatomic ideal
gas has $C_V=(3/2)nR$. A sample containing $0.50\ \mathrm{mol}$
heated from $300\ \mathrm K$ to $360\ \mathrm K$ has internal-energy change
$(3/2)(0.50)(8.314)(60)=374\ \mathrm J$. This value does not identify how energy
entered the gas. At fixed volume it can be supplied entirely by heat; during
compression it can be supplied partly or entirely by work done on the gas.

The temperature-only dependence is a special property of the ideal-gas model. Real
gases have molecular attractions and separations that contribute potential energy, so
changing volume at fixed temperature can change internal energy. The ideal-gas
result should therefore be used after checking that the gas is dilute enough for
intermolecular energy to be a small correction. The distinction is physical rather
than algebraic: an ideal-gas equation of state and an ideal-gas internal
energy model are linked assumptions.

Internal energy is not heat. A gas at a given temperature has a definite internal
energy in the ideal model, but it does not possess a definite amount of heat. Heat
labels an energy transfer caused by temperature difference, and work labels an
energy transfer through a force and displacement. Both can change the same state
quantity. The first law determines their required sum for a specified state change,
while a process description determines how that sum is partitioned.

### Adiabatic work and temperature change

An adiabatic process has no heat transfer across the system boundary, so
$Q_{\rm in}=0$. It can occur when the system is well insulated or when the process
is fast enough that appreciable heat has no time to cross the boundary. The first
law then reduces to $\Delta E_{\rm int}=W_{\rm on}$. In an adiabatic compression,
the surroundings do positive work on the gas, increasing its internal energy and
temperature. In an adiabatic expansion, the gas does work on the surroundings,
making $W_{\rm on}$ negative; internal energy and temperature decrease.

A quasistatic ideal-gas process has pressure defined at each stage and an adiabatic
path obeying $PV^\gamma=\text{constant}$, where
$\gamma=C_P/C_V$. The curve is steeper than an isotherm through the same initial
state. During expansion, both volume increase and temperature decrease, causing
pressure to fall more rapidly than on a constant-temperature path. During
compression, the reverse occurs. The adjective quasistatic matters: it permits a
sequence of near-equilibrium states and a PV curve. An abrupt insulated expansion
may be adiabatic but not quasistatic.

If $C_V$ is approximately constant, adiabatic work done on an ideal gas is
$W_{\rm on}=C_V(T_f-T_i)$. For one mole of a monatomic gas compressed from
$300\ \mathrm K$ to $420\ \mathrm K$, the result is
$(3/2)R(120\ \mathrm K)=1.50\ \mathrm{kJ}$. Because no heat enters, the same
amount is the increase in internal energy. The calculation does not require the
full pressure-volume path once the temperature endpoints are known, but the path
relation is needed when pressure and volume endpoints are given instead.

Adiabatic does not mean constant temperature. Constant temperature requires
energy transfer or work conditions that keep internal energy unchanged; adiabatic
compression necessarily raises the temperature in the ideal-gas model. It also
does not mean that an apparatus is isolated from all forces. A piston can transfer
substantial work while insulation prevents heat transfer. The process label states
one boundary condition, and the first law determines the remaining energy balance.

$$
% caption: A quasistatic adiabatic compression is steeper than the isotherm through the same starting state. Insulation removes heat transfer, so the piston work raises the ideal-gas internal energy and temperature.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(6.1,0) node[right] {volume};
\draw[->,black] (0,0)--(0,3.6) node[above] {pressure};
\draw[black,dashed,thick] (5.3,0.75) .. controls (3.6,1.05) and (2.2,1.55) .. (1.5,2.35);
\draw[acc,very thick,->] (5.3,0.75) .. controls (3.7,1.2) and (2.4,2.1) .. (1.6,3.15);
\draw[fill=white,draw=black,line width=.4pt] (5.3,0.75) circle (2pt);
\draw[fill=white,draw=black,line width=.4pt] (1.5,2.35) circle (2pt);
\draw[fill=white,draw=black,line width=.4pt] (1.6,3.15) circle (2pt);
\node[black,anchor=west] at (3.15,0.9) {isotherm};
\node[acc,anchor=south] at (2.9,2.55) {adiabatic};
\node[black,anchor=north] at (5.3,0.6) {start};
\node[black,anchor=south] at (1.55,3.2) {end};
\end{tikzpicture}
$$

### First-law process accounting

First-law process accounting translates each process condition into a
specific term in the energy balance. At constant volume, boundary work is zero and
heat transfer equals internal-energy change. At constant pressure, expansion work
is negative in the work-on convention and heat input must exceed the internal-energy
increase by the work delivered to the surroundings. In an adiabatic process, heat
transfer is zero and work on the gas equals the internal-energy change. These are
not separate conservation laws; they are different restrictions on the same law.

A process table prevents sign errors before numerical substitution. List the
system, the direction of heat transfer, the direction of boundary motion, and the
sign of work done on the system. Then apply $\Delta E_{\rm int}=Q_{\rm in}+W_{\rm on}$.
During a constant-pressure expansion, $Q_{\rm in}$ may be positive while $W_{\rm on}$
is negative. The sign of internal-energy change then depends on their
relative magnitudes. A statement that a gas expands does not by itself determine
whether its temperature rises or falls.

An isothermal ideal-gas process gives a comparison. Since internal energy
depends only on temperature, it has
$\Delta E_{\rm int}=0$. The first law requires $Q_{\rm in}=-W_{\rm on}$. During
isothermal expansion, the gas does work on the surroundings and must absorb an
equal amount of heat to keep its temperature unchanged. This comparison separates
the condition of zero heat transfer in an adiabatic process from the condition of
zero internal-energy change in an isothermal ideal-gas process.

Process labels should not replace measured state changes. A slowly moving piston
may remain near constant pressure while varying slightly; a supposedly insulated
cylinder may lose heat over a long experiment. The first law remains valid, but
the omitted transfer term becomes an experimental error. Recording pressure,
volume, temperature, and elapsed time permits a direct test of the assumed process
constraint.

**Calorimetry with several materials.**

Mixed-material calorimetry uses one common final temperature but separate energy
terms for every object that changes temperature. A hot metal sample placed in water
inside a calorimeter cup gives three terms, not two: the metal loses energy, the
water gains energy, and the cup gains energy. With negligible transfer through the
outer insulation, the signed balance is
$m_m c_m(T_f-T_{mi})+m_w c_w(T_f-T_{wi})+C_c(T_f-T_{ci})=0$. The metal term is
negative when its initial temperature exceeds the final temperature. The water and
cup terms are positive when they warm.

Suppose a $0.200\ \mathrm{kg}$ brass sample with specific heat
$380\ \mathrm{J\,kg^{-1}\,K^{-1}}$ cools from $90\ \mathrm{degree}$ to a final
temperature in water initially at $20\ \mathrm{degree}$. The metal heat capacity
is $76\ \mathrm{J\,K^{-1}}$. If the water mass is $0.100\ \mathrm{kg}$, its heat
capacity is about $418\ \mathrm{J\,K^{-1}}$, and a cup with heat capacity
$55\ \mathrm{J\,K^{-1}}$ participates as well. The final temperature must lie
between the initial temperatures because no phase change or external energy transfer
is assumed. Solving the balance gives a temperature rise of the water and cup that
is much smaller than the metal's temperature drop because their combined heat
capacity is much larger.

The cup belongs in the energy balance because its temperature changes with the water
and therefore stores energy. Omitting its term forces
the water term to absorb energy that physically entered the cup and produces a
systematic error in an inferred sample heat capacity. The same issue arises with a
thermometer, stirrer, lid, or dissolved material when their heat capacities are not
negligible relative to the water.

The sign convention can be checked before solving. If all objects begin at the same
temperature, every temperature difference is zero and no energy transfer is
required. If a calculated final temperature lies above the hottest initial object or
below the coldest initial object in a no-phase-change insulated experiment, a term
has the wrong sign or an energy-storing component is missing. These checks are more
reliable than memorizing an unsigned statement that heat lost equals heat gained.

**Heating, expansion, and boundary work.**

A temperature increase can change an object's dimensions without necessarily
producing appreciable mechanical work. A freely heated solid expands slightly, but
if no significant external force resists its surface motion, little energy crosses
the system boundary as work. Its internal energy increase is then supplied mainly
by heat transfer. The geometric change alone does not establish a work term. Work
requires a force exerted across the boundary and a displacement component in the
force direction.

A gas under a movable piston is different because its pressure exerts a substantial
boundary force over a measurable piston displacement. When heating raises the gas
volume against an external load, the gas transfers energy out as work. The first
law therefore requires more heat input than the internal-energy increase alone.
The gas may expand while its temperature rises, falls, or remains constant; volume
change by itself does not determine the sign of the internal-energy change. The
pressure path and heat transfer complete the account.

A rigid vessel prevents boundary displacement, so ordinary piston work is zero
even though pressure can increase sharply during heating. A solid constrained in a
rigid frame can develop internal stress as thermal expansion is opposed. In that
case the boundary model must specify what part of the solid and frame is included
in the system before assigning work. The first law remains unchanged, but the
mechanical transfer term cannot be inferred from temperature change alone.

The comparison separates two common statements. "The object expands" is a
geometric observation. "The system does work" is an energy-transfer statement that
requires a declared boundary and an external force-displacement interaction. In
laboratory calorimetry, expansion work of condensed samples is often negligible
compared with their heat-capacity terms. In gas processes with pistons, it is often
central. The scale of the boundary force determines which approximation is justified.

> **Worked example.** An insulated outer container holds a gas in thermal contact
> with $0.100\ \mathrm{kg}$ of water and a calorimeter cup of heat capacity
> $60\ \mathrm{J\,K^{-1}}$. During a process the water and cup warm by
> $1.50\ \mathrm K$, so their internal-energy gain is
> $(0.100)(4184)(1.50)+(60)(1.50)=718\ \mathrm J$. This energy comes from the gas but
> stays internal to the combined system.
>
> Now an external piston does $+150\ \mathrm J$ of work on the gas while no heat
> crosses the outer insulated boundary. For the combined gas–water–cup system the
> first law gives total internal-energy change $+150\ \mathrm J$, since the piston work
> is the only external transfer. The calorimeter materials gain $718\ \mathrm J$, so
> the gas changes by $150-718=-568\ \mathrm J$: it cools internally even though work is
> done on it, because it hands a larger amount of energy to the water and cup.
>
> A gas-only balance agrees. Heat into the gas is $Q_{\rm in,gas}=-718\ \mathrm J$
> (energy leaves the gas for the calorimeter) and work on the gas is
> $+150\ \mathrm J$, so $\Delta E_{\rm int,gas}=-718+150=-568\ \mathrm J$. The two
> descriptions match only when the boundary is drawn consistently: heat between gas and
> water is external to the gas alone but internal to the combined system.

Temperature measurement and energy transfer stay distinct here. The calorimeter's
temperature rise fixes the energy gained by water and cup only once their heat
capacities are known, and the gas internal-energy change does not follow from its
pressure alone without an ideal-gas state model and the relevant temperature change.
The final check is that the component changes sum to the external work on the combined
system.

Boundary-work bookkeeping also requires a time interval. A gas can first transfer
heat to the calorimeter at nearly fixed volume and later expand against the piston.
Combining the stages is valid only after the signs and energy transfers from both
stages are added. Treating the final volume change as though it occurred during the
entire heat-transfer interval can assign the correct total energy to the wrong
mechanism and obscure where the external work actually crossed the boundary.

**Quasistatic and irreversible work paths.**

The work formula $W_{\rm on}=-\int p\d V$ uses the gas pressure along a sequence
of equilibrium states. A quasistatic compression or expansion is slow enough that
the gas is nearly uniform at each stage, so pressure and temperature can be
assigned to the gas while the piston moves. In the limiting mechanically reversible
case, the external pressure differs from the gas pressure by an arbitrarily small
amount. Reversing that small difference reverses the motion, so the system can
trace the same PV path in the opposite direction. The area under the curve then
gives a well-defined work value for the gas.

Real pistons may move under a finite pressure difference, friction, turbulence, or
rapid expansion. The gas can then have pressure gradients and directed motion, so
one equilibrium pressure value does not represent the entire gas. The boundary work
is still defined by the force exerted at the moving boundary times its displacement,
but it cannot automatically be calculated from a single gas PV curve. A sudden
expansion against a constant external pressure has work based on
that external pressure and the volume change, not on a guessed average of the
initial and final gas pressures.

The difference matters even when two processes share the same initial and final
states. Internal-energy change for an ideal gas is fixed by the endpoint
temperatures. Work can differ because the boundary-force history differs; heat
transfer must then differ by the same amount to satisfy the first law. A slow
compression with effective thermal contact may follow a path close to an isotherm.
A rapid insulated compression can follow an adiabatic path and end at a higher
temperature. The final states are generally different unless the heat and work
transfers have been arranged to compensate.

Friction inside a piston mechanism is a simple irreversible contribution.
During a compression, the external agent supplies energy to overcome both the gas
pressure and mechanical friction. Reversing the piston direction does not return
all of that mechanical energy to the agent; some becomes internal energy of the
piston and surroundings. A wide hysteresis loop in measured force versus position
is evidence that the forward and reverse work paths differ. The first law still
balances energy, but a reversible-limit PV area no longer describes the entire
apparatus unless frictional heating is included in the selected system.

A practical calculation begins by identifying the pressure that acts at the moving
boundary. In a slow, frictionless piston experiment it is appropriate to use gas
pressure. In a rapid process it is safer to measure the external load, piston area,
and displacement. The system boundary also matters: work done against atmospheric
pressure is external to the gas, whereas work exchanged between a gas and an
included piston can be internal to a larger gas--piston system. These distinctions
prevent the common but incorrect step of assigning one universal work formula to
every volume change.

| process model | force or pressure used at the moving boundary | work-on-gas reduction | condition that permits the reduction |
|---|---|---|---|
| quasistatic, frictionless piston | gas pressure, equal to external pressure in the reversible limit | $W_{\rm on}=-\int p_{\rm gas}\d V$ | The gas has a well-defined equilibrium pressure at each intermediate volume. |
| sudden expansion against a constant load | prescribed external pressure | $W_{\rm on}=-p_{\rm ext}(V_f-V_i)$ | The external load remains known while the gas itself may be nonuniform. |
| free expansion into vacuum | effectively zero external pressure | $W_{\rm on}=0$ | No force resists the boundary motion, even though the gas has nonzero internal pressure. |
| piston with measured friction or a time-varying drive | measured external boundary force divided by piston area | $W_{\rm on}=-\int p_{\rm ext}\d V$ | The force record and displacement record refer to the same boundary and time interval. |

> **Worked example.** One mole of an ideal gas runs a rectangular cycle on a $pV$
> diagram. State A is at $2.00\ \mathrm{atm}$, $1.00\ \mathrm L$. The gas expands at
> constant pressure to B at $2.50\ \mathrm L$, cools at constant volume to C at
> $1.00\ \mathrm{atm}$, is compressed at that pressure to D at $1.00\ \mathrm L$, and
> returns to A at constant volume. Each leg has its own boundary condition, so work is
> evaluated leg by leg.
>
> A→B expands through $1.50\ \mathrm L$ at $2.00\ \mathrm{atm}$:
> $W_{\rm on}=-3.00\ \mathrm{L\,atm}=-304\ \mathrm J$. B→C is constant volume,
> $W_{\rm on}=0$. C→D compresses through $1.50\ \mathrm L$ at $1.00\ \mathrm{atm}$:
> $W_{\rm on}=+1.50\ \mathrm{L\,atm}=+152\ \mathrm J$. D→A is constant volume,
> $W_{\rm on}=0$. The cycle total is $W_{\rm on}=-152\ \mathrm J$.
>
> The gas returns to its original pressure and volume, hence to its original
> temperature and internal energy, so $\Delta E_{\rm int}=0$ over the cycle and
> $Q_{\rm in,total}=-W_{\rm on,total}=+152\ \mathrm J$. Net heat enters and an equal net
> work leaves as the gas pushes the surroundings. This does not mean every leg absorbs
> heat; some legs release heat while the four-leg sum stays positive.

The same calculation can be checked locally. Constant-volume cooling from B to C
has zero work, so its internal-energy decrease equals its negative heat transfer.
Constant-volume heating from D to A has zero work, so its internal-energy increase
equals its positive heat transfer. On the constant-pressure legs, heat transfer
must account for both the internal-energy change and the work term. Adding the four
leg-by-leg first-law equations cancels the intermediate state energies and leaves
the cycle result. This catches a sign error before it is hidden by
the final sum.

Area orientation carries the same information. The cycle traversed in the stated
direction has a net area corresponding to work done by the gas. Reversing the
cycle reverses the work and heat signs while leaving zero total internal-energy
change. A pressure-volume diagram includes endpoints and an oriented path. The
path determines the work history required by the first law.

$$
% caption: A rectangular PV cycle is evaluated one leg at a time. The constant-volume legs contribute zero boundary work; the oriented enclosed area is the net work the gas delivers over the complete cycle.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(6.2,0) node[right] {volume};
\draw[->,black] (0,0)--(0,3.5) node[above] {pressure};
\fill[acc!10] (1.2,0.85) rectangle (5.05,2.8);
\draw[acc,very thick,->] (1.2,2.8)--(5.05,2.8);
\draw[acc,very thick,->] (5.05,2.8)--(5.05,0.85);
\draw[acc,very thick,->] (5.05,0.85)--(1.2,0.85);
\draw[acc,very thick,->] (1.2,0.85)--(1.2,2.8);
\node[black,anchor=south east] at (1.2,2.8) {A};
\node[black,anchor=south west] at (5.05,2.8) {B};
\node[black,anchor=north west] at (5.05,0.85) {C};
\node[black,anchor=north east] at (1.2,0.85) {D};
\node[acc] at (3.12,1.82) {net work by gas};
\end{tikzpicture}
$$

**Heat capacity at constant volume and pressure.**

Heat capacity depends on the process constraint. At constant volume, a gas cannot
perform boundary work because its volume does not change. The heat transferred in
is therefore the internal-energy increase: $Q_V=C_V\Delta T$. At constant pressure,
the gas expands while it is heated and does work on the surroundings. The heat
transfer is $Q_P=C_P\Delta T$, and $C_P$ exceeds $C_V$ because it includes both
the same internal-energy increase and the expansion-work requirement.

An ideal gas has $P\Delta V=nR\Delta T$ during a constant-pressure temperature
change. Combining this work term with the first law
gives $C_P=C_V+nR$ for a sample of $n$ moles. The difference is not an additional
kind of internal energy. It is the energy per temperature rise needed to push back
the surroundings during constant-pressure expansion. For condensed substances,
thermal volume changes are small, so the difference between the two heat capacities
is usually negligible. For gases, it is substantial.

One mole of a monatomic ideal gas has $C_V=(3/2)R=12.47\ \mathrm{J\,K^{-1}}$ and
$C_P=(5/2)R=20.79\ \mathrm{J\,K^{-1}}$. Heating it by $30\ \mathrm K$ at constant
volume requires $374\ \mathrm J$. Heating it through the same temperature interval
at constant pressure requires $624\ \mathrm J$. The difference, $250\ \mathrm J$,
equals $nR\Delta T$ and is the work done by the gas during the constant-pressure
expansion. Both paths have the same internal-energy change because they have the
same temperature change.

Heat-capacity notation must specify whether values are total, molar, or specific.
A total heat capacity has units of joules per kelvin, a molar heat capacity has
units of joules per mole kelvin, and a mass-specific heat capacity has units of
joules per kilogram kelvin. Mixing these quantities can produce a correct-looking
formula with an incorrect scale. The number of moles belongs in the ideal-gas
relation when total heat capacities are used, whereas molar heat capacities apply
per mole directly.

The process comparison is experimentally testable. Heat a gas by the same measured
temperature interval once in a rigid container and once under a constant piston
load. The constant-pressure trial requires more input energy if losses are
controlled. The measured difference determines the gas constant per mole
and connects calorimetry, piston work, and the ideal-gas equation in one first-law
experiment.

$$
% caption: Constant-volume heating sends all transferred heat into internal energy. Constant-pressure heating splits the input between internal energy and piston work, so the heat capacity exceeds the constant-volume value by $nR$ for an ideal gas.
\begin{tikzpicture}[>=stealth,font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\node[black,anchor=west] at (0,2.05) {volume held: same temperature rise};
\fill[acc!18] (0,1.15) rectangle (4.2,1.75);
\draw[black,thick] (0,1.15) rectangle (4.2,1.75);
\node[acc] at (2.1,1.45) {all to internal energy};
\node[black,anchor=west] at (0,0.75) {pressure held: extra input as work};
\fill[acc!18] (0,-0.15) rectangle (4.2,0.45);
\fill[black] (4.2,-0.15) rectangle (5.4,0.45);
\draw[black,thick] (0,-0.15) rectangle (5.4,0.45);
\draw[black] (4.2,-0.15)--(4.2,0.45);
\node[acc] at (2.1,0.15) {internal energy};
\node[black] at (4.8,0.15) {work};
\end{tikzpicture}
$$

The heat-capacity comparison assumes the same amount of gas and the same
temperature interval in both trials. A larger constant-pressure heat input does
not mean that the gas stores more internal energy at the final temperature. The
endpoint temperature fixes the ideal-gas internal-energy change; the additional
input has crossed the boundary as piston work. This distinction is the numerical
content of $C_P-C_V=nR$, not an optional correction added after the energy balance.
