# Entropy paradox and Confusion with Gibbs energy

Define $$G=H-TS_\text{sys}$$. Then,

\begin{align} \mathrm dG &=\mathrm dH-S_\text{sys}\,\mathrm dT-T\,\mathrm dS_\text{sys}\\[3pt] &=-T\left(\frac{-\mathrm dH}T+\mathrm dS_\text{sys}+S_\text{sys}\,\frac{\mathrm dT}T\right) \end{align}

At conditions of constant temperature and pressure, $$\frac{-\mathrm dH}T=\mathrm dS_\text{surr}$$ and $$\mathrm dT=0$$. Thus, we end up with: $$\mathrm dG=-T(\mathrm dS_\text{sys}+\mathrm dS_\text{surr})=-T(\mathrm dS_\text{universe})\tag{E-01}$$ Using $$H=U+pV$$, and by using the first law of thermodynamics, it can be shown that:

$$\mathrm dG=V\,\mathrm dp-S\,\mathrm dT$$

At constant $$p,T$$, this equation reduces to $$\mathrm dG=0$$. Using this in $$\text{E-01}$$ yields $$\mathrm dG=\mathrm dS_\text{universe}=0$$, at constant $$T$$ and $$p$$.

So how exactly do we obtain the so-called "spontaneous processes", which have a negative value of $$\mathrm dG$$ at constant $$T$$ and $$p$$?

I can somewhat see why the result makes some sense: The conditions assumed in the derivation resemble a reversible thermodynamic process, for which it's known that $$\mathrm dS_\text{universe}$$ is zero. The question in bold though is still unanswered. Maybe I am confused regarding what is actually meant by $$\Delta G$$.

• You said it already with $dG = -TdS_{\mathrm{univ}}$. The case of spontaneity is $dS_{\mathrm{univ}}>0$ implies $dG < 0$.
– Zhe
Aug 7, 2020 at 20:21
• Also, I am a bit surprised by this question. I would think that satan would be the master of entropy...
– Zhe
Aug 7, 2020 at 20:23
• I think I see your problem. Are you claiming that $dS = \frac{dH}{T}$?
– Zhe
Aug 7, 2020 at 20:42
• But $dS = \frac{\delta q}{T}$.
– Zhe
Aug 8, 2020 at 0:31
• During the derivation of the stated equation, you need to make two assumptions : 1. Non PV work is zero. 2. The process is reversible as then only you would be able to write PV work as -P.dv That's why it yields zero at constant pressure and temperature , which indeed it should for a reversible process. Mar 2, 2021 at 18:16

The essence of what's going on is this:

Your equation, $$dG = Vdp -SdT$$, is correct, but has restrictions you don't realize. Specifically, it applies only to systems that are (a) closed (so no adding or subtracting material), (b) have only a single component* (so no mixing, phase changes, or chemical reactions) and (c) that can do $$pV\ \hspace{-.45em}$$-work only.

[*It also applies to multi-component systems where the composition is fixed.]

To understand why, under such conditions, $$dT = 0 \text{ and } dp = 0 \Rightarrow dG = 0$$, let's apply the Gibbs phase rule to such a system. The phase rule says:

$$F = C − P + 2,$$

where C is the number of components, P is the number of phases at equilibrium (not to be confused with $$p$$, pressure), and F is the number of degrees of freedom.

Since $$C = 1 \text{ and } P = 1$$, we obtain $$F = 2$$. That means we only have two degrees of freedom, i.e., two independent ways in which we can vary the intensive properites of the system. If the only type of work we can do is $$pV\ \hspace{-.45em}$$-work, the only ways we can adjust the system's intensive properties are by changing its temperature or its pressure.

Hence, if we apply the restrictions $$\boldsymbol{dT=0 \textbf{ and } dp =0}$$ to a closed single-component system where we only allow $$\boldsymbol{pV}$$-work, the system can't change! And if the system can't change, then of course $$\boldsymbol{dG = 0}$$!

But, you might protest, $$dG$$ is not generally zero, even at fixed $$T\text{ and } p$$. So how do we reconcile this with what we wrote above? Well, we need a more general expression for $$dG$$ that allows for non-$$pV\ \hspace{-.45em}$$-work, addition and subtraction of material, and changes in composition:

$$dU = \text{đ}q + \text{đ}w +\sum_i \mu_i dn_i = \text{đ}q + \text{đ}w(pV) + \text{đ}w (non\text{-}pV) + \sum_i \mu_i dn_i$$

Since we can calculate $$dU$$ using any path, let's use a reversible path:

$$dU = TdS - pdV + \text{đ}w (non\text{-}pV, rev) + \sum_i \mu_i dn_i$$

And since:

