Re: Simplifying Conjugate[] with 5.2 Mac
- To: mathgroup at smc.vnet.net
- Subject: [mg59785] Re: Simplifying Conjugate[] with 5.2 Mac
- From: sbjensen at midway.uchicago.edu (Steuard Jensen)
- Date: Sun, 21 Aug 2005 03:51:33 -0400 (EDT)
- Organization: The University of Chicago
- References: <de45i8$qtf$1@smc.vnet.net> <de6maf$cj5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Quoth "James Gilmore" <james.gilmore at yale.edu> in article <de6maf$cj5$1 at smc.vnet.net>: [I wrote:] > > 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]]]] This approach would presumably work in principle (since we've seen that Simplify can deal with one term at a time). But in practice, my expressions often involve products and sums of many terms at many levels. So I would either need to devise a way to Map Conjugate properly onto each term by hand (at which point I might as well just change all the I's to -I's myself!), or come up with an automated way of doing it (which would probably end up being equivalent to explicitly defining Conjugate[expr_Plus]:=Map[Conjugate,expr], etc., as I suggested in a different reply). But I hope it's not unreasonable for me to feel a bit frustrated that I've got to work around this behavior at all. Regression bugs between versions are no fun for anyone. Steuard Jensen