When I run the following identical numerical integrals
NIntegrate[
Exp[2 I s] Exp[2 I t] ((Cos[s] - Cos[t])^2 + (Sin[s] - Sin[t])^2) +
1, {s, 0, 2 \[Pi]}, {t, 0, 2 \[Pi]}] // Timing
NIntegrate[
Exp[2 I s] Exp[2 I t] (2 - 2 Cos[s - t]) + 1, {s, 0, 2 \[Pi]}, {t,
0, 2 \[Pi]}] // Timing
I find the first takes around 14 seconds while the second only takes a fraction of a second. Can anyone explain why there is such a difference and how to improve the timing of the first integral because I'm going to be doing a lot of similar integrals of the first kind without being able to simplify the integrand to look more like the second? Thanks in advance for any help.