  The primary aim of this paper is the derivation and the proof of a simple and
tractable formula for the stray field energy in micromagnetic problems. The
formula is based on an expansion in terms of Arar-Boulmezaoud functions. It
remains valid even if the magnetization is not of constant magnitude or if the
sample is not geometrically bounded. The paper continuous with a direct and
important application which consists in a fast summation technique of the stray
field energy. The convergence of this technique is established and its
efficiency is proved by various numerical experiences.
