# How to "rationalize" a fraction in Mathematica

When I try to rationalize the following number $$1\over{2^{1/4}+4^{1/4}+8^{1/4}}$$

   FullSimplify[1/( 2^(1/4)+4^(1/4)+8^(1/4) )]


I get the same expression, and not my hand-calculation result which is

$${(\sqrt{4+3\sqrt{2}}-\sqrt 2) (3\sqrt 2 -2)}\over 14$$ What command should I use, if there is one?

Edit: "rationalize" meaning as in ordinary algebra where roots are moved from denominator to numerator, and not as writing a decimal as a fraction

• LeafCount[1/(2^(1/4) + 4^(1/4) + 8^(1/4))] vs. LeafCount[(Sqrt[4 + 3 Sqrt] - Sqrt) (3 Sqrt - 2)/14] might give you a hint why this happens. Moreover, "rationalize" is a very misleasing word here. Aug 3, 2018 at 21:57
• I don't know of a command for this. But people have written functions to do what you wish. You can find their solutions here: mathematica.stackexchange.com/questions/5283/… mathematica.stackexchange.com/questions/9868/… Aug 3, 2018 at 22:53

You can use ToRadicals and RootReduce instead:

Simplify @ ToRadicals @ RootReduce[1/(2^(1/4)+4^(1/4)+8^(1/4))] //TeXForm


$\frac{1}{14} \left(-6+2 \sqrt{2}+\sqrt{2 \left(8+9 \sqrt{2}\right)}\right)$

• Very nice! Though we should make it clear to the OP that, while the solutions offered here work for his problem, none of them are general. Consider, for instance: test = {1/(Sqrt + Sqrt + Sqrt), (3 + Sqrt)/(4 + Sqrt), (2 + Sqrt)/(1 + Sqrt[5 + Sqrt]), Sqrt[(1 + Sqrt)/(1 + Sqrt)], Sqrt[3 + 2 Sqrt]/(1 + Sqrt)}; Given that this is not an obscure problem, yet MMA nevertheless doesn't have a built-in function for this, I gather it must be difficult to create a solution that is sufficiently general for Wolfram to offer it. Aug 4, 2018 at 1:47
• ....Though, having said that, there is such a function in Maple: maplesoft.com/support/help/maple/view.aspx?path=rationalize Aug 8, 2018 at 0:27
• @theorist Thanks for the link to Maple. It actually gives answer for variables a,b,c, but oddly enough answer does not look symmetric! Aug 9, 2018 at 21:05

In this case ToNumberField gives a denested form:

ToRadicals[ToNumberField[1/(2^(1/4) + 4^(1/4) + 8^(1/4))]] // Together // TeXForm


$\frac{1}{14} \left(-6+4 \sqrt{2}+2 \sqrt{2}+2^{3/4}\right)$