Consider a cylinder of volume V containing n moles of an ideal gas at pressure P, fitted with a piston of area A. Suppose, the gas is heated at constant pressure which raises its temperature by dT. The gas exerts a total force F = PA on the piston which moves outward a small distance dx.

dW = Fdx = PAdx = PdV … (1)

where Adx = dV is the increase in volume of the gas during the expansion. dW is the work done by the gas on the surroundings as a result of the expansion. If the heat supplied to the gas is dQ_{p} and the increase in its internal energy is dE then, by the first law of thermodynamics,

dQ_{p} = dE + dW=dE + PdV

If C_{p} is the molar specific heat capacity of the gas at constant pressure, dQ = nC_{p} dT.

∴ nC_{p}dT = dE + PdV …(2)

On the other hand, if the gas was heated at constant volume (instead of at constant pressure) from the initial state such that its temperature increases by the same amount dT, then dW=0. Since the internal energy of an ideal gas depends only on the temperature, the increase in internal would again be dE. If dQv was the heat supplied to the gas in this case, by the first law of thermodynamics and the definition of molar specific heat capacity at constant volume (C_{V}),

The equation of state of an ideal gas is PV = nRT.

Therefore, at a constant pressure,

PdV = nRdT

\(\therefore\) \(\frac{dV}{dT}\) = \(\frac{nR}{P}\).......(5)

From Eqs. (4) and (5).

Cp - Cv = \(\frac{P}n\),\(\frac{nR}{P}\) = R.....(6)

This is Mayer’s relation between C and C_{V}.

Here, heat and work are expressed in the same units. If heat is expressed in calorie or kilo calorie and work is expressed in erg or joule, the above relation becomes

C_{p} – C_{v} = \(\frac RJ\)......(7)

Where J is the mechanical equivalent of heat.