The conventional expression for the exchange energy in a continuous material is valid for slowly varying functions only. It breaks down at singularities and introduces unphysical infinities. In order to correct this, it is suggested here to postulate another expression which is always finite, and can be used conveniently with functions which vary slowly over most of the material, and rapidly in some parts of it.