Consider the following expression: $1/(\sqrt a_1 ± \sqrt a_2 ± ... \sqrt a_n)$ where $a_1 ... a_n$ are positive integers

I would like a general algorithm by which I can convert expressions of this form into expression of the following form: exp/k

where k is some positive integer and exp is an expression consisting of additions, subtractions, multiplications and square roots but no divisions.

Here is an example of a simple case:

$1/(\sqrt 2 + \sqrt 3) = (\sqrt 3 - \sqrt 2)/(3 - 2) = \sqrt 3 - \sqrt 2$

Here I multiplied the top and bottom by the conjugate. This technique can be used in the general problem for n≤4 by breaking the sum up into pairs of roots. I will illustrate this below in the case where all square root terms are added rather than having subtraction mixed in.

consider this denominator: $(\sqrt a + \sqrt b) + (\sqrt c + \sqrt d)$
multiplying by its conjugate: $(\sqrt a + \sqrt b) - (\sqrt c + \sqrt d)$ yields:
$(\sqrt a + \sqrt b)^2 - (\sqrt c + \sqrt d)^2$
$a+b+2\sqrt (ab) - c - d - 2\sqrt (cd) = $
$ A + (\sqrt B - \sqrt C)$ where $A= a+b-c-d$ and $B=4ab$ and $C=4cd$
multiplying by its conjugate $ A - (\sqrt B - \sqrt C)$ yields:
$ A^2 - (\sqrt B - \sqrt C)^2 =$
$ A^2 - B - C + 2\sqrt (BC) =$
$ D + \sqrt E =$ where $D=A^2-B-C$ and $E=4BC$
now multiply by its conjugate $ D - \sqrt E$ yields:
$ D^2 - E$ which is an integer

I would like to know how to generalize this to n=5 and beyond, or if this is not possible, why that is the case. Thanks


I am not sure how to do this for the case n=8. Consider the following expression: $(\sqrt a_1 + \sqrt a_2 + \sqrt a_3 + \sqrt a_4) + (\sqrt a_5 + \sqrt a_6 + \sqrt a_7 + \sqrt a_8)$
I could multiply by its conjugate which would yield the following

$(\sqrt a_1 + \sqrt a_2 + \sqrt a_3 + \sqrt a_4)^2 - (\sqrt a_5 + \sqrt a_6 + \sqrt a_7 + \sqrt a_8)^2$

However once each squared term is distributed out there will be 6 new square root terms introduced rather than just the original 4. Below I will do the first term:

$(\sqrt a_1 + \sqrt a_2 + \sqrt a_3 + \sqrt a_4)^2 =$
$a_1 + a_2 + a_3 + a_4 + 2\sqrt (a_1a_2) + 2\sqrt (a_1a_3) + 2\sqrt (a_1a_4) + 2\sqrt (a_2a_3) + 2\sqrt (a_2a_4) + 2\sqrt (a_3a_4)$

as a result, I go from 8 roots in the denominator to 12 and a single non root term

If instead I broke up the expression into a group of 5 square roots and a group of 3 square roots I would end up with 10 roots from the group of 5 and 3 from the group of 3 totalling 13.

in either case the number of roots does not go down, which is the trick I have been exploiting. It seems to me a new trick of sorts is required to find the general solution.


  • $\begingroup$ One small comment: you mustn't overdo it. For example, if $D=\sqrt{E}$ you stop there and don't multiply by $D-\sqrt{E}=0$. $\endgroup$ – ancientmathematician Nov 23 '18 at 7:52
  • $\begingroup$ Hints: If I wanted to go along this path I'd do two things. (i) I'd persuade myself that the process applies equally well to $(b_1 \sqrt a_1 ± b_2 \sqrt a_2 ± ... b_n \sqrt a_n)$ with integral $b_i$, some possibly $0$; and (ii) I'd show I could do it for $n=2,4,8,16, \dots $. Then with the right number of zero $b_i$ I'd be done for all $n$. $\endgroup$ – ancientmathematician Nov 23 '18 at 7:57
  • $\begingroup$ Thanks for pointing out the case where D=√E, didn't think of that. but ultimately if such a case arizes then one can just end the algorithm early. I agree it would be worth doing the more general case with b√a instead of just √a because it captures the changes in sign. As for showing it can be done for the cases n=2,4,8,16... I am not sure how to do it for the n=8 case so if you want to demonstrate that I'll accept that as an answer $\endgroup$ – mathew Nov 23 '18 at 8:29
  • $\begingroup$ You are right to point out the way in which it won't work. So to save it I think you have to deal with the fully general case. That is, the general case of $b_0$, $b_0+b_1 \sqrt{a_1}$, $b_0+b_1 \sqrt{a_1}+b_2 \sqrt{a_2} + b_{1,2}\sqrt{a_1 a_2}$, $\dots$ - in other words, allow for all the cross terms from the outset. $\endgroup$ – ancientmathematician Nov 23 '18 at 10:15

$$(\sqrt a+\sqrt b+\sqrt c)(s+t\sqrt a+u\sqrt b+v\sqrt c+w\sqrt{ab}+x\sqrt{ac}+y\sqrt{bc}+z\sqrt{abc})=1$$ The rational coefficients of the various square-roots give you eight equations in eight unknowns $s$ to $z$.
It looks like it works for any number of square-roots. A $2^N\times2^N$ matrix has to be inverted. I don't know how to tell if it's going to be singular.
The matrix is very sparse - mostly zeros - so this isn't the most efficient method. I think it shows there is an answer.


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.