Gibbs free energy for an ideal gas

You know that for a generic system which during a process exchanges heat with a reservoir at a constant temperature $$T_{a}$$ it holds: $$\Delta G=\Delta H-T_{a}\Delta S$$ Where:
$$\star)\Delta G$$ is the Gibbs free energy change of the system during the process.
$$\star)\Delta H$$ is the enthalpy change of the system during the process.
$$\star)\Delta S$$ is the entropy change of the system during the process.
Note that during the process (unless it is quasistatic) the temperature of the system is not defined, so it is not constant.
Said this, if I want to simplify the previous equation for a ideal gas: $$\left\{ \begin{array}{c} \Delta H=n c_{p} \Delta T \\ \Delta S=n c_{p} ln(\frac{T_{2}}{T_{1}})+n R ln(\frac{p_{1}}{p_{2}})\\ \end{array} \right.$$ $$\Delta G=[n c_{p} ln(\frac{T_{2}}{T_{1}})+n R ln(\frac{p_{1}}{p_{2}})] T_{a}+n c_{p} \Delta T$$ Where $$T_{1}, p_{1}, T_{2}, p_{2}$$ are referred to the system in its inital and final state. On my book I find written: $$\Delta G=n R T ln(\frac{p_{1}}{p_{2}})$$ Which is the equation I got by putting $$T_{1}=T_{2}$$. Someone could confirm that my formula is right and the book is just considering a particular case? (The book isn't very accurate in this explanation)

• Please provide the source of your initial equation. – Chet Miller Dec 5 '19 at 22:05
• Atkins-Jones-Lavermann Chemical principles – Landau Dec 5 '19 at 22:47
• What exactly do they say, because this equation does not seem correct. – Chet Miller Dec 5 '19 at 23:57
• Indeed it is suspicious you are using incorrect equations: under isothermic process, there is an enthalpy change, yet it would be zero according to your equation. The enthalpy expression you use is the isobar expression, isn't it? – Greg Dec 6 '19 at 3:58
• They assume temperature and pressure constant @Greg – Landau Dec 6 '19 at 9:02

It is not possible to confirm your derivation. If you describe the change in free energy of a system with the expression

$$\Delta G=\Delta H-T\Delta S$$

then you are implicitly assuming that the initial and final temperatures of the system are equal to $$T$$. The more general expression for $$\Delta G$$, from the definition $$G=H-TS$$, is

$$\Delta G = \Delta H - \Delta (TS)$$

$$\Delta G=\Delta H-T_a\Delta S$$
it can be assumed that the initial and final temperatures of the system are equal to $$T_a$$, that of the surroundings. Given that you know that the initial and final temperatures are identical, and that for an ideal gas $$V=nRT/p$$, you can use a convenient reversible path to compute the change in $$\Delta G$$ by integrating $$dG=Vdp-SdT$$ at constant $$T$$, which yields the textbook expression $$\Delta G = nRT \ln \left(\frac{p_1}{p_2} \right)$$ (note here $$p_1$$ is the final pressure).