Re: Simplify[] shortcoming

*To*: mathgroup at smc.vnet.net*Subject*: [mg21546] Re: [mg21525] Simplify[] shortcoming*From*: Andrzej Kozlowski <andrzej at tuins.ac.jp>*Date*: Sat, 15 Jan 2000 02:03:53 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

It seems that Matheamtica just fails to "see" that it can cancel x-y. Curiously one can get the desired answer in the following way: expr = (3*x + (x - y)*Log[x] + (x - y)*Log[-1 + y/x])/(x - y); In[7]:= Simplify[expr /. (x - y) -> u] /. u -> (x - y) Out[7]= 3 x y ----- + Log[x] + Log[-1 + -] x - y x > From: Gianluca Gorni <gorni at dimi.uniud.it> To: mathgroup at smc.vnet.net > Date: Fri, 14 Jan 2000 02:43:40 -0500 (EST) > To: mathgroup at smc.vnet.net > Subject: [mg21546] [mg21525] Simplify[] shortcoming > > > Hello! > > I have run into a simple expression for which both Simplify and > FullSimplify cannot see an easy simplification: > > expr = (3*x + (x - y)*Log[x] + (x - y)*Log[-1 + y/x])/(x - y); > > You can see that the factors (x-y) cancel out with the denominator. > So you can write expr as > > (3*x)/(x - y) + Log[x] + Log[-1 + y/x] > > which has a LeafCount of 21, while expr scored 34. Nevertheless, > Simplify[] leaves expr as it was. > > FullSimplify[expr] does collect (x-y) in the numerator, but still > the LeafCount is 29. > > My version is Mathematica 4 on MacOS. > > Gianluca Gorni > >