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]
orNorm[{a}]
.Norm
is for vectors only. — In addition, you might need to applySimplify
(and/orComplexExpand
ifw
is real). $\endgroup$ – Michael E2 Dec 1 '20 at 15:21Simplify[ComplexExpand@Abs[a], w \[Element] Reals]
? It might work better if the half ina
were the exactRational
number1/2
instead of the approximateReal
(floating-point)0.5
. $\endgroup$ – Michael E2 Dec 1 '20 at 15:39In[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. $\endgroup$ – Daniel Lichtblau Dec 3 '20 at 1:13