# If dG is a state function, why do reversible and irreversible paths differ?

For a reversible process at constant T,P in a closed system with no non-expansion work dG = 0. For an irreversible process under the same conditions, dG < 0. Since dG is a state function I would expect two process at the same T,P to give the same result just as dS is calculated for reversible processes but can be applied to any process with the same initial and final states. I suspect that I have incorrectly assumed that the states for dG are the same but I'm unsure.

• G is not only a function of T and P, but also a function of chemical composition. – Chet Miller Jun 14 '18 at 19:05
• Right, but in this case I'm assuming single phase pure substances so that n is constant. – Yuki Jun 14 '18 at 19:24
• For the same initial and final states of the system, it has to be the same. If you have a single phase pure substance and the initial and final temperatures and pressure are the same, then $\Delta G$ of the system is zero, irrespective of the path. Of course, the intermediate states can vary, and the changes in the surroundings may be different. – Chet Miller Jun 14 '18 at 19:31
• Can you provide a specific example that we can discuss? – Chet Miller Jun 14 '18 at 19:51
• I think I figured it out. For a constant T,P process heat is dq=dH and is no longer a path function so that dG=0 regardless of whether the process is reversible or irreversible. dG is only <0 if there is a change in another variable such as n1,n2... or if we get rid of the constant P condition. – Yuki Jun 14 '18 at 20:23