I'm trying to compute a fairly simple numerical integral, but it seems to take forever to compute:
f[s_, t_] := 0.4714 *Exp[-0.6666*I *s + 0.3333*I*t] + 0.4714*Exp[-1.66666*I*s + 1.33333*I*t]
NIntegrate[f[s, t]^3, {s, 0, 2*Pi}, {t, 0, 2*Pi}]
If I remove the decimal places, to
f[s_, t_] := 0.4 *Exp[-0.6*I *s + 0.3*I*t] + 0.4*Exp[-1.6*I*s + 1.3*I*t]
NIntegrate[f[s, t]^3, {s, 0, 2*Pi}, {t, 0, 2*Pi}]
then it computes in about a second (which still seems quite slow?). But howcome it takes so much longer for the first integral? I am missing something. Perhaps my pc is out of resources.
NIntegrateyou can try following this answer. – Anton Antonov Jun 20 '23 at 15:48AccuracyGoal -> Automaticalso leads to a quick evaluation. – Michael Seifert Jun 20 '23 at 20:34