Definition of heat capacity in thermodynamics The following wikipedia page derives the expression of heat capacity of a system when holding different state variables constant: https://en.wikipedia.org/wiki/Relations_between_heat_capacities#Ideal_gas
It is shown that the relationship is given by ("blah" is the state variable being held constant):
$$
C_{blah} = T \left(\frac{\partial S}{\partial T}\right)_{blah}
$$
In the derivation, it is explicitly assumed that, when the gas (or whatever thermodynamic system interested) is being heated, it undergoes a reversible change.  May I ask why is this assumption valid?  Is it just from the definition of heat capacity?
 A: What you want when considering heat capacity is that, when you heat an object up and cool it down you get back what you started with. For example, if you take cold water, heat it up to hot water, and then cool it back down you get back cold water, an almost identical macrostate. However, if you take cake batter, heat it up to get cooking cake, and then cool it down to get cooked cake, you have a very different macrostate. The assumption of reversibility limits heat capacity to the description of reversible systems like heating up and cooling down water, and not irreversible systems like cooking cake.
A: The definition of heat capacity at constant volume $C_v$ is $$C_v=\left(\frac{\partial U}{\partial T}\right)_V$$ and the definition of heat capacity at constant pressure $C_p$ is $$C_p=\left(\frac{\partial H}{\partial T}\right)_P$$where U is the internal energy and H is the enthalpy.  If we make use of the property relationship $$dU=TdS-PdV$$ and the equivalent property relationship $$dH=TdS+PdV$$ we obtain:  $$C_v=T\left(\frac{\partial S}{\partial T}\right)_V$$ and $$C_p=T\left(\frac{\partial S}{\partial T}\right)_P$$
Since, at equilibrium, all the thermodynamic functions can be regarded as depending on T and any one other thermodynamic parameter, the above relationships provide the basis for extending the definition to $C_{blah}$ to the equation you provided in the original post.
