3
$\begingroup$

How can I write a complex function $f(z)$ in the form $u(x,y)+iv(x,y)$ using Mathematica? Re and Im do not work, because they do it for complex numbers, not functions. For example, if I try

Re[2 I (z) + 6 Conjugate[(z)] + Sin[(z)]]

Mathematica returns:

-2 Im[z] + 6 Re[z] + Re[Sin[z]]
$\endgroup$
4
$\begingroup$

Replace z with x + I y and use ComplexExpand.

ComplexExpand[2 I z + 6 Conjugate[z] + Sin[z] /. z -> x + I y]
(* 6 x - 2 y + Cosh[y] Sin[x] + I (2 x - 6 y + Cos[x] Sinh[y]) *)
| improve this answer | |
$\endgroup$

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.