FullSimplify[Abs[x]^2, x \[Element] Reals]
reasonably returns x^2
, but the barely-more-complicated expression
FullSimplify[Abs[x y]^2, {x, y} \[Element] Reals]
returns Abs[x y]^2
unsimplified. Any ideas why? I can just do the replacement rule
{Abs[x_]^2 -> x^2}
at the end of a complicated expression if I know that x
is real, but now I'm worried that FullSimplify[]
is missing other obvious places to remove Abs[]
.
FullSimplify[FunctionExpand[Abs[x y]^2], {x, y} ∈ Reals]
does yieldx^2y^2
. $\endgroup$ – Ruslan Nov 20 '15 at 9:45ComplexExpand
is another way to get your desired result. $\endgroup$ – Michael E2 Nov 20 '15 at 11:24