  We obtain exact analytic expressions for (i) the electromagnetic energy
radial density within and outside a multilayered sphere and (ii) the total
electromagnetic energy stored within its core and each of its shells. Explicit
expressions for the special cases of lossless core and shell are also provided.
The general solution is based on compact recursive transfer-matrix method and
its validity includes also magnetic media. The theory is illustrated on the
examples of electric field enhancement within various metallo-dielectric
silica-gold multilayered spheres. User-friendly MATLAB code which includes the
theoretical treatment, is available as a supplement to the paper.
