# Proving Gibbs energy equals work

Tags:
1. Mar 28, 2017

### freek_g

Hi,

I'm preparing for my exams in a few weeks, of which one covers Thermodynamics.

I was trying to solve a question, where I noticed the Gibb's free energy had to equal the (negative) work. I kind of came to an answer, but was not sure if I did it the right way. All steps are reversible.

First, from the ideal gas law : $$pV = nRT$$
Then, if I differentiate both sides: $$d(pV) = d(nRT)$$
$$dpV = -pdV$$

So, let's hold that thought. Now for the Gibb's free energy (with T = constant): $$dG = dH - TdS$$
And because $H = U + pV$: $$dG = dU + d(pV) - TdS$$
Now, $U = q + w = q - pdV$: $$dG = q - pdV + dpV + pdV - TdS$$

Because $q = q_{rev} = TdS$: $$dG = q_{rev} + dpV - q_{rev} = dpV$$

Then, from the beginning: $$dG = dpV = -pdV = - w_{rev}$$

So my question, am I right with this reasoning?

Your third equation (which would be more clearly written $V\,dp=-p\,dV$) already assumes constant temperature, right? Otherwise, I don't know how you're getting it.
Also, your first equation for Gibbs free energy is incorrect; you've mixed up $T$ and $S$.