Let $x^2+y^2+z^2\leq27$ and $P = x+y+z+xy+yz+zx$. Find the value of $x, y, z$ such that $P$ is the maximum value and minimum value.
My attempt :
$$(x-y)^2 + (y-z)^2 + (z-x)^2 \geq 0$$
$$27 \geq x^2+y^2+z^2 \geq xy+yz+zx\tag{1}$$
$$(x+y+z)^2 \leq 3(x^2+y^2+z^2) \le 3 \cdot 27$$
$$(x+y+z)^2 \leq 81$$
$$x+y+z \leq 9\tag{2}$$
From $(1), (2)$, $ x+y+z+xy+yz+zx \leq 36$, so $P_{\text{max}} = 36$ with equality hold at $x=y=z=3$.
Please suggest how to find $P_{\text{min}}$.
You may use the same method to find the minimum. First, we obtain a lower bound for $P$: $$ \begin{align} P&=x+y+z+xy+yz+zx\\ &=\frac12 [ (x+y+z+1)^2 - (x^2+y^2+z^2) - 1 ]\\ &\ge\frac12 (0 - 27 - 1)\tag{1}\\ &= -14. \end{align} $$ Next, note that at $\left(\frac{\sqrt{53}-1}2,-\frac{\sqrt{53}+1}2,0\right)$, we have $x+y+z+1=0$ and $x^2+y^2+z^2=27$. Hence tie can occur in $(1)$ and the lower bound $-14$ is attainable.