Re: help on Rewrite rules

*To*: mathgroup at smc.vnet.net*Subject*: [mg50882] Re: [mg50875] help on Rewrite rules*From*: DrBob <drbob at bigfoot.com>*Date*: Sun, 26 Sep 2004 05:31:43 -0400 (EDT)*References*: <200409250555.BAA05054@smc.vnet.net>*Reply-to*: drbob at bigfoot.com*Sender*: owner-wri-mathgroup at wolfram.com

Here's one approach: s = Solve[x^2 + y^2 == 1, y]; f = Union[Simplify[#1 /.s]] & ; f[3*x^2 + 2*y^2] {2 + x^2} f[(x^2 + y^2)^(1/2)] {1} A[x^2] + B[y^2] + f@C[x^2 + y^2] {A[x^2] + B[y^2] + C[1]} I don't know if the last example will work for every C function one could possibly specify. Bobby On Sat, 25 Sep 2004 01:55:17 -0400 (EDT), Jon Palmer <Jonathan.palmer at new.ox.ac.uk> wrote: > I am having trouble simplifying expressions in mathematica. My epxerissions > involve two parameters x & y that parameterise a unit circle so that > > x^2 + y^2 =1 > > Without chosing a particular parameterization for x and y I want to simplify > epxpertions of the form: > > > 3x^2 + 2y^2 -----> 2 + x^2 > or > (x^2 + y^2)^(1/2) -----> 1 > > and more importantly for should perform the simplification > > A[x^2] + B [y^2] + C[x^2+y^2] -----> A[ x^2] + B[ y^2] + C[1] > > where A,B&C are functions. > > I assume that this can me achieved with a relatively simple rewrite rule but > I have had very limited success making this work. Can anyone suggest a > solution, > > Many thanks > Jon Palmer > > P.S. I also want to expand the problem to that of three variables x,y&z > parameterizing a unit sphere but I suspect that this will be obvious form > the solution of the unit circle problem. > > > > > -- DrBob at bigfoot.com www.eclecticdreams.net From news at ptn-nntp-reader01.plus.net Sat Sep 25 05:03:29 2004 by smc.vnet.net (8.8.8+Sun/8.8.8) with ESMTP id FAA07777 for <mathgroup at smc.vnet.net>; Sat, 25 Sep 2004 05:03:28 -0400 (EDT) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 1CB8QS-00039W-00 for comp-soft-sys-math-mathematica at moderators.isc.org; Sat, 25 Sep 2004 11:01:04 +0200 id 1CB8QO-00023q-LY for comp-soft-sys-math-mathematica at moderators.isc.org; Sat, 25 Sep 2004 10:01:00 +0100 From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk> To: mathgroup at smc.vnet.net References: <cj322j$542$1 at smc.vnet.net> Subject: [mg50882] Re: Simple questions with Complex Numbers X-RFC2646: Format=Flowed; Original Organization: Customer of PlusNet plc (http://www.plus.net) Use ComplexExpand thus: z = s+ I t; zbar = s- I t; Re[1/(z zbar)]//ComplexExpand//Simplify Steve Luttrell "Sunil Pinnamaneni" <pinnama at cims.nyu.edu> wrote in message news:cj322j$542$1 at smc.vnet.net... > I'm having difficulty getting mathematica to do simplifications with > Complex > Numbers. For instance, > > z = s+ I t; > zbar = s- I t; > FullSimplify[Re[1/(z zbar)]] > > yields > > Re[1/(s^2 +t^2)] > > Is there any way to get Mathematica to yield the result 1/(s^2 +t^2) > without > the Re? It seems like Mathematica should have been programmed to do easy > simplifications using Complex Numbers. > > I'm interested in finding the Real part of expressions like 1/z^5, but > Mathematica doesn't seem to want to multiply the denominator by the > conjugate, and carry out the simpification. > > Can Mathematica do such things, or does one have to specifically program > it > to handle these simplifications. > > Thanks, > Sunil > >

**References**:**help on Rewrite rules***From:*"Jon Palmer" <Jonathan.palmer@new.ox.ac.uk>