I'm trying to get an analytical expression for the following integral:
f = 16 k Abs[Cos[t] + Sqrt[2] Sin[t] Cos[k z]]^5/Pi;
Integrate[f, {z, 0, 2 Pi/k}, Assumptions -> k > 0 && t > 0]
The answer Mathematica gives is not correct for t>ArcTan[1/Sqrt[2]]
:
(* ConditionalExpression[-((-90 Cos[t] + 55 Cos[3 t] + 3 Cos[5 t])/Sign[Cos[t] + Sqrt[2] Sin[t]]^5), Cos[t] + Sqrt[2] Sin[t] != 0] *)
N@% /. t -> 1
(* 102.226 *)
NIntegrate[f /. {t -> 1, k -> 2}, {z, 0, 2 Pi/2}]
(* 103.146 *)
(these two numerical results should be equal.) The answer is independent of k
(e.g. on change of variables to k z
). If I set k=1
for Integrate
, it gives me the correct (rather complicated) expression. Also, I know I can get a simpler expression by splitting the integral into two regions using ArcCos[-Cot[t]/Sqrt[2]]
. However, I want to know when I can't trust Integrate
.