# Return to Answer

 2 added 20 characters in body edited Dec 7 '12 at 15:19 WalkingRandomly 3,3801313 silver badges3535 bronze badges Mathematica uses a ComplexityFunction to measure how 'simple' an expression is. According to the documentation: ComplexityFunction counts the subexpressions and digits of integers What we need to do is create a ComplexityFunction that considers the expressions you desire to be very cheap. Depth almost works for your middle expression f[x_] := Depth[x]; FullSimplify[{1/(1 + Sqrt - Sqrt), Sqrt[5 - 2*Sqrt], Sqrt[4 + Sqrt]}, ComplexityFunction -> f]  gives Sadly, the expression you want has the same depth as the expression you started with Depth[Sqrt[4 + Sqrt]] 4 Depth[1/2 (Sqrt + Sqrt)] 4  I'm afraid that I couldn't find anything that would Simplify that final expression. Mathematica uses a ComplexityFunction to measure how 'simple' an expression is. According to the documentation: ComplexityFunction counts the subexpressions and digits of integers What we need to do is create a ComplexityFunction that considers the expressions you desire to be very cheap. Depth almost works f[x_] := Depth[x]; FullSimplify[{1/(1 + Sqrt - Sqrt), Sqrt[5 - 2*Sqrt], Sqrt[4 + Sqrt]}, ComplexityFunction -> f]  gives Sadly, the expression you want has the same depth as the expression you started with Depth[Sqrt[4 + Sqrt]] 4 Depth[1/2 (Sqrt + Sqrt)] 4  I'm afraid that I couldn't find anything that would Simplify that final expression. Mathematica uses a ComplexityFunction to measure how 'simple' an expression is. According to the documentation: ComplexityFunction counts the subexpressions and digits of integers What we need to do is create a ComplexityFunction that considers the expressions you desire to be very cheap. Depth works for your middle expression f[x_] := Depth[x]; FullSimplify[{1/(1 + Sqrt - Sqrt), Sqrt[5 - 2*Sqrt], Sqrt[4 + Sqrt]}, ComplexityFunction -> f]  gives Sadly, the expression you want has the same depth as the expression you started with Depth[Sqrt[4 + Sqrt]] 4 Depth[1/2 (Sqrt + Sqrt)] 4  I'm afraid that I couldn't find anything that would Simplify that final expression. 1 answered Dec 7 '12 at 14:30 WalkingRandomly 3,3801313 silver badges3535 bronze badges Mathematica uses a ComplexityFunction to measure how 'simple' an expression is. According to the documentation: ComplexityFunction counts the subexpressions and digits of integers What we need to do is create a ComplexityFunction that considers the expressions you desire to be very cheap. Depth almost works f[x_] := Depth[x]; FullSimplify[{1/(1 + Sqrt - Sqrt), Sqrt[5 - 2*Sqrt], Sqrt[4 + Sqrt]}, ComplexityFunction -> f]  gives Sadly, the expression you want has the same depth as the expression you started with Depth[Sqrt[4 + Sqrt]] 4 Depth[1/2 (Sqrt + Sqrt)] 4  I'm afraid that I couldn't find anything that would Simplify that final expression.