Following the same procedure used in deriving the Maxwell–Boltzmann statistics, we wish to find the set of n i for which W is maximized, subject to the constraint that there be a fixed number of particles, and a fixed energy. We constrain our solution using Lagrange multipliers forming the function: