Integrating exponential and trigonometric functions