1
$\begingroup$

If you have a statement like:

Conjugate[a+b]

you get back

Conjugate[a+b]

but I'm expecting

Conjugate[a]+Conjugate[b]

If you try the logical comparison:

Conjugate[a+b]==Conjugate[a]+Conjugate[b]

You get the same result back (it does not evaluate the expression).

I'm assuming that Mathematica must not have enough information to give me the result I'm expecting, but I am not sure what I need to tell it. Could someone please explain to me what I am missing from my states?

Edit: I found a workaround but it is definitely not my preferred method.

Map[Conjugate, a+b]

will output as expected. I don't think this would be a preferred method because I'm not sure what it would do in all cases.

$\endgroup$
  • $\begingroup$ To add to this, if you do a transformation rule like Conjugate[a+b]==Conjugate[a]+Conjugate[b] /. {a->I, b->2} the expression evaluates to true $\endgroup$ – user Jul 13 '18 at 21:38
  • $\begingroup$ FullSimplify[Conjugate[a + b] == Conjugate[a] + Conjugate[b] ] ? $\endgroup$ – kglr Jul 13 '18 at 21:38
  • $\begingroup$ @kevin: But surely the OP wants the result for the general form $a = x + i y$, etc. $\endgroup$ – David G. Stork Jul 13 '18 at 21:39
  • $\begingroup$ @DavidG.Stork Sorry that was me posting extra info on my question, my point was that obvious when real values are used it works as expected, so why when left as symbols does it not work as expected. $\endgroup$ – user Jul 13 '18 at 21:42
  • $\begingroup$ @kglr that returns true! but if you do FullSimplify[Conjugate[a+b]] you get the same result back :( $\endgroup$ – user Jul 13 '18 at 21:44
0
$\begingroup$

Use Distribute.

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

A safer version is

Distribute[Conjugate[a + b], Plus]

It will only distribute over Plus.

This is even safer:

Distribute[Conjugate[a + b], Plus, Conjugate]

As for Conjugate[a+b]==Conjugate[a]+Conjugate[b]: don't think of == as an operator that does something. Instead, it represents an equality. Testing if the equality will hold for all parameter values is complicated and time consuming. Having == do it automatically would be counterproductive (it would make simple operations take a long time). Thus you need to do this manually:

Conjugate[a + b] == Conjugate[a] + Conjugate[b] // FullSimplify
(* True *)
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks! this was exactly what I needed. $\endgroup$ – user Jul 15 '18 at 2:57

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.