I want to know if it is possible to derive heat capacities, in this case, in constant volume from another thermodynamic Potential which is not the Helmholtz free energy $F$. I am aware of the following relationship between heat capacity at constant volume, entropy, and $F$: $$ C_v = T\left(\frac{\partial S}{\partial T}\right)_{V,N} = -T \left(\frac{\partial^2 F}{\partial T^2}\right)_{V,N}. $$
But I am trying to see if I can derive an expression for $C_v$ when I consider the Gibbs free energy (particle number constant $N$) and I want to express $C_v = C_v(T,P,n)$ where $n$ is taken as a constant and can be left out: $$G = U - TS + PV = F + PV $$
The problem I have going forwards has to do with the variables. This is what I mean: \begin{align} C_v &= -T\left(\frac{\partial S}{\partial T}\right)_{V,N} = -T\left(\frac{\partial^2 (G-PV)}{\partial T^2}\right)_{V,N}\\ C_v &= -T\left[\left(\frac {\partial^2 G}{\partial T^2}\right)_{V,N} -\left(\frac{\partial^2 PV}{\partial T^2}\right)_{V,N}\right]\\ C_v &= -T\left[\frac{\partial}{\partial T} \left(\frac{\partial G}{\partial T}\right)_{P,N}\right]_{V,N} -T\left[\frac{\partial}{\partial T} \left(\frac{\partial PV}{\partial T}\right)\right]_{V,N} \end{align}
Then, I use the following relation: $$ \left(\frac{\partial P}{\partial T}\right)_{V,N} = -\left(\frac{\partial^2 G}{\partial P \partial T}\right) \left(\frac{\partial^2 G}{\partial p^2}\right)^{-1}, $$ which gives me $$ C_v = -T\left[\frac{\partial}{\partial T} \left(\frac{\partial G}{\partial T}\right)_{P,N}\right]_{V,N} -T\left[\frac{\partial}{\partial T} \left(-V \left(\frac{\partial^2 G}{\partial P \partial T}\right) \left(\frac{\partial^2 G}{\partial p^2}\right)^{-1} \right)\right]_{V,N} $$
And this is as far as I can get. Here is the problem. If we focus on the first term and do the derivations, I get: $$ -T\left(\frac{\partial(-S)}{\partial T}\right)_{V,N} $$ Now I don't know what to do. The entropy was derived by focusing on the Gibbs equation, and now if I want to go further, I have to look at the entropy for the internal energy. But there is nothing I can do. All I can say is that the above term can be equal to: $$ C_v = T\left(\frac{\partial(-S)}{\partial T}\right)_{V,N}, $$ where this $C_v$ has nothing to do with the one in the beginning. My problem is with the 2nd term. I don't know what to do there because $G$ is a function of $T$, $N$, $P$, and we also have $V$, $N$. If I were to write it explicitly, this is what I cannot solve: $$\begin{multline} \left[ \frac{\partial}{\partial T}\left( -V(\frac{\partial^2 G}{\partial P \partial T} \right)\left( \frac{\partial^2 G}{\partial p^2} \right)^{-1} \right]_{V,N} \\ = %split here \frac{\partial}{\partial T}\left( -V\left( \frac{\partial}{\partial P}\left( \left( \frac{\partial G}{\partial T} \right)_{P,N} \right)_{T,N} \right)_{V,N}\left( \frac{\partial^2 G}{\partial p^2} \right)^{-1}_{V,N} \right) \end{multline}$$
This term: $$ \frac{\partial}{\partial T}\left( -V\left( \frac{\partial}{\partial P}\left( \left( \frac{\partial G}{\partial T} \right)_{P,N} \right)_{T,N} \right)_{V,N} \right) $$
How do I try and solve this? The indexes confuse me. Can someone give me a hint?