MathGroup Archive 2005

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

Search the Archive

Re: Complex Variables

How is Mathematica supposed to know that you intend x and y to be real??

In such situations, ComplexExpand is usually your friend:

   ComplexExpand[Re[x + I y]]
   ComplexExpand[Im[x + I y]]
   ComplexExpand[Conjugate[x + I y]]

give results x, y, and x - I y, respectively.

And don't forget to use either I or else, for Mathematica's special 
symbol for the complex number, Esc ii Esc (or the equivalent\[Imaginary] 
or Esc jj Esc or \[ImaginaryJ]).

wwolfe18 at wrote:
> This has been annoying me for a while.
> Is there a way to declare symbols to be real so that
> Re[x + i y]  gives x and Conjugate[x + i y] gives x - i y etc?

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: TrigExpand - Odd behavior
  • Next by Date: Re: Correct errors on fit parameter ?
  • Previous by thread: Complex Variables
  • Next by thread: Re: Complex Variables