  We apply the quadrature-based perturbation method of Dalgarno and Lewis to
the evaluation of the nonlinear optical response of quantum systems. This
general operator method for perturbation theory allows us to derive exact
expressions for the first three electronic polarizabilities which require only
a good estimate of the ground state wave function, makes no explicit reference
to the underlying potential, and avoids complexities arising from excited state
degeneracies. We apply this method to simple examples in 1D quantum mechanics
for illustration, exploring the sensitivity of this method to variational
solutions as well as poor numerical sampling. Finally, to the best of our
knowledge, we extend the Dalgarno-Lewis method for for the first time to
time-harmonic perturbations, allowing dispersion characteristics to be
determined from the unperturbed ground state wave function alone.
