Application of differential absorption in infrared spectroscopy