<s>[INST] If $x^2 + y^2 + z^2 = 27$ and $xy + xz + yz = 11$, then what is $x + y + z$ (all values positive)? 
Given that $x$, $y$, and $z$ are positive numbers and given that:
$$x^2 + y^2 + z^2 = 27 \quad\text{and}\quad xy + xz + yz = 11$$
What is the value of $x + y + z$?


I'm aware that one way to solve this problem is to square $x + y + z$ since $$(x + y + z)^2 = x^2 + y^2 + z^2 + 2(xy + xz + yz)$$ However, I'm wondering how you would solve this without the aforementioned shortcut?
 [/INST] One of the suboptimal ways is to make a variable replacement. For example, $u=x+y+z$, $v=(x-y)\sqrt{3/2}$, $w=-(x+y-2z)/\sqrt{2}$. After the replacement:
$$
x^2+y^2+z^2=\frac{u^2+v^2+w^2}3=27,\qquad xy+yz+zx=\frac{2u^2-v^2-w^2}6=11.
$$
And we need to find the value of $u$.
Then we make replacement $s=u^2, t=v^2+w^2$:
$$
s+t = 3\cdot27,\qquad2s-t=6\cdot 11,
$$
and we need to find the value of $\sqrt{s}$. Equations above are linear. So we can find $s$, and then calculate $\sqrt{s}$.
</s>