Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Complex Variables

  • To: mathgroup at
  • Subject: [mg55422] Re: Complex Variables
  • From: Peter Pein <petsie at>
  • Date: Wed, 23 Mar 2005 05:34:34 -0500 (EST)
  • References: <d1on33$nbs$>
  • Sender: owner-wri-mathgroup at

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?
> Warren Wolfe
In[1]:= $Post = ComplexExpand[#1, TargetFunctions -> {Re, Im}] & ;
In[2]:= Re[(x - I*y)^3]
Out[2]= x^3 - 3*x*y^2
In[3]:= Re[x + I*y]
Out[3]= x
In[4]:= Conjugate[a - I*(x + I*y)]
Out[4]= a + I*x + y

If you're _really_ sure you want this expansion everytime you use
Mathematica, you can put "$Post=... " into your init.m file (Mathematica
 book A.7.2 & A.8.2)
Peter Pein

  • Prev by Date: Re: Complex Variables
  • Next by Date: Re: TrigExpand - Odd behavior
  • Previous by thread: Re: Complex Variables
  • Next by thread: Re: Complex Variables