Using an approach unlike that in the literature, the effects induced by waveguides on the gain in infrared free-electron lasers are analyzed for both the low and the high gain regimes. By analyzing the relation of the detuning parameter to the radiation frequency and the waveguide parameter, the radiation frequency and the slippage are analyzed not merely for the resonance case, but for more general cases. Their dependence on the waveguide parameter is analytically presented for an arbitrary value of the detuning, the features of the gain and the requirements for the waveguide parameter can be easily revealed. It is found that the derivative of the detuning parameter with respect to the radiation wavenumber is proportional to the slippage. The analysis shows that the zero slippage always exists, and to have gain at the zero-slippage frequency corresponds to obtaining a gain curve with a single broadband peak. This can be realized for both the high gain and the low gain regions by choosing the appropriate dimension of the waveguide. It is also shown that the higher order modes of the waveguide have greater effect on the high gain than on the low gain regime.