MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: complex numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105911] Re: [mg105904] complex numbers
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 24 Dec 2009 20:59:32 -0500 (EST)
  • References: <22730182.1261632204307.JavaMail.root@n11>

z = x + I y
ComplexExpand[{Re[z], Im[z]}]

x + I y
{x, y}

Mathematica assumes that all variables represent complex numbers.
ComplexExpand assumes all variables are real - unless you specify some are
complex. 

Clear[z]
ComplexExpand[{Re[z], Im[z]}]

{z, 0}

ComplexExpand is practically the indispensible routine when working with
complex numbers. It seems to be overlooked by beginners. No wonder. If one
goes to Help and finds tutorial/ComplexNumbers, there is no mention of
ComplexExpand. But guide/ComplexNumbers does list it half way down the page.
Also, it ought to be mentioned in More Information on the Complex Help page.
It is listed in the See Also section, but I could not find it used anywhere
in the examples. It is used in examples on the Re Help page, but not
mentioned in More Information. Considering how many postings there are for
which ComplexExpand is the answer, it would be really nice if WRI would give
it more prominent mention. 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Jon Joseph [mailto:josco.jon at gmail.com] 


All: Something fundamental about complex number initialization I am 
failing to understand. I wish to define a complex number

	z=x+ I y where x and y are both reals. Can someone tell me the 
proper way to tell Mathematica that x, y are real so that Re[z] returns 
x and Im[z] returns y? Much appreciated, Jon.




  • Prev by Date: solving equations
  • Next by Date: Re: complex numbers
  • Previous by thread: Re: complex numbers
  • Next by thread: Re: complex numbers