# Differentiating the Free Energy for the Chemical Potential

I wanted to ask a question about the partial differential of the Free Energy equation.

I learnt to prove the Free Energy equation:

\begin{aligned} \frac{F\left(N_{A}, N_{B}\right)}{k T}=& N_{A} \ln \left(\frac{N_{A}}{N}\right)+N_{B} \ln \left(\frac{N_{B}}{N}\right) \\ &+\left(\frac{z w_{A A}}{2 k T}\right) N_{A}+\left(\frac{z w_{B B}}{2 k T}\right) N_{B}+\chi_{A B} \frac{N_{A} N_{B}}{N} \end{aligned}

and then also learnt about the derivative

$$\mu_{A}=\left(\frac{\partial F} {\partial N_{A}}\right)_{T, N_{B}}$$

where $$N$$ is the total number of molecules in the mixture, $$N_A$$ is the number of molecules of type A and $$N_B$$ is the number of molecules of type B such that

$$N = N_A + N_B$$

so I tried to differentiate the equation above using this idea:

$$\frac{\mu_{A}}{k T}=\left[\frac{\partial}{\partial N_{A}}\left(\frac{F}{k T}\right)\right]_{T, N_{B}}$$

$$=\ln \left(\frac{N_{A}}{N}\right)+1-\frac{N_{A}}{N}-\frac{N_{B}}{N}+\frac{z w_{A A}}{2 k T}+\chi_{A B} \frac{\left(N_{A}+N_{B}\right) N_{B}-N_{A} N_{B}}{\left(N_{A}+N_{B}\right)^{2}}$$

but I couldn't get past the second term.

I could prove the terms

$$\ln \left(\frac{N_{A}}{N}\right) + 1$$

as it was the "product rule" applied on

$$N_{A} \ln \left(\frac{N_{A}}{N}\right)$$

and the rest of the differential apart from

$$-\frac{N_{A}}{N}-\frac{N_{B}}{N}$$

Where do these terms come from?

This derivation taken from here.

You missed the $$N$$ in the logarithm. Since $$N_{B}$$ is kept constant while changing $$N_{A}$$, the total number of particles $$N=N_{A}+N_{B}$$ changes as well. The missing term is
$$\dfrac{\partial N}{\partial N_{A}}\dfrac{\partial}{\partial N}\left[N_{A}\ln\left(\dfrac{N_{A}}{N}\right)+N_{B}\ln\left(\dfrac{N_{B}}{N}\right)\right]=-\dfrac{N_{A}}{N}-\dfrac{N_{B}}{N}$$
• Hi there! I'm just a bit confused because I'm new to this area of thermodynamics. So you're saying that because N is also changing as I'm keeping $N_B$ constant, I need to use the chain rule to differentiate with respect to N right? So, I differentiate everything in the bracket with respect to N i.e. $\frac{\partial}{\partial N}$ but then what happens to the $\frac{\partial N}{\partial N_{A}}$ left over? – David Smith May 20 at 23:25
• @DavidSmith $\frac{\partial N}{\partial N_{A}}=1$. – eranreches May 21 at 9:32
• hmm I'm really close to understanding this whole problem now but why is $\frac{\partial N}{\partial N_{A}}=1$? is it because $N$ is a function of $N_A$? Sorry to bother you, this is the only question I have left regarding this! It's just that this is a new way of maths that I haven't come across often. – David Smith May 21 at 13:25
• @DavidSmith $N=N_{A}+N_{B}$ so if you keep $N_{B}$ constant and differentiate this with respect to $N_{A}$ you get $1$. – eranreches May 21 at 13:26
• @eranreches I have just read this thread and agree with most of what you have proven. My only question is, if we are using the idea that $\frac{\partial}{\partial N_A} = \frac{\partial N}{\partial N_{A}} \frac{\partial}{\partial N}$ then how did the derivation yield the first term as $\ln \left(\frac{N_{A}}{N}\right)+1$? Surely using the product rule as the OP has mentioned, he kept N constant, right? and you're saying N is not constant in your post? – vik1245 May 21 at 13:33