Re: Question about Replace
- To: mathgroup at smc.vnet.net
- Subject: [mg35718] Re: Question about Replace
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sat, 27 Jul 2002 06:43:23 -0400 (EDT)
- References: <7a.2a4ebef0.2a712bf7@aol.com> <ahr0mf$l20$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Xuguang(Heather) Zhang" <xuguang_zhang at hotmail.com> wrote in message news:ahr0mf$l20$1 at smc.vnet.net... > Hi, Bob, > > I tried ReplaceRepeated, however, I got the following answer: > x+y+z/(x+y)+e^(x+y)+(w*x)+y//. x+y->x > > e^x+x+(w*x)+2y+z/x > > In fact, there is still one more (x+y) term if we rewritten the answer. That > is e^x+(x+y)+y+(w*x)+z/x. Do you know how to get rid of it? Thanks. Heather, Use Simplify with the assumption x+y=x: Simplify[x + y + z/(x + y) + e^(x + y) + w*x + y, {x + y == x}] e^x + x + w*x + z/x In other circumstances we may have to give more help Simplify (or FullSimplify). Please check possiblities in the Help Browser. Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565