Getting the norm of a complex expression

I'm trying to get the norm of a complex function with symbolic notation. But really I'm very inexperienced at this.

FullSimplify[Abs[ExpToTrig[Exp[I*x*t]]], Assumptions -> {t ∈ Reals, x ∈ Reals}]


With this code, I got 1. That's right!

So, now I'm trying to use this in the following problem: $\frac{e^{it(w_{21}+w)}-1}{w+w_{21}}+\frac{e^{it(w_{21}-w)}-1}{w_{21}-w}$

F[w_, t_] = Exp[I*w*t];
FullSimplify[
Abs[
ExpToTrig[
(F[w + Subscript[w, 21], t] - 1)/(w + Subscript[w, 21]) +
(F[Subscript[w, 21] - w, t] - 1)/(Subscript[w, 21] - w)]],
Assumptions -> {t ∈ Reals,Subscript[w, 21] ∈ Reals, w ∈ Reals}]


But in this case the function Abs doesn't work. Can you tell me where I made my mistakes?

• How do you expect Mathematica to do anything when it doesn't know anything about the function F[]? – Feyre May 1 '17 at 16:16
• I had forgotten to put that part. – 7919 May 1 '17 at 16:30
• Your first expression can be simplified to Abs[Exp[I*x*t]] // ComplexExpand which as expected evaluates to 1 – Bob Hanlon May 1 '17 at 16:30

F[w_, t_] = Exp[I*w*t];

expr = Abs[(F[w + Subscript[w, 21], t] - 1)/(w +
Subscript[w, 21]) + (F[Subscript[w, 21] - w, t] -
1)/(Subscript[w, 21] - w)] // ComplexExpand


An alternate representation is

expr // ExpandAll // Simplify