How to derive the Gibbs free energy for an ideal gas? Determine the Gibbs Free Energy for an ideal gas and show that, this energy, and its derivative can be related to the enthalpy of the system via Gibbs-Helmholtz equation 
  $$H = -T^2 \left( \frac{\partial (G/T)}{\partial T} \right)$$


So I need to determine the fundamental relation for an ideal gas in the Gibbs free energy representation. 

My thoughts:

I know the Gibbs free energy, is defined by 
$$G(p,T) = U + pV - TS = H - TS,$$
where $H$ is the enthalpy, then
\begin{align}  
\mathrm{d}(U + pV - TS) &amp;=
   V\mathrm{d}p - S\,\mathrm{d}T + \sum{\mu_i\,\mathrm{d}N_i}
   - \sum{X_i\,\mathrm{d}a_i}\\
\mathrm{d}G &amp;=
   V\,\mathrm{d}p - S\,\mathrm{d}T + \sum{\mu_i\,\mathrm{d}N_i 
   - \sum{X_i\mathrm{d}a_i}}\\
\therefore \mathrm{d}G &amp;= 
   V\,\mathrm{d}p - S\,\mathrm{d}T
\end{align}
Now, if the temperature is constant, and only the pressure change then $\mathrm{d}G = V\,\mathrm{d}p$. It follows that $$G(p)-G(p_0)=\int_{p_0}^{p}{V\,\mathrm{d}p}$$
If $V = \frac{nRT}{p}$, we have 
$$G(p) = G(p_0) + nRT \ln\left(\frac{p}{p_0}\right)$$

But, I don't know if this is correct.
The fundamental relation for an Ideal Gas, in the entropy representation is 

$$S(U,V,N) = 
   NS_0 + NR\ln\left[ \left( \frac{U}{U_0} \right)^c 
                      \left( \frac{V}{V_0} \right)
                      \left( \frac{N_0}{N} \right)^{c+1} \right]$$

The Gibbs Free Energy, is the Legendre Transform $G \equiv U[T,p]$

so, $G = U + pV -TS$

First, let's get the equation of state $S(T,V,N) $ from the the fundamental relation. We eliminate $U$ using $U = cNRT$

$$S(T,V,N) = 
  NS_0 + NR\ln\left[ \left( \frac{T}{T_0} \right)^c
                     \left( \frac{V}{V_0} \right)
                     \left( \frac{N_0}{N} \right) \right].$$

Also, for an Ideal Gas, $p =\frac{NRT}{V}$

$$G(T,p,N) = 
  cNRT - TNS_0 
  - NRT\ln\left[ \left( \frac{T}{T_0} \right)^c
                 \left( \frac{p_0}{p} \right)
                 \left( \frac{N_0}{N} \right) \right] + NRT $$

Exercise: Find $G_0 = G(T_0,p_0, N_0)$ and substitute into the fundamental relation derived above to get rid of $S_0$