  We describe a method to calculate the electrical force acting on a sphere in
a suspension of dielectric spheres in a host with a different dielectric
constant, under the assumption that a spatially uniform electric field is
applied. The method uses a spectral representation for the total electrostatic
energy of the composite. The force is expressed as a certain gradient of this
energy, which can be expressed in a closed analytic form rather than evaluated
as a numerical derivative. The method is applicable even when both the spheres
and the host have frequency-dependent dielectric functions and nonzero
conductivities, provided the system is in the quasistatic regime. In principle,
it includes all multipolar contributions to the force, and it can be used to
calculate multi-body as well as pairwise forces. We also present several
numerical examples, including host fluids with finite conductivities. The force
between spheres approaches the dipole-dipole limit, as expected, at large
separations, but departs drastically from that limit when the spheres are
nearly in contact. The force may also change sign as a function of frequency
when the host is a slightly conducting fluid.
