# How to find the norm of an imaginary exponential expresion?

I need to find the norm of the following expression

$$|1+e^{-i2\pi w}+e^{-i4\pi w}|^2$$

With w real number.

For doing this I coded:

a = 1 + Exp[-2*Pi* I w] + 0.5 Exp[-4 Pi w I]
Norm[a]^2


The output is:

Norm[1 + E^(-2 I \[Pi] w) + 0.5 E^(-4 I \[Pi] w)]^2


So the code is not calculating effectively the norm.

• Abs[a] or Norm[{a}]. Norm is for vectors only. — In addition, you might need to apply Simplify (and/or ComplexExpand if w is real). – Michael E2 Dec 1 '20 at 15:21
• @MichaelE2 Yes w is real. But using simplify is not working very well. – JuanMuñoz Dec 1 '20 at 15:26
• Maybe Simplify[ComplexExpand@Abs[a], w \[Element] Reals]? It might work better if the half in a were the exact Rational number 1/2 instead of the approximate Real (floating-point) 0.5. – Michael E2 Dec 1 '20 at 15:39
• In[218]:= a = 1 + Exp[-2*Pi*I w] + 1/2 Exp[-4 Pi w I]; ComplexExpand[ a*Conjugate[a]] Out[218]= 1 + 2 Cos[2 \[Pi] w] + Cos[2 \[Pi] w]^2 + Cos[4 \[Pi] w] + Cos[2 \[Pi] w] Cos[4 \[Pi] w] + 1/4 Cos[4 \[Pi] w]^2 + Sin[2 \[Pi] w]^2 + Sin[2 \[Pi] w] Sin[4 \[Pi] w] + 1/4 Sin[4 \[Pi] w]^2 and then simplify if so desired. – Daniel Lichtblau Dec 3 '20 at 1:13

a = 1 + Exp[-2*Pi* I w] + 0.5 Exp[-4 Pi w I];

$$3 \cos (2 \pi w)+\cos (4 \pi w)+\frac{9}{4}$$