MathGroup Archive 1999

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

Search the Archive

Re: complex variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20766] Re: complex variable
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 11 Nov 1999 00:22:43 -0500
  • References: <80auvr$j3s@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Biao Wu,

The following may help:

Load the package Algebra`ReIm`

<< Algebra`ReIm`

Specify that x and y are real (the form x/: is used to attach the
information to x  instead of to  Im)

x /: Im[x] = 0; y /: Im[y] = 0;

z = x + I y;

Re[z]

x

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565




Biao Wu <bwu at physics.utexas.edu> wrote in message
news:80auvr$j3s at smc.vnet.net...
> Hi, all
>
>   I have a question: how to define a symbolic variable as real or complex
> explicitly? This is related to what I want to do. In math, if I do
>
>    z=x+I*y; Im[z]
>
> what I get is
>
>    Im[x]+Re[y]
>
> instead of what I want
>
>    y
>
> If I can define "x" and "y" explicitly as real variables, I should be
> able to do this. Or is there any other way to do it?
>
> Thanks.
>
>
> Wu, Biao
>
>



  • Prev by Date: FW: How to do Lie Algebras in Mathematica...
  • Next by Date: RE: notebook interface problem in Mathematica 4
  • Previous by thread: Re: complex variable
  • Next by thread: Re: complex variable