3: It is really helpful to treat the cosine part separately.
Things get even easier when one uses suitable substitution:
This result will be substituted back into the exponential.
Answer