FullSimplify[c Conjugate[c]]




FullSimplify[2 c Conjugate[c]]


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.

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

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 *)
| improve this answer | |
  • $\begingroup$ The ComplexityFunction above isn't really necessary. I show it as an example of a "crazy" thing $\endgroup$ – Dr. belisarius Oct 18 '15 at 5:01

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.