# How do I solve this system of equations (with squares and square roots)?

Consider the system of equations:

\begin{align*} x+y+z&=6\\ x^2+y^2+z^2&=18 \\\sqrt{x}+\sqrt{y}+\sqrt{z}&=4. \end{align*}

How do I solve this? I've tried squaring, adding equations side by side, substituting, etc., but without success, e.g.

$$x^2+y^2+z^2+2(xy+yz+xz)=36\implies xy+yz+xz=9,$$

Let $s = \sqrt{x}$, $t = \sqrt{y}$, $u = \sqrt{z}$. Then your system is
\eqalign{s^2 + t^2 + u^2 &= 6\cr s^4 + t^4 + u^4 &= 18\cr s + t + u &= 4\cr} Solving the third equation for $u$ and substituting in the others gives \eqalign{s^2+t^2+(4-s-t)^2-6 &= 0\cr s^4+t^4+(4-s-t)^4-18 &= 0\cr} The resultant of the left sides with respect to $t$ is $$4096 (s-2)^2 (s-1)^4$$ So the only solutions have $s = 1$ or $s = 2$ (and by symmetry, also $t=1$ or $t=2$ and $u=1$ or $u=2$). In fact the solutions all have two of the variables $=1$ and one $=2$. In terms of $x,y,z$, two are $1$ and one is $4$.
\begin{align*} \text{Let$\,$:}&&a &= \sqrt{x}\\[2pt] &&b &= \sqrt{y}\\[2pt] &&c &= \sqrt{z}\\[8pt] \text{Let$\,$:}&&f(t) &= (t - a)(t - b)(t - c)\\[2pt] &&&= t^3 - e_1t^2 + e_2t - e_3\\[8pt] \text{where$\,$:}&&e_1 &= a + b + c\\[2pt] &&e_2 &= ab + bc + ca\\[2pt] &&e_3 &= abc\\[8pt] \text{For $k \in \mathbb{Z}^{+}$, let$\,$:}&&s_k &= a^k + b^k + c^k\\[8pt] \text{By hypothesis, we have$\,$:}&&s_1 &= 4\\[2pt] &&s_2 &= 6\\[2pt] &&s_4 &= 18\\[8pt] \text{Then$\,$:}&&e_1 &= a + b + c\\[2pt] &&&= s1\\[2pt] &&&= 4\\[8pt] \text{and$\,$:}&&2e_2 &= 2(ab +bc + ca)\\[2pt] &&&= (a + b + c)^2 - (a^2 + b^2 +c^2)\\[2pt] &&&= e_1^2 - s_2\\[2pt] &&&= 4^2 - 6\\[2pt] &&&= 10\\[2pt] \implies&& e2 &= 5\\[8pt] &&\text{Ne}&\text{xt, since $a,b,c$ are roots of $f(t)$, we have}\\[8pt] &&a^3 &- e_1a^2 + e_2a - e_3 = 0\\[2pt] &&b^3 &- e_1b^2 + e_2b - e_3 = 0\\[2pt] &&c^3 &- e_1c^2 + e_2c - e_3 = 0\\[8pt] \text{which sums to$\,$:}&& s_3 &- e_1s_2 + e_2s_1 - 3e_3 = 0\\[8pt] \implies&&s_3 &= e_1s_2 - e_2s_1 + 3e_3\\[2pt] &&&=(4)(6) - (5)(4) + 3e_3\\[2pt] &&&=4 + 3e_3\\[8pt] &&\text{Bu}&\text{t, $a,b,c$ are also roots of $tf(t)$, hence}\\[8pt] &&a^4 &- e_1a^3 + e_2a^2 - e_3a = 0\\[2pt] &&b^4 &- e_1b^3 + e_2b^2 - e_3b = 0\\[2pt] &&c^4 &- e_1c^3 + e_2c^2 - e_3c = 0\\[8pt] \text{which sums to$\,$:}&& s_4 &- e_1s_3 + e_2s_2 - e_3s_1 = 0\\[8pt] \implies&&s_4 &= e_1s_3 - e_2s_2 + e_3s_1\\[2pt] \implies&&18 &= (4)(4 + 3e_3) - (5)(6) + (e_3)(4)\\[2pt] \implies&&e_3 &= 2\\[8pt] \text{Then$\,$:}&&f(t) &= t^3 - e_1t^2 + e_2t - e_3\\[2pt] &&&= t^3 - 4t^2 + 5t - 2\\[2pt] &&&= (t-1)^2(t-2)\\[8pt] &&\text{It}&\text{ follows that the triple}\\[8pt] &&(a,&b,c)\;\text{is an arbitrary permutation of}\;(1,1,2)\\[2pt] \text{Therefore$\,$:}&&(x,&y,z)\;\text{is an arbitrary permutation of}\;(1,1,4)\\[2pt] \end{align*}