# How can I find the Helmholtz free energy from the Sackur-Tetrode equation?

I have the Sackur-Tetrode equation for the entropy:

$$S=k_{B}N[ln(\frac{V}{N}(\frac{4\pi m}{3h^{2}}\frac{U}{N})^{\frac{3}{2}}+\frac{5}{2})]$$

May I isolate the U in this way?

$$U=\frac{3h^{2}N}{4\pi m}[\frac{N}{V}(e^{\frac{S}{k_{b}N}}-\frac{5}{2})]^{\frac{2}{3}}$$ And, should I apply Legendre's transformation to find it? $$F(T,V,N)=U(S,V,N)-TS(U,V,N)$$

$$T=\frac{\partial U}{\partial S}$$

The Sackur-Tetrode equation is an expression for the entropy $$S$$of a monatomic ideal gas in terms of its internal energy $$U$$, its volume $$V$$ and the number of particles $$N$$: $$S(U, \, V, \, N) = N \, k_B \, \ln \Biggl( \left( \frac{V}{N} \right) \left( \frac{U}{N} \right)^{\frac{3}{2}} \Biggr) + N \, k_B \, C_1$$ with $$C_1 = \frac{5}{2} + \frac{3}{2} \, \log \biggl( \frac{4 \, \pi \, m}{3 \, h^2} \biggr)$$ Since the entropy is a differentiable and a monotonically increasing function of the energy you can solve for $$U$$ to obtain an expression for the internal energy $$U$$ as a function of $$S$$, $$V$$, and $$N$$: $$U(S, \, V, \, N) = N \left( \frac{N}{V} \, \exp \Bigl( \frac{S}{N \, k_B} - C_1 \Bigr) \right)^\frac{2}{3}$$

It is also correct that the Helmholtz free energy is obtained by a Legendre transformation: $$F(T, V, N) = \frac{N T k_{B} \left(- 2 C_{1} + \log{\left (\frac{8 N^{2}}{27 T^{3} V^{2} k_{B}^{3}} \right )} + 3\right)}{2}$$

I obtained this result with the following Python code using SymPy:

import sympy
sympy.init_printing()

# declare symbols
S = sympy.Symbol('S', rational=True, positive=True)
V = sympy.Symbol('V', rational=True, positive=True)
N = sympy.Symbol('N', rational=True, positive=True)
T = sympy.Symbol('T', rational=True, positive=True)
k_B = sympy.Symbol('k_B', rational=True, positive=True)
C1 = sympy.Symbol('C_1', rational=True, positive=True)

# Sackur-Tetrode equation solved for U
U = N * ((N / V) * sympy.exp(S / (k_B * N) - C1))**sympy.Rational(2,3)

# thermodynamic equation of state for temperature
temperature = U.diff(S)

# solve state equation for entropy
# note: temperature = T <=> temperature - T = 0
entropy = sympy.solve(temperature - T, S)[0]

# eliminate S in U(S, V, N) to obtain the energy in terms of (T, V, N)
energy = U.subs(S, entropy)

# Helmholtz free energy
free_energy = (energy - T * entropy).simplify()


I hope this helps.