2
$\begingroup$

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?

$\endgroup$
6
  • $\begingroup$ ComplexExpand may help: Try Conjugate[Exp[-I w t]] // ComplexExpand. $\endgroup$ Oct 5, 2017 at 14:33
  • $\begingroup$ @ 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. $\endgroup$
    – Edwin
    Oct 5, 2017 at 14:40
  • $\begingroup$ Conjugate[Exp[-I w t] + Exp[I w t]] // ComplexExpand // TrigToExp $\endgroup$
    – Bob Hanlon
    Oct 5, 2017 at 14:44
  • 1
    $\begingroup$ @ Bob Hanlon Yeah, you can do that. But why mathematica can't just do it with Conjugate directly? $\endgroup$
    – Edwin
    Oct 5, 2017 at 14:49
  • $\begingroup$ 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! $\endgroup$
    – Michael E2
    Oct 5, 2017 at 15:04

2 Answers 2

1
$\begingroup$
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.

$\endgroup$
4
  • $\begingroup$ Great! This worked! It seems that to confine the parameters, I'd better use the FullSimplify with Assumptions rather than the Refine. $\endgroup$
    – Edwin
    Oct 6, 2017 at 5:02
  • $\begingroup$ 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] $\endgroup$
    – Edwin
    Oct 6, 2017 at 5:50
  • $\begingroup$ Try Assumptions -> {a > 0, \[Phi] > 0, x > 0}. $\endgroup$
    – Sumit
    Oct 6, 2017 at 12:43
  • $\begingroup$ Yeah, it works. But it’s so strange that writing it separately makes difference. $\endgroup$
    – Edwin
    Oct 6, 2017 at 12:45
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.