# FullSimplify on complex numbers seems inconsistent

FullSimplify[c Conjugate[c]]


returns

Abs[c]^2


while

FullSimplify[2 c Conjugate[c]]


returns

2 c Conjugate[c]


This seems strange to me. For some reason, a third entry in the Times[] precludes the simplification with Abs[]. Is this just a shortcoming of the way FullSimplify[] is implemented, or is there some good reason for this?

It's quite annoying when I have a complicated expression and some terms are real and positive definite, but this is not immediately obvious, because FullSimplify[] is failing to combine variables with their complex conjugates.

• I agree. That's irritating. Could be something to do with what Mathematica thinks a simplified form is, but this strikes me as silly. – march Oct 18 '15 at 4:27

## 1 Answer

Well, FullSimplify[ ] has its own creed about what transformations should try and how to measure the complexity of its output.

You can coerce it to perform in some crazy ways, though:

exp =  2 c Conjugate[c];
SimplifyCount[p_] := First@ImageDimensions@Rasterize[p]
f[e_] := e /. Times[x___, a_, y___, Conjugate[a_], z__] :> Times[Abs[a]^2, x, y, z]
FullSimplify[exp, TransformationFunctions -> f, ComplexityFunction -> SimplifyCount]

(* 2 Abs[c]^2 *)

• The ComplexityFunction above isn't really necessary. I show it as an example of a "crazy" thing – Dr. belisarius Oct 18 '15 at 5:01