Re: Simplifying Conjugate[] with 5.2 Mac
- To: mathgroup at smc.vnet.net
- Subject: [mg59773] Re: Simplifying Conjugate[] with 5.2 Mac
- From: "James Gilmore" <james.gilmore at yale.edu>
- Date: Sat, 20 Aug 2005 03:14:36 -0400 (EDT)
- Organization: Yale University
- References: <de45i8$qtf$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, > In[5]:= Simplify[Conjugate[x+I y]] > > Out[5]= Conjugate[x + I y] With regard to this behaviour, it may be useful to use PlusMap (or Map if there are always at least two terms when expanded), see FurtherExamples, in the Map documentation. $Assumptions = {{a, b} \[Element] Reals}; PlusMap[f_, expr_ /; Head[expr] =!= Plus, ___] := f[expr]; PlusMap[f_, expr_Plus, r___] := Map[f, expr, r]; Trace[Simplify[PlusMap[Conjugate, Expand[a + I*b]]]] Trace[Simplify[PlusMap[Conjugate, Expand[a + b]]]] -- James Gilmore Graduate Student Department of Physics Yale University New Haven, CT 06520 USA "Steuard Jensen" <sbjensen at midway.uchicago.edu> wrote in message news:de45i8$qtf$1 at smc.vnet.net... > I've just upgraded from Mathematica 5.0 to 5.2 for the Mac, and I > discovered that a notebook that ran fine before (finishing in ten or > fifteen minutes) was now being tremendously slow. I'm sure I haven't > tracked down everything that I need to fix by hand to speed it back up > again (I did a lot of tuning when I wrote it), but it seems that part > of the problem can be tracked back to what looks like a bug in > Simplify[] (or at least an awfully annoying behavior). > > 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.) > > I've cut and pasted a simple example below, and I'd be interested to > know if other people experience the same behavior. I'd appreciate any > advice or comments on how to handle this, or on where I should write > to report this strange behavior to Wolfram if you think that's > appropriate. Thanks in advance for any help you can give. > > Steuard Jensen > > ------------------------------------------------------------ > > In[1]:= $Assumptions={Element[{x,y},Reals]}; > > In[2]:= Simplify[Conjugate[x]] > > Out[2]= x > > In[3]:= Simplify[Conjugate[I y]] > > Out[3]= -I y > > In[4]:= Simplify[Conjugate[x+y]] > > Out[4]= x+y > > In[5]:= Simplify[Conjugate[x+I y]] > > Out[5]= Conjugate[x + I y] > > In[6]:= Refine[Conjugate[x+I y]] > > Out[6]= x - I y > > ------------------------------------------------------------ >