# Converting an equation based on square roots

So I was wondering how to convert an equation of the form $$\sqrt{x_1}+\sqrt{x_2}+\sqrt{x_3}+...\sqrt{x_n}+k=0$$ into a polynomial equation based on each $$x_i$$.

For example if the equation was $$\sqrt{x_1}+\sqrt{x_2}+k=0$$, then subtracting $$\sqrt{x_2}$$ from each side and squaring yields:$$x_1+k^2+2k\sqrt{x_1}=x_2.$$ This can then be rearranged to: $$2k\sqrt{x_1}=-x_1-k^2+x_2.$$ Squaring both sides yields: $$4k^2x_1=x_1^2+k^4+x_2^2+2k^2x_1-2x_1x_2-2k^2x_2.$$ Rearranging/simplifying yields: $$x_1^2+x_2^2+k^4-2k^2x_1-2x_1x_2-2k^2x_2 = 0.$$

How can I find an equation of this form given that $$n$$ is greater than $$4$$? I am most interested in when $$n = 6$$.

• Expand a product with $(k\pm\sqrt{x_1}\pm\sqrt{x_2})$ factors with all possible sign combinations. – Somos May 6 '19 at 23:52
• Ok that's what I thought @RossMillikan. Thanks for confirming. – automaticallyGenerated May 7 '19 at 0:12
• @Ross, but if you keep on squaring, you eventually keep getting the same set of square roots, and when you have enough equations, you can eliminate them all. – Gerry Myerson May 7 '19 at 0:19
• @GerryMyerson can u show an example of this? I didn't realize I could cancel parts out when I was working it out by hand. – automaticallyGenerated May 7 '19 at 0:28
• – Piquito May 7 '19 at 1:05

## 3 Answers

COMMENT (A replay to the last comment of the O.P.).-Your problem is actually finding the minimum polynomial of $$-k$$ or $$k$$ (which, in principle, is an irrational of degree $$2 ^ n$$) and then the link I gave you offers you the solution you want.

But you post it in a way that could lead to think that it is not. I explain why the minimum polynomial of $$-k$$ solves the problem. The easiest example is for two radicals and it is enough to understand what I want to say.

You can easily find out the minimal polynomial of $$x=\sqrt a+\sqrt b$$ which is $$x^4-2(a+b)x^2+(b-a)^2=0$$ and certainly $$-k=\sqrt a+\sqrt b$$ is a root of it.

Well, in this polynomial you can note that the coefficients are rational functions of $$a$$ and $$b$$ then you can pose your problem the way you do in your post by replacing $$a$$ for $$x_1$$, $$b$$ for $$x_2$$ and $$x$$ for $$-k$$ or $$k$$. This gives the result $$k ^ 4-2 (x_1 + x_2) k ^ 2 + (x_2-x_1) ^ 2 = 0$$ what obviously answers your problem for the case $$n = 2$$

• I see my silly misunderstanding - I didn't realize that I could plug in $k$ for $x$. Thanks for the help – automaticallyGenerated May 7 '19 at 19:46
• You are welcome. – Piquito May 7 '19 at 19:56

Well, you may have to do a lot of squaring, and it may not be practical to do it by hand, but here's the theory: let's start with $$\sqrt u+\sqrt v+\sqrt w+\sqrt x+\sqrt y+\sqrt z=k$$. Square both sides, transfer all the terms without square roots to the right, divide by two, and you get $$\sqrt{uv}+\cdots+\sqrt{yz}=k^2+f(u,\dots,z)$$ for some polynomial $$f$$. Square again and move non-roots to the right. On the left, you get a sum with terms of the type $$\sqrt{uv}$$ and $$\sqrt{uvwx}$$, on the right some new polynomial $$g(u,\dots,z)$$. Do it again, on the left you'll have terms of the type $$\sqrt{uv}$$, $$\sqrt{uvwx}$$, and $$\sqrt{uvwxyz}$$, on the right some polynomial $$h(u,\dots,z)$$.

Keep on doing this. You'll only ever get terms of those three types on the left, and polynomials on the right. Now there are only $$15$$ different terms of type $$\sqrt{uv}$$, another $$15$$ of type $$\sqrt{uvwx}$$, and just one of type $$\sqrt{uvwxyz}$$, making $$31$$ different terms in all. So after you've done the procedure $$32$$ times, you'll have $$32$$ linear equations in these $$31$$ terms, and you can use linear algebra to boil them down to a single equation with no square roots in it, and you win.

I hope you won't expect me to actually carry out this procedure here....

Just for fun, the polynomial drawn from $$\sqrt a+\sqrt b+\sqrt c+k=0$$, using the method by Somos:

$$a^4+6a^2b^2+6a^2c^2+6a^2k^4-4ab^3+4ab^2k^2+4abc^2-40abck^2+4abk^4-4ac^3+4ac^2k^2+4acb^2+4ack^4-4ak^6+b^4+6b^2c^2+6b^2k^4-4ba^3+4ba^2k^2-4bc^3+4bc^2k^2+4bca^2+4bck^4-4bk^6+c^4+6c^2k^4-4ca^3+4ca^2k^2-4cb^3+4cb^2k^2-4ck^6+k^8-4k^2a^3-4k^2b^3-4k^2c^3=0.$$

Then next challenge is to determine the number of terms as a function of the number of variables.