<s>[INST] Find the minimum of $P = (a - b)(b - c)(c - a)$ 
Given $a, b, c$ are real numbers such that $a^2 + b^2 + c^2 = ab + bc + ca + 6$. Find the minimum of
$$P = (a - b)(b - c)(c - a)$$

My solution:

*

*We have:

$$a^2 + b^2 + c^2 = ab + bc + ca + 6$$
$$\implies 2a^2 + 2b^2 + 2c^2 = 2ab + 2bc + 2ca + 12$$
$$\implies (a - b)^2 + (b - c)^2 + (c - a)^2 = 12$$

*

*Using AM-GM Inequality, we have:

$$(a - b)^2 + (b - c)^2 + (c - a)^2 \geq 3 \sqrt[3]{((a - b)(b - c)(c - a))^2}$$
$$\implies 3 \sqrt[3]{P^2} \leq 12$$
$$\implies -8 \leq P \leq 8$$

*

*Therefore, $\min P = -8$

Is this solution correct? If not, then why?

 [/INST] Using $x=a-b,y=b-c$, then $-(x+y)=c-a$, so $P=-xy(x+y)=-(x^2y+xy^2)$.
The condition $(a−b)^2+(b−c)^2+(c−a)^2=12$ becomes $g=x^2+y^2+xy=6$.
Now using Lagrange multipliers:
\begin{align}
\nabla P&=-\langle2xy+y^2,x^2+2xy\rangle\\
&=-\langle y(2x+y),x(x+2y)\rangle\\
\\
\nabla g&=\langle2x+y,x+2y\rangle
\end{align}
Now letting
$$\nabla P=\lambda\cdot\nabla g$$
$$\lambda=-y,\,\lambda=-x$$
So $x=y$, plugging this back in $g$:
$$3x^2=6$$
$$x=\pm\sqrt2$$
Then the extreme values of $P$ are:
$$P=-2\cdot\pm2\sqrt2=\pm4\sqrt2$$
</s>