The anomaly below (using Version 4) was recently brought to my attention by
Dave Park in a slightly different context.
---------
In[1]:=
Simplify[ a^2/Sqrt[a^2(a^2 + b^2)], a>0 && Element[b,Reals] ]
Out[1]=
a^2/Sqrt[a^2(a^2 + b^2)]
In[2]:=
Simplify[ a^2/Sqrt[a^2(a^2 + b^2)], a>0 && Element[b,Reals],
ComplexityFunction->LeafCount ]
Out[2]=
a/Sqrt[a^2 + b^2]
The documentation for ComplexityFunction says:
"With the default setting ComplexityFunction->Automatic,
forms are ranked primarily according to their LeafCount,
with corrections to treat integers with more digits as more complex."
Then why isn't the simpler form returned using the
default setting (ComplexityFunction->Automatic)?
I get the same result using FullSimplify.
--------------------
Regards,
Ted Ersek
Mathematica tips, tricks have moved to
http://www.verbeia.com/mathematica/tips/Tricks.html