Re: with 5.2 Mac
- To: mathgroup at smc.vnet.net
- Subject: [mg59829] Re: with 5.2 Mac
- From: sbjensen at midway.uchicago.edu (Steuard Jensen)
- Date: Tue, 23 Aug 2005 04:51:24 -0400 (EDT)
- Organization: The University of Chicago
- References: <de6lnl$cfa$1@smc.vnet.net> <200508210751.DAA26532@smc.vnet.net> <debso5$9ap$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Quoth Pratik Desai <pdesai1 at umbc.edu> in article <debso5$9ap$1 at smc.vnet.net>: > >>From: Steuard Jensen [mailto:sbjensen at midway.uchicago.edu] To: mathgroup at smc.vnet.net > >>>...I have used $Assumptions to define some variables as real. I > >>>apply Conjugate to various expressions, and then Simplify the > >>>results. > Here is a somewhat inelegant yet effective approach, instead of using > Assumption > Use TagSet to define your really "real" variables > > Clear[a, b, z] > TagSet[a, Conjugate[a], a] > TagSet[b, Conjugate[b], b] > z = a + I*b // Conjugate > I use this solution as a last recourse...but it works every time Well, it will work for Conjugate, but it won't help if you want to simplify other expressions where knowing the argument is real would help. Still, I'm quite impressed: I didn't expect that Conjugate would be clever enough to "try applying itself" to sub-expressions to make this work! Does anyone out there know of any reason that this would be a bad idea (perhaps used together with $Assumptions to cover all the bases)? But on another note, wow. I've been using Mathematica for years, and somehow this was the first time I'd heard of the concept of upvalues (which I've just read up on after looking up TagSet). That will make life _so_ much easier! And it's bound to improve efficiency as well. Thank you very much for bringing it to my attention! Steuard Jensen
- References:
- Re: with 5.2 Mac
- From: sbjensen@midway.uchicago.edu (Steuard Jensen)
- Re: with 5.2 Mac