Sometimes Conjugate distributes. Sometimes it doesn't. Look:

Conjugate[a b]
(* Conjugate[a b] *)

Conjugate[2 a b]
(* 2 Conjugate[a b] *)   (*'2' pulled out*)

Conjugate[a (b + c)]
(* Conjugate[a (b + c)] *)

Conjugate[a (b + 2 c)]
(* Conjugate[a] (Conjugate[b] + 2 Conjugate[c]) *)  (* Distributed! *)

Conjugate[a (b + c (d + e))]
(* Conjugate[a (b + c (d + e))] *)
  1. Why is Conjugate behaving like this (that is, inconsistently)?

  2. Is there a switch I can toggle that prevents Conjugate from doing stuff willy nilly? I don't mind if Conjugate[2 a b] stays Conjugate[2 a b]. It's more consistent that way.

list = {a b, 2 a b, a (b + c), a (b + 2 c), a (b + c (d + e))};

If you never want Conjugate to distribute, use Inactive

Inactive[Conjugate] /@ list

enter image description here

If you want Conjugate to always distribute

conj[expr_] := 
 ComplexExpand[expr, Variables@Level[expr, {-1}], 
   TargetFunctions -> Conjugate] // Simplify

conj@*Conjugate /@ list

(*  {Conjugate[a] Conjugate[b], 2 Conjugate[a] Conjugate[b], 
 Conjugate[a] (Conjugate[b] + Conjugate[c]), 
 Conjugate[a] (Conjugate[b] + 2 Conjugate[c]), 
 Conjugate[a] (Conjugate[b] + Conjugate[c] (Conjugate[d] + Conjugate[e]))}  *)

If any variables are Reals, say a and c, then use Simplify

Simplify[%, Element[{a, c}, Reals]]

(*  {a Conjugate[b], 2 a Conjugate[b], a (c + Conjugate[b]), 
 a (2 c + Conjugate[b]), a (Conjugate[b] + c (Conjugate[d] + Conjugate[e]))}  *)
|improve this answer|||||

Mathematica does not know the nature of your symbols. It knows for sure that 2 is a real number - so it can use proper distribution. You can always specify your variables to get a more consistent answer. For example,

Simplify[Conjugate[a (b + c)], Assumptions -> {a, b, c} ∈ Reals]

a (b + c)

Simplify[Conjugate[a (b + c)], Assumptions -> {{a, b} ∈ Reals}]

a (b + Conjugate[c])

Simplify[Conjugate[a (b + c)], Assumptions -> {{a} ∈ Reals}]

a Conjugate[b + c]

Or you can use Expand as well to see all the terms distinctly

Expand[Simplify[Conjugate[a (b + c)], Assumptions -> {a, b, c} ∈ Reals]]

a b + a c

And last but not the least, the most general case

Simplify[Conjugate[a (b + c)], Assumptions -> {a, b, c} ∈ Complexes]

Conjugate[a (b + c)]

|improve this answer|||||
  • $\begingroup$ This is fine, do you know how to keep the whole expression together inside Conjugate? I don't like it behaves in my fourth example. Notice also Conjugate[a (b + c (d + 2 e))] doesn't expand, despite there being a 2 inside. $\endgroup$ – QuantumDot Aug 15 '16 at 17:34
  • $\begingroup$ You can define your variables as Complexes (I put it at the end of my answer). In Conjugate[a (b + c (d + 2 e))], 2e is again multiplied by c and then a which puzzles MMA :) $\endgroup$ – Sumit Aug 15 '16 at 18:03

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.