<s>[INST] Prove $0\le ab+bc+ca-abc\le2$ A question asks

Let $a,b,c$ be non-negative reals such that $$a^2+b^2+c^2+abc=4$$
Prove that$$0\le ab+bc+ca-abc\le2$$

The lower bound can be proven as follows:
If $a,b,c>1$, then $$a^2+b^2+c^2+abc>4$$
This implies that at least one of $a,b,c$ is less than or equal to $1$, and we can assume WLOG that $a\le1$. Then,
$$ab+bc+ca-abc=a(b+c)+bc(1-a)\ge0$$
For the upper bound, I had the idea of treating $a^2+b^2+c^2+abc=4$ as a quadratic in $a$ but don't see any way to proceed from there. Please only give me hints!
 [/INST] If one of $a,b,c$ is zero or two of them are equal, the inequality holds (almots) trivially.
Consider the function $ f(a,b,c) = ab+bc+ca-2abc $, with $a,b,c\ge 0, g(a,b,c) = 1$, where $g(a,b,c) = a^2 + b^2 + c^2 + abc$. The domain is a compact subset of $\mathbb{R}^3$ so $f$ must admit maximum. Assume the maximum is strictly larger than $2$, then it is taken in the interior of the domain, and $a,b,c$ are pairwisely distinct. Thus we can apply Lagrange's multiplier to get
\begin{equation}
\nabla f + \lambda \nabla g  = 0.
\end{equation}
Notice that $\partial_a g = 2a + bc > 0$, so we have
\begin{equation}
\frac{a+c -ac}{2b+ac} = \frac{b+c-bc}{2a+bc},
\end{equation}
or
\begin{equation}
(a-b)(2a+2b+2c-2ac-2bc+c^2) = 0
\end{equation}
and two similar equations. Since we assumed $a,b,c$ are pairwisely distinct, we yield
\begin{equation}
a^2 - 2ac- 2ab = b^2 - 2bc -2ba
\end{equation}
or $a+b-2c = 0$. Then we have $a = b = c$ for sure, a contradiction.
</s>