Intensity theory for infrared spectra of polyatomic molecules