1
$\begingroup$

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.

$\endgroup$
4
  • 1
    $\begingroup$ 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). $\endgroup$ – Michael E2 Dec 1 '20 at 15:21
  • $\begingroup$ @MichaelE2 Yes w is real. But using simplify is not working very well. $\endgroup$ – JuanMuñoz Dec 1 '20 at 15:26
  • $\begingroup$ 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. $\endgroup$ – Michael E2 Dec 1 '20 at 15:39
  • $\begingroup$ 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. $\endgroup$ – Daniel Lichtblau Dec 3 '20 at 1:13
3
$\begingroup$
a = 1 + Exp[-2*Pi* I w] + 0.5 Exp[-4 Pi w I];
Rationalize[ComplexExpand@Abs[a] // FullSimplify]^2

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.