Before Mathematica 9
FullSimplify[ Cot[ (5 Pi)/22 ] + 4 Sin[ (2 Pi)/11 ]]
yielded simply Sqrt[11]
while in the newest version we should play a bit with ComplexityFunction
. For some reason the ComplexityFunction
behavior in FullSimplify
has been changed. One can guess that it is just a different gauge of this option. To shed light on this issue let's define the following function :
cfs[n_][e_] := n Count[e, _Sin, {0, Infinity}] + LeafCount[e]
After playing a bit we can figure out the threshold values :
FullSimplify[ Cot[(5 Pi)/22] + 4 Sin[(2 Pi)/11], ComplexityFunction -> #] & /@ {
cfs[5], cfs[6], cfs[37], cfs[38] } // Column

In Mathematica 8
and earlier all these complexity functions yield Sqrt[11]
. We could find this threshold therein :
FullSimplify[Cot[(5 Pi)/22] + 4 Sin[(2 Pi)/11], ComplexityFunction -> #] & /@ {
cfs[-10], cfs[-9]} // Column

I.e. we have a direct jump between the final results in earlier versions while in ver.9
there are intermediate values where cfs
provided an intermediate result. So in the newer version ComplexityFunction
is more customizable and therfore it is advantageous.
Another possibility in ver. 9
to get Sqrt[11]
might be e.g. :
FullSimplify[ Cot[(5 Pi)/22] + 4 Sin[(2 Pi)/11], TransformationFunctions -> RootReduce]
FullSimplify[Cot[(5 Pi)/22] + 4 Sin[(2 Pi)/11]]
returnsSqrt[11]
in mathematica 8.0.4 $\endgroup$ – chris Feb 1 '13 at 14:23TrigToExp
beforeFullSimplify
. Maybe the order of simplifications changed slightly, but this is a general problem withFullSimplify
--it only makes simplifications that reduce the complexity of the expression, so if a step is needed that produces a much larger intermediate, this path will not be pursued. $\endgroup$ – Oleksandr R. Feb 1 '13 at 14:24