# Gibbs free energy for an ideal gas (problem)

so I'm trying to find the gibbs free energy for an ideal gas

$$g = u -Ts + pv$$

Hence,

$$dg = du -Tds -sdT +pdv +vdp = -sdt + vdp$$

The entropy is $$s = c_{p} \ln T -R \ln P + s_{o}$$

$$dg = \int{ dt (-c_{p} \ln T + R \ln P -s_{po})} + \int{vdp}$$

$$= c_{p}T - c_{p}T \ln T + RT \ln P -s_{o}T + RT \ln P$$

Would anyone know why is there an extra $RT \ln P$ at the end, where did I go wrong?

• $\int{vdp} = vP + constant$. Also you took a bunch of indefinite integrals, you should integrate with limits starting from some reference value. Commented Dec 4, 2018 at 12:38

There is an easier way:

$$g = h - sT$$

$$h = c_p(T-T_0)+h_0$$

$$s = c_p\ln\frac{T}{T_0} - R \ln\frac{p}{p_0} + s_0$$

Then put it all together:

$$\boxed{ g = c_p (T-T_0) - T c_p\ln\frac{T}{T_0} + RT \ln\frac{p}{p_0} + h_0 - s_0 T_0 }$$

• It looks like you have some extra $h_0$ in there. Commented Dec 4, 2018 at 12:34
• Also the $c_pT (T-T_0)$ term is strange. Commented Dec 4, 2018 at 12:41
• Thanks for catching the typos in $c_p T (T-T_0)$ and the extra $h_0$. Commented Dec 4, 2018 at 14:44

To me you can not integrate functions by considering that P or/and T are constants since they depend from one each other.

Indeed, the only way to integrate $\int vdP$ to $RTlnP$ is by considering that your transformation is isothermal. But on the first integral this time that P is constant to get $RTlnP$ from $\int RlnP$.

So on the first integral the change of free enthalpy is carried through isobar process and on the second integral the change of free enthalpy is carried through isothermal process.I guess the error comes from there..

• What? could you explain that again? Commented Mar 12, 2015 at 23:33
• I am just saying that when you integrate ∫RlnPdT in RTlnP you are actually assuming P constant which is only true for isobar transformation. Though the expression for the Gibbs energy you are trying to get is a general one so not only for isobar transformation Commented Mar 15, 2015 at 13:45
• @ Ronan Tarik Drevon Not quite. If we have an exact differential of the form $dF = A(x,y) dx + B(x,y)dy$ we may integrate it along a path of constant $x$ followed by a path at constant $y$ between any two states. The result then is valid for any path since the differential is exact. Commented Dec 4, 2018 at 14:51