Many thermodynamic quantities depend on more than one variable. For example, pressure may depend on both temperature and volume, while enthalpy may depend on both pressure and temperature. When a function depends on multiple variables, it becomes useful to ask how the function changes when only one variable is changed while all others are held constant.
This leads to the concept of a partial derivative. For a function
\[ f(x,y) \]
the partial derivative with respect to \(x\) is defined as
\[ \left( \frac{\partial f} {\partial x} \right)_y = \lim_{\Delta x\rightarrow 0} \frac{ f(x+\Delta x,y)-f(x,y) } { \Delta x } \]
while the partial derivative with respect to \(y\) is
\[ \left( \frac{\partial f} {\partial y} \right)_x = \lim_{\Delta y\rightarrow 0} \frac{ f(x,y+\Delta y)-f(x,y) } { \Delta y } \]
Geometrically, these derivatives represent the slope of the function surface in the \(x\)-direction and \(y\)-direction, respectively.
If a function depends on two independent variables,
\[ f=f(x,y) \]
then a small change in the function can arise from a change in \(x\), a change in \(y\), or both. The total differential is therefore
\[ df = \left( \frac{\partial f} {\partial x} \right)_y dx + \left( \frac{\partial f} {\partial y} \right)_x dy \]
This expression separates the total change in the function into the contributions arising from each independent variable.
Consider the function
\[ f(x,y) = 4xy^2 - 2xy + 3 \]
First calculate the partial derivatives:
\[ \left( \frac{\partial f} {\partial x} \right)_y = 4y^2 - 2y \]
and
\[ \left( \frac{\partial f} {\partial y} \right)_x = 8xy - 2x \]
Substituting into the definition of the total differential gives
\[ df = (4y^2-2y)\,dx + (8xy-2x)\,dy \]
This expression tells us how the value of \(f\) changes for small changes in \(x\) and \(y\).
Consider again the function
\[ f(x,y) = 4xy^2 - 2xy + 3 \]
We previously found the total differential
\[ df = (4y^2-2y)\,dx + (8xy-2x)\,dy \]
Let us calculate the change in \(f\) as the system moves from
\[ (x_1,y_1) = (1,1) \]
to
\[ (x_2,y_2) = (2,3) \]
Evaluate the function at the initial state:
\[ f(1,1) = 4(1)(1)^2 - 2(1)(1) + 3 = 5 \]
Evaluate the function at the final state:
\[ f(2,3) = 4(2)(3)^2 - 2(2)(3) + 3 = 63 \]
Therefore
\[ \Delta f = f(2,3)-f(1,1) = 63-5 = 58 \]
Because \(df\) is an exact differential, the change in \(f\) can be calculated by integrating the differential along any convenient pathway.
First change \(x\) from 1 to 2 while holding \(y=1\) constant.
\[ \Delta f_1 = \int_1^2 (4(1)^2-2(1)) \,dx \]
\[ \Delta f_1 = \int_1^2 2\,dx = 2 \]
Next change \(y\) from 1 to 3 while holding \(x=2\) constant.
\[ \Delta f_2 = \int_1^3 (8(2)y-2(2)) \,dy \]
\[ \Delta f_2 = \int_1^3 (16y-4) \,dy \]
\[ \Delta f_2 = \left[ 8y^2-4y \right]_1^3 = 56 \]
The total change is therefore
\[ \Delta f = \Delta f_1+\Delta f_2 = 2+56 = 58 \]
Both methods produced exactly the same result:
\[ \Delta f = 58 \]
This agreement occurs because \(df\) is an exact differential. Exact differentials correspond to state functions, meaning that the total change depends only on the initial and final states and not on the pathway chosen for the integration.
This is precisely the property that makes thermodynamic state functions such as \(U\), \(H\), \(p\), and \(V\) so useful.
A differential is called an exact differential if it corresponds to an actual function. Consider a differential written in the form
\[ df = M(x,y)\,dx + N(x,y)\,dy \]
The differential is exact if it satisfies the Euler relation
\[ \frac{\partial M} {\partial y} = \frac{\partial N} {\partial x} \]
For the example above,
\[ M(x,y) = 4y^2-2y \]
\[ N(x,y) = 8xy-2x \]
Taking the required derivatives:
\[ \frac{\partial M} {\partial y} = 8y-2 \]
\[ \frac{\partial N} {\partial x} = 8y-2 \]
Since
\[ \frac{\partial M} {\partial y} = \frac{\partial N} {\partial x} \]
the Euler relation is satisfied and the differential is exact.
Big picture: Total differentials allow us to describe how a function changes when several variables change simultaneously. Exact differentials are especially important in thermodynamics because all thermodynamic state functions—such as \(U\), \(H\), \(p\), \(V\), and \(T\)—must satisfy the Euler relation. This will become an essential point when we get to chapter 6 and derive the Maxwell Relations.
Find expressions for
\[ \left( \frac{\partial f} {\partial x} \right)_y \]
and
\[ \left( \frac{\partial f} {\partial y} \right)_x \]
for the function
\[ f(x,y) = x^2-y^2 \]
When calculating
\[ \left( \frac{\partial f} {\partial x} \right)_y \]
the variable \(y\) is treated as a constant.
\[ \left( \frac{\partial f} {\partial x} \right)_y = \frac{\partial} {\partial x} \left( x^2-y^2 \right) \]
The derivative of \(x^2\) is \(2x\), while the derivative of the constant term \(-y^2\) is zero:
\[ \left( \frac{\partial f} {\partial x} \right)_y = 2x \]
When calculating
\[ \left( \frac{\partial f} {\partial y} \right)_x \]
the variable \(x\) is treated as a constant.
\[ \left( \frac{\partial f} {\partial y} \right)_x = \frac{\partial} {\partial y} \left( x^2-y^2 \right) \]
The derivative of the constant term \(x^2\) is zero, while
\[ \frac{\partial}{\partial y} \left( -y^2 \right) = -2y \]
so
\[ \left( \frac{\partial f} {\partial y} \right)_x = -2y \]
\[ \boxed{ \left( \frac{\partial f} {\partial x} \right)_y = 2x } \]
\[ \boxed{ \left( \frac{\partial f} {\partial y} \right)_x = -2y } \]
Physical interpretation: The slope of the surface in the \(x\)-direction depends only on \(x\), while the slope in the \(y\)-direction depends only on \(y\). Because a surface can have different slopes in different directions, multiple partial derivatives are needed to describe how the function changes.
Big picture: Thermodynamics relies heavily on functions that depend on multiple variables. Partial derivatives describe how those functions change in specific directions, total differentials describe their overall change, and exact differentials ensure that state functions depend only on the initial and final states rather than the pathway followed between them.