# Absolute value of a complex function

I do not know why this method does not work for calculating the absolute value (or norm of (E^((-3 I t)/4) + 3 E^((5 I t)/4)) (E^((-3 I t)/4) - E^((5 I t)/4)));

f[t_] := (E^((-3 I t)/4) + 3 E^((5 I t)/4)) (E^((-3 I t)/4) - E^((5 I t)/4));
Refine[Abs@f[t], Assumptions -> {t > 0, t ∈ Integers}]

• Pardon me if I'm misunderstanding what you are doing. Aren't you trying to find the absolute value of a function? – Mirko Aveta Nov 26 '16 at 12:20

There are several Q&A which show the use of ComplexExpand for this sort of task, such as this, this, this and so on, but I guess the different expressions in each case distinguish the questions from each other.

Perhaps one of these two forms would be acceptable:

Simplify@ComplexExpand[Abs@f[t]]
Simplify[%, t > 0]
(*
2 Sqrt Sqrt[5 + 3 Cos[2 t]] Sqrt[Sin[t]^2]
2 Abs[Sin[t]] Sqrt[10 + 6 Cos[2 t]]
*)

f[t_] := (E^((-3 I t)/4) + 3 E^((5 I t)/4)) (E^((-3 I t)/4) - E^((5 I t)/4)) Sqrt @ FullSimplify @ Total @ ((ComplexExpand @ ReIm @ f[t])^2) Thanks to Jack LaVigne I'd like to emphasize that the outer pair of round brackets (i.e., those enclosing the ...^2) are necessary: it appears that without them the squaring ^2 is done last, leading to an incorrect result.

• Regarding the outer brackets, perhaps conventional function notation Total[x^2] would be the more natural choice here. – Simon Woods Nov 26 '16 at 21:34