Energy expressions in density-functional theory using line integrals.