The Kohn–Sham equations are found by varying the total energy expression with respect to a set of orbitals, subject to constraints on those orbitals, to yield the Kohn–Sham potential as
The Kohn–Sham equations can be derived by adjusting the overall energy formula based on a specific set of orbital functions, subject to limitations imposed on these orbitals, ultimately yielding the Kohn–Sham potential.