[Date Index] [Thread Index] [Author Index]
Re: How to programmatically rewrite (x + y/z) as (xz+ y)/z ?
With the Presentations package from my web site below ($50) this is easy. Just use FactorOut. Needs["Presentations`Master`"] x + y/z // FactorOut[1/z] (y + x z)/z x + y + (2*w)/z - p/3 + 10 // FactorOut[1/z] (2 w + 10 z - (p z)/3 + x z + y z)/z -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ "TuesdayShopping" <TuesdayShopping at yahoo.com> wrote in message news:g1gqk6$1g1$1 at smc.vnet.net... > Given "(x + y/z)" as input, how do I get the same expression in the form > of "(xz+ y)/z". > > Note that the input form may not always have 2 terms. It may be > arbitrarily long or may not be in any standard form. It may be like > "x+y", or "x + y + (2*w)/z - p/3 +10", or "c", or "x/2" . . . .All that > can be assumed about the input is that they are all polynomials bound > together with the 5 operators (+, -, *, / and ^), and that whatever the > output is, the denominator can be assumed to be not equal to 0. > > Thanks a lot. >