# 8.7: When Two Variables Change at Once

- Last updated

- Save as PDF

- Page ID
- 199224

- Contributed by Patrick Fleming
- Assistant Professor (Chemistry and Biochemistry) at California State University East Bay

So far, we have derived a number of expressions and developed methods for evaluating how thermodynamic variables change as one variable changes while holding the rest constant. But real systems are seldom this accommodating. For example, a piece of metal (such as a railroad rail) left in the sun will undergo both an increase in temperature and an expansion due to the absorption of energy from sunlight. So both \(T\) and \(V\) are changing at the same time! If the change in a thermodynamic variable (such as \(G\)) is needed, contributions from both changes are required to be taken into account. We’ve already seen how to express this in terms of a total differential.

\[ dG = \left( \dfrac{\partial G}{\partial p} \right)_T dp + \left( \dfrac{\partial G}{\partial T} \right)_p dT \label{Total2}\]

Fortunately, \(G\) (like the other thermodynamic functions \(U\), \(H\), \(S\), and \(A\)) is kind enough to be a state variable. This means that we can consider the changes independently and then simply add the results. Another way to think of this is that the system may follow either of two pathways to get from the initial conditions to the final conditions:

*Pathway I:*

- An isothermal expansion from \(V_1\) to \(V_2\) at \(T_1\) followed by
- An isochoric temperature increase from \(T_1\) to \(T_2\) at \(V_2\)

*Pathway 2:*

- An isochoric temperature increase from \(T_1\) to \(T_2\) at \(V_1\) followed by
- And isothermal expansion from \(V_1\) to \(V_2\) at \(T_2\)

And since \(G\) has the good sense to be a state variable, the pathway connecting the initial and final states is unimportant. We are free to choose any path that is convenient to calculate the change.

Example \(\PageIndex{1}\): Non-Isothermal Gas Expansion

Calculate the entropy change for 1.00 mol of a monatomic ideal gas (C_{V} = 3/2 R) expanding from 10.0 L at 273 K to 22.0 L at 297 K.

**Solution**:

If one considers entropy to be a function of temperature and volume, one can write the total differential of entropy as

\[dS = \left( \dfrac{\partial S}{\partial T} \right)_V dT + \left( \dfrac{\partial S}{\partial V} \right)_T dV \]

and thus

\[\Delta S = \int_{T_1}^{T_2} \left( \dfrac{\partial S}{\partial T} \right)_V dT + \int_{V_1}^{V_2} \left( \dfrac{\partial S}{\partial V} \right)_T dV \]

The first term is the contribution due to an *isochoric temperature* change:

\[ \begin{align} \Delta S_{T_1 \rightarrow T_2} & = \int_{T_1}^{T_2} \left( \dfrac{\partial S}{\partial T} \right)_V dT \\ & = \int_{T_1}^{T_2} \dfrac{n C_V}{T} dT \\ & = nC_V \ln \left(\dfrac{T_2}{T_1} \right) \\ & = (1.00\, mol) \left( \dfrac{3}{2} \cdot 8.314 \dfrac{J}{mol\,K} \right) \ln \left(\dfrac{297\,K}{273\,K }\right) \\ & = 13.57 \,J/K \end{align}\]

The second term is the contribution due to an isothermal expansion:

\[\Delta S_{V_1 \rightarrow V_2} = \int_{V_1}^{V_2} \left( \dfrac{\partial S}{\partial V} \right)_T dV \label{second}\]

From the Maxwell relation on \(A\)

\[ \left( \dfrac{\partial S}{\partial V} \right)_T = \left( \dfrac{\partial p}{\partial T} \right)_V\]

So Equation \ref{second} becomes

\[ \begin{align} \Delta S_{V_1 \rightarrow V_2} & = \int_{V_1}^{V_2} \left( \dfrac{\partial p}{\partial T} \right)_V dV \\ & = \int_{V_1}^{V_2} \left( \dfrac{nR}{V} \right) dV\\ & = nR \ln \left(\dfrac{V_2}{V_1} \right) \\ &= (1.00\, mol) \left( 8.314 \dfrac{J}{mol\,K} \right) \ln \left(\dfrac{22.0\,L}{10.0\,L }\right) \\ & = 6.56\, J/K \end{align} \]

And the total entropy change is

\[\begin{align} \Delta S_{tot} & = \Delta S_{V_1 \rightarrow V_2} + \Delta S_{V_1 \rightarrow V_2} \\ & = 13.57\,J/K + 6.56 \,J/K \\ & = 20.13\,J/K \end{align}\]

Deriving an expression for a partial derivative (Type III)

Thermodynamics involves many variables. But for a single component sample of matter, only two state variables are needed to describe the system and fix all of the thermodynamic properties of the system. As such, it is conceivable that two functions can be specified as functions of the same two variables. In general terms: \(z(x, y)\) and \(w(x, y)\).

