Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1994
*January
*February
*March
*April
*May
*June
*July
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

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

Search the Archive

Re: Teaching Complex Analysis

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: Teaching Complex Analysis
  • From: bert at netcom.com (Roberto Sierra)
  • Date: Sun, 20 Feb 1994 13:54:00 -0800


<<
In[2]:=w = (x + I y)^3  //Expand

Out[2]=
 3        2          2      3
x  + 3 I x  y - 3 x y  - I y

In[3]:=Re[w]

Out[3]=
    3        2          2      3
Re[x  + 3 I x  y - 3 x y  - I y ]

The desired expansion can be forced by using ComplexExpand
after using Re[w]  (or Im[w]).

In[14]:=Re[w]  //ComplexExpand

Out[14]=
 3        2
x  - 3 x y
>>

Your explanation for why Re[w] and Im[w] do not expand the result is
not entirely correct -- Mma does not assume that x and y must be
real-valued.  Compare, for example, the different results you get
when you assign x and y complex values into your expressions:

In[5]:= %3 /. {x->3I,y->2+I}

Out[5]= 74

In[6]:= %4 /. {x->3I,y->2+I}

Out[6]= 36 - 54 I

Clearly, the longer Re[...] is correct for these values of x and y,
which is why Mma left them evaluated.  The simplified expression will
only work if x and y are limited to real values.

A minor point, but this may help you understand exactly why Re[w] is
left unevaluated.


<<
QUESTION.  Are there other interesting symbolic manipulations
for complex numbers that are not well known ?
>>

If you send e-mail to mathsource at wri.com containing the single
line:

	find complex

you'll receive information about a number of packages which are
probably of interest to you.  In particular, I see there's a package
called ReIm.m which allows you specify that certain variables and
expressions are pure-real or pure-imaginary, making Re[...] and Im[...]
automatically recognize these facts without the use of ComplexExpand.
Instructions for obtaining these items will be mailed to you by the
MathSource server.  You can also obtain items via FTP or gopher to
mathsource.wri.com.


 \\|//
  - -                          "Dyslexics UNTIE!  Dyslexics LURE!!"
  o o                                     -- Elbo Room ex-graffito
   J   roberto sierra
   O   tempered microdesigns    NOTICE:
  \_/  san francisco, ca        The ideas and opinions expressed
       bert at netcom.com          herein are not those of the author.





  • Prev by Date: Nonlinear Discrete
  • Next by Date: Error when Saving graphic to postscript!!! (HELP!!)
  • Previous by thread: Re: Nonlinear Discrete
  • Next by thread: Error when Saving graphic to postscript!!! (HELP!!)