I have a complex function and I want to take a list of derivatives of it. My code reads as follows:

f[r, t] = Exp[-I wt] (It Exp[-I wr]/r + R Exp[I w r]/r)
ComplexExpand[Conjugate[f[r, t]]]

In my function, I want the coefficients It and R to be complex numbers.
However, this gives me the following output:

(R Cos[r w] Cos[wt])/r + (It Cos[wr] Cos[wt])/r + (R Sin[r w] Sin[wt])/r - (It Sin[wr] Sin[wt])/r + I (-((R Cos[wt] Sin[r w])/r) + (It Cos[wt] Sin[wr])/r + (R Cos[r w] Sin[wt])/r + (It Cos[wr] Sin[wt])/r

This treats It and R as real numbers and it expands the exponentials using Euler's identity. How do I get the conjugate of the functions in a simpler form, and taking It and R as complex.

  • $\begingroup$ REad the manual about "ComplexExpand" and you will see that you need to indicate which variables are complex. $\endgroup$ Commented Oct 25, 2021 at 8:11
  • $\begingroup$ That still returns everything in terms of Sin and Cos even though the input is in terms of exponentials. The complex numbers themselves are also expressed as Re[] and Im[]. Is there some kind of z z^* style notation available? $\endgroup$
    – newtothis
    Commented Oct 25, 2021 at 8:20
  • $\begingroup$ Look at "TrigToExp" $\endgroup$ Commented Oct 25, 2021 at 10:14
  • $\begingroup$ Hard to tell if you mean wr or w*r in your code since you have it both ways. It puts what you mean bywt in doubt also. $\endgroup$
    – Bill Watts
    Commented Jul 22, 2022 at 21:46

1 Answer 1

    $Assumptions[w > 0]
f[r, t] = Exp[-I w t] (It Exp[-I w r]/r + R Exp[I w r]/r)
ce = ComplexExpand[Conjugate[f[r, t]], {It, R}, 
TargetFunctions -> Conjugate] // Simplify
ce // TraditionalForm
ce // TrigToExp
ce // TrigToExp // TraditionalForm

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.