  The linear response of the nucleus to an external field contains unique
information about the effective interaction, correlations, and properties of
its excited states. To characterize the response, it is useful to use its
energy-weighted moments, or sum rules. By comparing computed sum rules with
experimental values, the information content of the response can be utilized in
the optimization process of the nuclear Hamiltonian or EDF. But the additional
information comes at a price: compared to the ground state, computation of
excited states is more demanding. To establish an efficient framework to
compute sum rules of the response that is adaptable to the optimization of the
nuclear EDF and large-scale surveys of collective strength, we have developed a
new technique within the complex-energy FAM based on the QRPA. To compute sum
rules, we carry out contour integration of the response function in the
complex-energy plane. We benchmark our results against the conventional matrix
formulation of the QRPA theory, the Thouless theorem for the energy-weighted
sum rule, and the dielectric theorem for the inverse energy-weighted sum rule.
We demonstrate that calculated sum-rule values agree with those obtained from
the matrix formulation of the QRPA. We also discuss the applicability of both
the Thouless theorem about the energy-weighted sum rule and the dielectric
theorem for the inverse energy-weighted sum rule to nuclear density functional
theory in cases when the EDF is not based on a Hamiltonian. The proposed
sum-rule technique based on the complex-energy FAM is a tool of choice when
optimizing effective interactions or energy functionals. The method is very
efficient and well-adaptable to parallel computing. The FAM formulation is
especially useful when standard theorems based on commutation relations
involving the nuclear Hamiltonian and external field cannot be used.