So an important question that can be answered is, “What happens to \(z\) if \(w\) is held constant, but \(x\) is changed?” To explore this, consider the total differential of \(z\):

\[dz = \left( \dfrac{\partial z}{\partial x} \right)_y dx + \left( \dfrac{\partial z}{\partial y} \right)_x dy \label{eq5}\]

but \(z\) can also be considered a function of \(x\) and \(w(x, y)\). This implies that the total differential can also be written as

\[dz = \left( \dfrac{\partial z}{\partial x} \right)_w dx + \left( \dfrac{\partial z}{\partial w} \right)_x dy \label{eq6}\]

and these two total differentials must be equal to one another!

\[ = \left( \dfrac{\partial z}{\partial x} \right)_y dx + \left( \dfrac{\partial z}{\partial y} \right)_x dy = \left( \dfrac{\partial z}{\partial x} \right)_w dx + \left( \dfrac{\partial z}{\partial w} \right)_x dw\]

If we constrain the system to a change in which \(w\) remains constant, the last term will vanish since \(dw = 0\).

\[ \left( \dfrac{\partial z}{\partial x} \right)_y dx + \left( \dfrac{\partial z}{\partial y} \right)_x dy = \left( \dfrac{\partial z}{\partial x} \right)_w dx \label{eq10}\]

but also, since \(w\) is a function \(x\) and \(y\), the total differential for \(w\) can be written

\[dw = \left( \dfrac{\partial w}{\partial x} \right)_y dx + \left( \dfrac{\partial w}{\partial y} \right)_x dy \]

And it too must be zero for a process in which \(w\) is held constant.

\[ 0 = \left( \dfrac{\partial w}{\partial x} \right)_y dx + \left( \dfrac{\partial w}{\partial y} \right)_x dy\]

From this expression, it can be seen that

\[dy = - \left( \dfrac{\partial w}{\partial x} \right)_y \left( \dfrac{\partial y}{\partial w} \right)_x dx\]

Substituting this into the Equation \ref{eq10}, yields

\[ \left( \dfrac{\partial z}{\partial x} \right)_y dx + \left( \dfrac{\partial z}{\partial y} \right)_x \left[ - \left( \dfrac{\partial w}{\partial x} \right)_y \left( \dfrac{\partial y}{\partial w} \right)_x dx \right] = \left( \dfrac{\partial z}{\partial x} \right)_w dx \label{eq20}\]

which simplifies to

\[ \left( \dfrac{\partial z}{\partial x} \right)_y dx - \left( \dfrac{\partial z}{\partial w} \right)_x \left( \dfrac{\partial w}{\partial x} \right)_y dx = \left( \dfrac{\partial z}{\partial x} \right)_w dx\]

So for \(dx \neq 0\), implies that

\[ \left( \dfrac{\partial z}{\partial x} \right)_y - \left( \dfrac{\partial z}{\partial w} \right)_x \left( \dfrac{\partial w}{\partial x} \right)_y = \left( \dfrac{\partial z}{\partial x} \right)_w \]

or

\[ \left( \dfrac{\partial z}{\partial x} \right)_y = \left( \dfrac{\partial z}{\partial x} \right)_w + \left( \dfrac{\partial z}{\partial w} \right)_x \left( \dfrac{\partial w}{\partial x} \right)_y \label{final1}\]

As with partial derivative transformation types I and II, this result can be achieved in a formal, albeit less mathematically rigorous method.

Consider \(z(x, w)\). This allows us to write the total differential for \(z\):

\[ dz = \left( \dfrac{\partial z}{\partial x} \right)_w dx + \left( \dfrac{\partial z}{\partial w} \right)_x dw \]

Now, divide by \(dx\) and constrain to constant \(y\).

\[\left.\dfrac{dz}{dx} \right\rvert_{y}= \left( \dfrac{\partial z}{\partial x} \right)_w \left.\dfrac{dx}{dx} \right\rvert_{y} + \left( \dfrac{\partial z}{\partial w} \right)_x \left.\dfrac{dw}{dx} \right\rvert_{y} \]

noting that \(dx/dx = 1\) and converting the other ratios to partial derivatives yields

\[ \left( \dfrac{\partial z}{\partial x} \right)_y = \left( \dfrac{\partial z}{\partial x} \right)_w + \left( \dfrac{\partial z}{\partial w} \right)_x \left( \dfrac{\partial w}{\partial x} \right)_y \label{final2}\]

which agrees with the previous result (Equation \ref{final1})! Again, the method is not mathematically rigorous, but it works so long as \(w\), \(x\), \(y\), and \(z\) are **state functions** and the total differentials \(dw\), \(dx\), \(dy\), and \(dz\) are **exact**.

Contributors

Patrick E. Fleming (Department of Chemistry and Biochemistry; California State University, East Bay)