# Criterion for Spontaneity for Closed Systems at Constant Volume and Pressure

For a closed system at constant temperature and volume, the criterion for spontaneity is $$dA < 0$$. However, for a system at constant composition, the total differential of $$A$$ is given by $$dA = -PdV -SdT.$$ This seems to imply that $$dA = 0$$ for a system at constant volume, temperature, and composition. The Wikipedia page for Helmholtz Free Energy claims that this relationship holds even for non-spontaneous processes. The derivation of $$A$$ as criterion for spontaneity at constant volume and temperature is $$dA = dU - TdS - SdT = \delta q - TdS + \delta w - SdT.$$ If we consider only $$PdV$$ work, we obtain $$dA = \delta q - TdS - PdV - SdT$$ and at constant $$T$$ and $$V$$, we get $$dA = \delta q -TdS.$$ The criterion $$dA <0$$ for spontaneous processes then follows from the Clausius inequality. These two equations seem to be contradictory, so I was hoping someone could explain how this can be reconciled. Thank you so much!

Clarification: The way I derived the $$dA = -PdV - SdT$$ for an arbitrary process is as follows:

For a function $$f(x_1,\dots,x_n)$$, the complete differential of $$f$$ is $$df = f_1 dx_1 + f_2 dx_2 + \dots + f_n dx_n$$ where $$f_i = \left(\frac{\partial f}{\partial x_i}\right)_{x_j \: j\neq i}.$$ Consider the function $$g = f - f_1 x_1.$$ The differential of $$g$$ is $$dg = df - f_1 dx_1 -x_1df_1$$ so that $$dg = -x_1 df_1 + f_2 dx_2 + \dots + f_n dx_n.$$ Now, applying this to the special case of internal energy $$U(S,V)$$, if we define $$A = U - \left(\frac{\partial U}{\partial S}\right)_{V} S = U - TS$$ then the above implies that $$dA = -SdT - PdV$$ since $$dU = TdS - PdV.$$

• Consider review of search results for site:stackexchange.com OR site:libretexts.org thermodynamics closed system spontaneity criteria Oct 10 at 20:57
• Provide you reasoning what you think they are contradictory. as dS >= dq/T, dq - TdS <=0. 0 for reversible processes, <0 for spontaneous ones. Oct 10 at 21:03
• For a spontaneous process at constant temperature and volume, the fact that $dQ < TdS$ implies that $dA < 0$ with a strict inequality. However, the fact that $dA = - PdV -SdT$ seems to imply that for any constant volume and temperature (and constant composition), we have $dA = 0$ since $dV = 0$ and $dT = 0$. This is the main source of my confusion. Oct 10 at 22:39
• dA=-p.dV -SdT is derived with assumption dq=T.dS, i.e. for reversible, non spontaneous changes, so TdS and -TdS mutually cancel. Oct 11 at 6:11
• The link I provided to the Wikipedia article states that this relationship holds for non-reversible processes as well. That is where I am confused Oct 11 at 10:37

$$A = U -TS$$ $$\mathrm{d}A = \delta Q - p\mathrm{d}V + \delta W_\text{nonexp} - T\mathrm{d}S - S\mathrm{d}T$$ $$dS \ge \delta Q/T \implies T\mathrm{d}S \ge \delta Q$$ Assuming $$\delta W_\text{nonexp}=0$$: $$\mathrm{d}A = \delta Q - p\mathrm{d}V - T\mathrm{d}S - S\mathrm{d}T$$ As $$T\mathrm{d}S \ge \delta Q$$: $$\mathrm{d}A \le T\mathrm{d}S - p\mathrm{d}V - T\mathrm{d}S - S\mathrm{d}T$$ $$\mathrm{d}A \le - p\mathrm{d}V - S\mathrm{d}T$$
• This makes sense. Does the derivation of $dA = -PdV - SdT$ using Legendre transformations assume reversibility? I thought it holds in general Oct 11 at 11:46