Variational Principle for the Chemical Potential in the Thomas-Fermi Model