I am trying to derive an equation for chemical potential from Boltzmann entropy and this is what I have come up with so far:
$$S = k\ln{\left(\frac{N!}{N_\mathrm{up}!\,N_\mathrm{down}!}\right)} \label{eq:1} \tag{1}$$
and the derivation of chemical potential from the 1st law of thermodynamics,
$$\mu = -T\left(\frac{\partial S}{\partial N}\right)_{UV} \tag{2}$$
I have used Stirling's approximation and properties of logs and have come up with an answer, but after searching for my answer it is not online anywhere, so it feels like I might be going in the wrong direction.
From my computation of entropy which I found to be,
$$S = k_b\left( N\cdot\ln{N} - \sum(N_i\cdot\ln{N_i}) \right) \tag{3}$$
I got chemical potential to be
$$\mu = -Tk_b\left( \ln{N} +1 - \sum{(\ln{N_i} + 1)} \right) \tag{4}$$
Is this a derivation for entropy that anyone has ever seen before? Is it even possible to take the equation $\eqref{eq:1}$ and derive an equation for chemical potential?
Any answer or push in the right direction would be greatly appreciated.