home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!newsstand.cit.cornell.edu!news
- From: Ray Zimmerman <Ray-Zimmerman@cornell.edu>
- Subject: Re: mathematica question- using complex symbols
- Message-ID: <1992Aug12.144118.2855@mail.cornell.edu>
- X-Xxdate: Wed, 12 Aug 92 15: 42:58 GMT
- Sender: news@mail.cornell.edu
- Nntp-Posting-Host: ziklag.ee.cornell.edu
- Nntp-Posting-User: rz10@cornell.edu
- Organization: Electrical Engineering, Cornell University
- X-Useragent: Nuntius v1.1.1d7
- References: <1992Aug11.202102.14808@athena.mit.edu>
- Date: Wed, 12 Aug 1992 14:41:18 GMT
- Lines: 42
-
- mathematica question- using complex symbols
-
- In article <1992Aug11.202102.14808@athena.mit.edu> Saurav D Bhatta,
- bhattas@athena.mit.edu writes:
- >I have been trying to manipulate complex symbols
- > ^^^^^^^^
- >(as opposed to complex numbers) using mathematica. I had expected
- >mathematica to be able to simplify expressions containing complex
- >symbols the same way it simplifies complex number expressions.
- >for example, if we do z= 3+ 4 I , and then compute
- >z*Conjugate[z], the answer output will be 25. but on the other hand,
- >if we do z=x + I y and then compute z*Conjugate[z], mathematica,
- >instead of giving the desired answer x^2 + y^2, outputs something like
- >(I x + y)*Conjugate(I x + y). i.e. it refuses to simplify the complex
- >expression.
- >
- >i am wondering if it is possible to get around this problem. i am going
- >to to be using long expressions containing many complex symbols, and
- would
- >like to get the final answer as a sum of one real part and one imaginary
- >part. i am a relatively inexperienced user of this software (and am
- using it
- >only for some very specific purposes)- so any suggestion will be greatly
- >appreciated. thanks.
- >
- >
- >saurav bhatta
- >(bhattas@presto.mit.edu)
-
- If you've got Mathematica 2.0 or later try using the built in function
- ComplexExpand[]. It doesn't solve all the problems but I found it to
- be somewhat useful when trying to do the same thing on some very
- complicated expressions. Note that after using ComplexExpand[] you
- can't just use Re[] and Im[] to pick off the real and imaginary parts
- although you can probably use the Part[] function to pick off those
- parts of the resulting expression. That's what I ended up doing.
- (which, by the way, certainly doesn't mean it's the best solution)
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Ray Zimmerman Ray-Zimmerman@cornell.edu ::
- ::..................................................................::
- :: THIS SPACE FOR RENT. THIS SPACE FOR RENT. THIS SPACE FOR RENT. ::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-