# Excess Gibbs Free Energy

I am having some confusion with something my professor has written and would like to have this issue cleared up.

I'll start from the beginning, I understand all this, I'll mention where it stops making sense. So, to determine the excess Gibbs free energy we first look at the definition of Gibbs free energy:

$$G = \sum_{\alpha} \mu_{\alpha}N_{\alpha}$$ All good...expanding this out: $$G = \sum_{\alpha} N_{\alpha}[\mu^o_{\alpha} + RT\ln(x_{\alpha} \gamma_{\alpha})]$$ All good, let's split this up into ideal and 'excess' non ideal bits: $$G = \underbrace{\sum_{\alpha} N_{\alpha}[\mu^o_{\alpha} + RT\ln(x_{\alpha})]}_{\text{Ideal}} + \underbrace{RT\sum_{\alpha} N_{\alpha}\ln( \gamma_{\alpha})}_{\text{Excess}}$$ Ok so now there's a function for excess Gibbs free energy, writing this in partial molar form (dividing both sides by total number of mols): $$g^E= RT\sum_{\alpha} x_{\alpha}\ln( \gamma_{\alpha})$$ Writing this for two components: $$\frac{g^E}{RT}= x_1\ln(\gamma_{1}) + x_2\ln(\gamma_{2})$$

Ok, so next move. We're given an excess function as $Ax_1x_2$..fine, I know where that's from but then he goes and writes:

$$g^E = \frac{An_1n_2}{n_1 + n_2}$$ I am convinced he has just made this up, if we look at the correct function $Ax_1x_2$, surely the excess energy will be given by:

$$g^E = \frac{An_1n_2}{(n_1+n_2)^2}$$ Because $x_1 = \frac{n_1}{n_1+n_2}$ and similar for $n_2$.

The notation $g^E$ is actually used for total Gibbs excess energy, for example:
$$g^E = RTn_1\ln(\gamma_1) + RTn_2\ln(\gamma_2)$$
Therefore it makes sense to write something like: $$\frac{\partial g^E}{\partial n_i} = RT\ln(\gamma_i)$$
Furthermore, if the PARTIAL MOLAR Gibbs free energy is given as $Ax_1x_2$ then the TOTAL MOLAR Gibbs free energy is simply: $$g^E = G^E\times N = \frac{n_1n_2}{(n_1+n_2)^2} \times (n_1 + n_2) = \frac{n_1n_2}{(n_1+n_2)}$$