Integral methods in astronomical spectroscopy