$$G = U+pV-TS \Rightarrow dG = dU + pdV +Vdp - TdS - SdT$$

$$\Rightarrow dG = VdP -SdT+ \text{đ}w (non\text{-}pV, rev) + \sum_i \mu_i dn_i$$

Here, $$\sum_i \mu_i dn_i$$ is the sum of the chemical potential of each species $$i$$ $$(\mu_i)$$ times the change in the amount of species $$i$$ $$(dn_i)$$. This accounts for the change in $$U$$, and thus in $$G$$, as we change the composition

Hence, even if $$dT = 0 \text{ and } dp = 0$$, if we have non-$$pV\ \hspace{-.45em}$$-work and/or a change in composition (e.g., mixing, a change in phase, gain or loss of material, or a chemical reaction), it will not be the case that $$dG$$ is restricted to be zero.

• excelent answer, +1. Just one clarification: chemistry.stackexchange.com/questions/109951/…. The answer here seems to have only considered the equation dG=VdP-SdT, where dT=0. How does he then end up with the correct answer? Aug 9, 2020 at 7:51
• @satan29 He's calcuating the molar free energy (which is the chemical potential) for each phase separately, and then equating them. $d\frac{G}{n}=\frac{V}{n}dp-\frac{S}{n}dT= d\mu=vdp-sdT$ is applicable to each phase, because each phase meets requirements (b) & (c) indicated above; requirement (a) is not met, because material can move from one phase to another; however, since we are using molar quantities, and the composition of each phase is fixed, adding or removing material does not change the free energy per mole, and thus we don't need to meet requirement (a). Feb 8, 2021 at 7:21

For systems of variable composition (mixtures)

$$\mathrm dU=-p\mathrm dV + dw_{other}+ T\mathrm dS + \sum_i\mu_i\mathrm dn_i$$

$$\mathrm dG = V\mathrm dP -S\mathrm dT + dw_{other}+ \sum_i\mu_i\mathrm dn_i$$

or, at constant temperature and pressure,

$$\mathrm dG = dw_{other}+ \sum_i\mu_i\mathrm dn_i$$

With regard to the question of spontaneity, the explanation lies in a comment by Zhe. For a process involving a pure substance in a closed system that undergoes only expansion work at constant T and p,

$$dH=dq$$

but

$$dS=\frac{dq_{rev}}{T}$$

The "rev" label is important, the equation $$dS=\frac{dq}{T}$$ does not hold for just any process.

At constant T and p but without any constraint on reversibility,

$$dG=dH-TdS=dq-dq_{rev}$$

The second law $$dS_{universe} \ge 0$$ implies that

\begin{align} 0 &\ge -dS_{surroundings}-dS_{system}\\ 0 &\ge \frac{dq}{T} -\frac{dq_{rev}}{T}\\ 0 &\ge dq - dq_{rev} \end{align}

It follows that

$$dG\le 0$$

and only for a reversible process is $$dG=0$$.

This is what I think to be correct. Probably need confirmation from Chet Miller.

The fallacy in the proof (for dG always = 0 at constant p and constant T) is at the line

dG = Vdp - SdT......(E-02)

This is not always true. You understand that it is from First Law and the definition of enthalpy, but you have forgotten the assumption that you have made to reach E-02.

E-02 is from the fundamental equation

dU = TdS - pdV

If you substitute enthalpy definition and Gibbs energy definition into this, you will get E-02. But the problem is, when deriving the fundamental equation, you have assumed non-expansion work to be 0:

First Law: dU = dqrev + dwrev = TdS + dwrev;

dwrev = dwexpansion, rev + dwnon-expansion, rev = -pdV if dwnon-expansion, rev = 0

So dU = TdS - pdV is true only if dwnon-expansion, rev = 0

So dG = Vdp - SdT is true only if dwnon-expansion, rev = 0

So at constant p and constant T,

dG = dwnon-expansion, rev = dwnon-expansion, max, because the complete form of fundamental equation is actually

dU = TdS - pdV + dwnon-expansion, max

If at constant pressure and temperature and the process won't do non-expansion work, then dG = 0. (You proved this)

Else if the process can do non-expansion work at constant temperature and pressure, dG will smaller than 0 then the process will be spontaneous (itself does work, no need work input), and hence I proved that dG can actually < 0.

• So consider a chemical reaction, (this is a typical example of a system with constant $T$ and $P$). Whats the non-expansion work here? Aug 8, 2020 at 6:29
• I am not sure what they call it, it is the work due to the difference in chemical potential, μ, the work due to change in composition and mixing. Aug 8, 2020 at 8:01
• You can find out more in Atkins text, there's a chapter called chemical equilibrium. Aug 8, 2020 at 8:03