# Why is it necessary to consider infinitesimal changes in p,V,T for H,U and G given that they're state functions?

State functions such as $$G$$ only depend on the state of the system and are not dependent on the "path" that took the system to that state (which would be the case for work, for example, which is not a state function.

We know that:

$$\mathrm{d}G=V\mathrm{d}p-S\mathrm{d}T$$

So…

$$\mathrm{d}G=\left(\frac{\partial G}{\partial p}\right)_T\mathrm{d}p+\left(\frac{\partial G}{\partial T}\right)_p\mathrm{d}T$$ Consequently, by comparing coefficients:

$$V=\left(\frac{\partial G}{\partial p}\right)_T$$ and $$-S=\left(\frac{\partial G}{\partial T}\right)$$

Just taking the equation involving $$V$$ now to save time and space: $$\int_{p_1}^{p_2}V\mathrm{d}p=\int_{p_1}^{p_2}\left(\frac{\partial G}{\partial p}\right)_T\mathrm{d}p$$

Using the perfect gas equation and integrating leaves the result:

$$G(p_2)-G(p_1)=n\mathcal{R}T\ln\left(\frac{p_2}{p_1}\right)$$

But if $$G$$ is independent of the path taken to get to the final state, why shouldn't I use the equation

$$\Delta G=V(p_2-p_1)?$$

It is important to make clear any requirement that a variable be constant for each equation you write.

To go from

$$\mathrm{d}G = V\,\mathrm{d}p - S\,\mathrm{d}T$$

to

$$\mathrm{d}G = V\,\mathrm{d}p,$$

you would need to assume temperature is constant.

And to go from

$$\mathrm{d}G = V\,\mathrm{d}p$$

to

$$\Delta G = V(p_2 - p_1)$$

you would need to assume volume is constant.

If temperature and volume are both constant, the pressure is constant also.

So your final equation is only saying: when temperature, pressure and volume are constant, there is no change in Gibbs free energy.

When you write $$\mathrm{d}G=V\,\mathrm{d}P-S\,\mathrm{d}T,$$ you are talking about the differential change in $$G$$ between two closely neighboring thermodynamic equilibrium states, one at $$(T,P)$$ and the other at $$(T+\mathrm{d}T,P+\mathrm{d}P).$$

So, when you integrate this equation, you must integrate over a path comprised to a continuous sequence of thermodynamic equilibrium states. Over such a path, at constant temperature, the molar volume $$V$$ changes with pressure $$P,$$ and this needs to be taken into account in the integration.