MathGroup Archive 2005

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

Search the Archive

Re: with 5.2 Mac

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59821] Re: with 5.2 Mac
  • From: "Carl K. Woll" <carlw at u.washington.edu>
  • Date: Tue, 23 Aug 2005 04:51:15 -0400 (EDT)
  • Organization: University of Washington
  • References: <de6lnl$cfa$1@smc.vnet.net> <de9cni$q4o$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Steuard Jensen" <sbjensen at midway.uchicago.edu> wrote in message 
news:de9cni$q4o$1 at smc.vnet.net...
> [Reversed order of quotes to make the discussion easier to read:]
>
>> From: Steuard Jensen [mailto:sbjensen at midway.uchicago.edu]
To: mathgroup at smc.vnet.net
>> > I've just upgraded from Mathematica 5.0 to 5.2 for the Mac...
>> > Specifically, I have used $Assumptions to define some variables as
>> > real.  I apply Conjugate to various expressions, and then Simplify
>> > the results.  In version 5.0, I _never_ saw a case in which
>> > Conjugate[] remained after this step.  But in 5.2, I find that
>> > even simple forms like Conjugate[x + I y] often remain
>> > unsimplified.  (Refine[x + I y] still seems to work, though.)
>
> Quoth "David Park" <djmp at earthlink.net> in article
> <de6lnl$cfa$1 at smc.vnet.net>:
>> Why don't you use...
>>
>> ComplexExpand[Conjugate[x + I y]]
>> x - I*y
>>
>> and you don't even have to set $Assumptions?
>
> That would be an excellent suggestion for this case, but my actual
> work isn't this simple.  In particular, my actual expressions include
> a mix of complex-valued and real-valued terms.  So either I would have
> to use $Assumptions as I've done here, or I would have to pass a long
> list of complex variables to ComplexExpand each time.  (And it's even
> possible that my extra TransformationFunctions might replace
> combinations of complex variables with real ones, so I might have to
> use ComplexExpand more than once.)
>
> In any case, whether or not ComplexExpand is the _best_ way to do
> this, I think that Simplify still ought to work as expected! :)
>
> Nevertheless, thanks for your suggestion; even if it's not right for
> this problem, it could be useful for others.
>
> Steuard Jensen
>

I believe that ComplexExpand was created specifically for your type of 
problem. If it doesn't work well for you, it would be nice if you provided 
an example showing this. As far as your objection concerning a long list of 
complex variables, what is wrong with defining cvars={list of complexes}, 
and then using

ComplexExpand[ expr, cvars ]

It is possible to provide patterns in the second argument also. For example, 
if all of your complex variables were c[1], c[2], etc. then using _c as the 
second argument would be sufficient.

Another alternative not mentioned earlier in this thread is to use the ReIm 
package, which I only mention for completeness as it has a few problems of 
its own.

Carl Woll
Wolfram Research 



  • Prev by Date: Re: How to free memory?
  • Next by Date: Re: Simplifying Conjugate[] with 5.2 Mac
  • Previous by thread: Re: with 5.2 Mac
  • Next by thread: Re: with 5.2 Mac