I have: 1/(2^(1/2) - 2^(1/3))

And would like to dissolve the denominator and convert it to sum of numbers in the form 2^q where q is Rational.

Does Mathematica offer a function to convert such expressions?

These do not help:

FullSimplify[1/(2^(1/2) - 2^(1/3))] Gives: 1/(-2^(1/3) + Sqrt[2])


MinimalPolynomial[1/(2^(1/2) - 2^(1/3)), x] Gives: -1 + 6 x^2 - 4 x^3 - 12 x^4 - 24 x^5 + 4 x^6

The actual result should be:


Which can manually be derived by factoring the sums of cubes first, then subsequently applying the difference of squares along with a few simplifications.

It would be nice if it can solve the generalized version:

1/(b^(1/m) - b^(1/n))

  • 1
    $\begingroup$ Apart[1/(2^(1/2)-2^(1/3))] returns -2^(-1/3)-2^(-1/6)+(-1+2^(1/6))^(-1) but I suspect it will not be able to give you the solution you desire for your generalized problem. $\endgroup$
    – Bill
    Jan 1 at 22:31
  • $\begingroup$ Close! ...Correct, that third term has the -1 in the denominator which throws off the desired output. $\endgroup$
    – Steve237
    Jan 1 at 23:21
  • 1
    $\begingroup$ Subject title is misleading. What is requested is a way to rationalize a denominator. I show some heuristics that may work in general situations but might be best to find all conjugate factors and multiply numerator and denominator by them (my methods in effect do just that, under the hood). $\endgroup$ Jan 2 at 16:15
  • $\begingroup$ True. But this is slight trickier as it's a 6th degree rationalization in effect as it's the LCM of the 2 nth roots. That's why I want to try generalizing it to see patterns. $\endgroup$
    – Steve237
    Jan 2 at 18:00

Here are a couple of heuristic approaches. One is to use the Wolfram Resource Function RadicalDenest.

ResourceFunction["RadicalDenest"][1/(2^(1/2) - 2^(1/3))]

(* Out[1443]= 1 + 1/2^(1/3) + 1/2^(1/6) + 2^(1/6) + 2^(1/3) + Sqrt[2] *)

More roundabout is to use a variant of one of the methods internal to RadicalDenest. The idea is to find the defining polynomial over the integers, factor it over an extension that uses the radicals expected in the result, solve for the factors set to zero, and select the one that corresponds to the input value.

val = 1/(2^(1/2) - 2^(1/3));
root = RootReduce[val];
poly = root[[1]][x];
fax = Factor[poly, Extension -> {Sqrt[2], 2^(1/3)}];
solns = x /. Solve[fax == 0, x];
SelectFirst[solns, N[#] == val &]

(* Out[1449]= 1/2 (2 + 2 2^(1/6) + 2 2^(1/3) +
2 Sqrt[2] + 2^(2/3) + 2^(5/6)) *)

I should state explicitly that neither is guaranteed to find such a rewrite even if one exists (hence my calling them "heuristic").

  • $\begingroup$ Very clever @Daniel Lichtblau! Thanks very much. This basically nailed it. What exactly are ResourceFunctions? Is it going out to Wolfram site to compile results and if so, how? I looked at the help but could not see a listing of all available Resources (first parameter) to use [ex: where did you get RadicalDenest], or even a listing of Props. Wondering how this works and why it's not local to the app. $\endgroup$
    – Steve237
    Jan 2 at 17:12
  • 1
    $\begingroup$ Link: resources.wolframcloud.com/FunctionRepository $\endgroup$ Jan 2 at 17:54
  • $\begingroup$ Why don't these exist locally? $\endgroup$
    – Steve237
    Jan 2 at 17:57
  • 2
    $\begingroup$ The WFR is intended to be a collection of Mathematica functions written by people both inside and external to Wolfram Research. They are available through the cloud and, when first invoked, downloaded and stored locally on your machine. The standards for these are a bit lower than for built-in Mathematica functions, though we do try to maintain a reasonable level of quality in terms of implementation and documentation. It is expected that, over time, some will migrate to built-in status. $\endgroup$ Jan 2 at 17:58
  • 1
    $\begingroup$ It only handles rational expressions. It will not, for example, return a result that is a symbolic Sum (as would be required in the case indicated above). $\endgroup$ Jan 2 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.