# Fail to make complex conjugate

I want to evaluate the complex conjugate of the function $e^{-iwt}+e^{iwt}$

Refine[Conjugate[Exp[-I w t] + Exp[I w t]], Element[{w, t}, Reals]]


But Mathematica cannot evaluate and output the input.

Then I tried other function, which is slight different from my first function $e^{-iwt}+e^{iw}$.

Refine[Conjugate[Exp[-I w t] + Exp[I w]], Element[{w, t}, Reals]]


This time I just move the t away in the second exponential and it succeeded.

Can someone give me some clues about how to evaluate the first function using Mathematica?

• ComplexExpand may help: Try Conjugate[Exp[-I w t]] // ComplexExpand. Oct 5, 2017 at 14:33
• @ Henrik Schumacher Well, I really don't want to expand my functions to sin and cos. And I tried Conjugate[Exp[-I w t]] and Conjugate[Exp[I w t]]. Both cases worked well under the Refine function. But when I added these two parts together, it failed. Oct 5, 2017 at 14:40
• Conjugate[Exp[-I w t] + Exp[I w t]] // ComplexExpand // TrigToExp Oct 5, 2017 at 14:44
• @ Bob Hanlon Yeah, you can do that. But why mathematica can't just do it with Conjugate directly? Oct 5, 2017 at 14:49
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Oct 5, 2017 at 15:04

Simplify[Conjugate[Exp[-I w t] + Exp[I w t]], Assumptions -> {w > 0, t > 0}]


$\rm Conjugate\left[e^{-i ~ t w}+e^{i ~ t w}\right]$

FullSimplify[Conjugate[Exp[-I w t] + Exp[I w t]], Assumptions -> {w > 0, t > 0}]


$\rm 2~Cos[t w]$

Don't ask why FullSimplify works and Simplify does not - I have no idea. In this kind of problems, I try different ways and on a good day one of them works.

• Great! This worked! It seems that to confine the parameters, I'd better use the FullSimplify with Assumptions rather than the Refine. Oct 6, 2017 at 5:02
• Well, but the problem occurs again when you try: FullSimplify[ Conjugate[(Sin[\[Pi]/a x] + E^(I \[Phi]) Sin[2 \[Pi]/a x])/Sqrt[a]], Assumptions -> {a, \[Phi], x} > 0] Oct 6, 2017 at 5:50
• Try Assumptions -> {a > 0, \[Phi] > 0, x > 0}. Oct 6, 2017 at 12:43
• Yeah, it works. But it’s so strange that writing it separately makes difference. Oct 6, 2017 at 12:45

A bit of a hack, but this works (correctly) for most mundane cases of expression involving only real unknowns and holomorphic functions:

expr/. Conjugate[x_]:> (x/. a_Complex:> Conjugate[a])


I tend to use this regularly for getting the complex conjugate of expressions. Use at your own risk. Typically counterindications are the occurrence of square roots etc.