  This paper describes a general formalism for obtaining localized solutions to
a class of problems in mathematical physics, which can be recast as variational
optimization problems. This class includes the important cases of
Schr\"odinger's equation in quantum mechanics and electromagnetic equations for
light propagation in photonic crystals. These ideas can also be applied to
develop a spatially localized basis that spans the eigenspace of a differential
operator, for instance, the Laplace operator, generalizing the concept of plane
waves to an orthogonal real-space basis with multi-resolution capabilities.
