Inequality $xy+yz+zx-xyz \leq \frac{9}{4}.$ Currently I try to tackle some olympiad questions:

Let $x, y, z \geq 0$ with $x+y+z=3$. Show that
$$
x y+y z+z x-x y z \leq \frac{9}{4}.
$$
and also find out when the equality holds.


I started by plugging in $z=3-x-y$ on the LHS and got
$$
3y-y^2+3x-x^2-4xy+x^2y+xy^2 = 3y-(y^2+x^2)+3x-4xy+x^2y+xy^2\leq 3y-((y+x)^2)+3x-4xy+x^2y+xy^2
$$
But this got me nowhere.
Then I started again with the left hand side
$$
x y+y z+z x-x y z \Leftrightarrow yz(1-x)+xy+zx
$$
and $x+y+z=3 \Leftrightarrow y+z-2=1-x$ so
$$
yz(y+z-2)+x(y+z)
$$
But this also leaves no idea. Do I have to use a known inequality?
 A: This is equivalent to $$(1-x)(1-y)(1-z)\leq \frac14.\tag 1$$
This is true if any $x,y,z$ is exactly one, since the the left side of $(1)$ is zero.
It is not possible for all $x,y,z$ to be greater than $1,$ nor for all $x,y,z$ to be less than $1,$ since $x+y+z=3.$
If only one of the values is $>1,$ then the left side of $(1)$ is negative, so it is true, again.
So we are left with $x=1+a,y=1+b,z=1-(a+b)$ where $a,b>0$ and $a+b\leq 1.$
Then the left side of $(1)$ is $ab(a+b).$ If $a+b<1,$ we can always increase this value by using $a'=\frac{a}{a+b},b'=\frac{b}{a+b}.$ So the maximum value is when $a+b=1.$
That means, substituting $b=1-a,$ we want to maximize $a(1-a)$ for $0<a<1.$ That is easy to do with calculus, with a maximum at $a=\frac12$ for a value of $\frac14.$
So the maximum of your expression occurs when $(x,y,z)=\left(\frac32,\frac 32,0\right).$
A: Assume without loss of generality that $x \le 1$. Then,
$$xy+yz+zx-xyz = x(y+z) + yz(1-x) \le x(y+z) + \left(\frac{y+z}{2}\right)^2(1-x).$$
This is equal to
$$(3-x)\left( x + \frac{(1-x)(3-x)}{2} \right). $$
It is not too difficult to check that this is maximal when $x = 0$ (and $y=z=3/2)$, where it attains a value of $9/4$.
A: In this answer I use Lagrange multipliers to find the critical points of the function within the region $x,y,z\geq0$, show that the only critical point is a minimum at $x=y=z=1$, and then argue it must achieve a maximum on the boundary and find that maximum.
Let $f=xy+yz+zx-xyz$ then $$\nabla f=(1-(y-1)(z-1),1-(z-1)(x-1),1-(x-1)(y-1))$$
Let $g=x+y+z-3$ then $\nabla g=(1,1,1)$ and set
$\nabla f-\lambda \nabla g=0$ then we have
$$
\begin{align}
(y-1)(z-1)&=1-\lambda\\
(x-1)(z-1)&=1-\lambda\\
(x-1)(y-1)&=1-\lambda\\
\end{align}
$$
Equating these easily gives us $x=y=z=1$.
By setting, say $x=\frac13, y=z=\frac43$, we get $f=56/27$, and we can see this is a minimum, and since there is no other critical point, the maximum value attained by $f$ must lie on the boundary.
Without loss of generality, set $x=0$ then $f=yz=(3-z)z$, which by symmetry attains a maximum at $z=3/2$. Set $x=y=0$ and $f\equiv 0$, so the maximum of $9/4$ is at $x=0, y=z=3/2$.
A: For $x=y=z=1$ we obtain on the L.H.S. the value two. Which is far away from the R.H.S. $9/4$. What about showing a stronger inequality under the given constraints?
(Of course, we are slightly changing the "weakest" term...)
$$
\boxed{\qquad
xy + yz + zx - \color{blue}{\frac 34} xyz \ \le\ \frac 94
\qquad}
$$
It is a good idea to switch to the homogenized version, we will ultimately find an inequality involving an algebraic expression of degree three for three variables, there are not too many of this kind...
$$
\tag{$1$}
\frac 13(x+y+z)(xy+xz+zx) - \frac 34xyz\le\frac 94\cdot\frac 1{27}(x+y+z)^3\ .
$$
After moving everything on the R.H.S., expanding, simplifying and getting rid of the denominator $12$, we obtain:
$$
\tag{$2$}
0\le x^3+y^3+z^3 - x^2y-xy^2-y^2 z-yz^2-z^2x-zx^2+ 3xyz\ ,
$$
and for sure, this is Schur.
$\square$

Note that expanding
$(1)$ is not a complicated dirty step, that would eliminate this solution from an olympiad priced solution, this step is easily done. We move all terms on the R.H.S. of $(1)$, multiply by $12$ to get
$$
\begin{aligned}
&(x+y+z)^3 -4(x+y+z)(xy+yz+zx) +9xyz
\\[3mm]
&\qquad =
\sum\left(\binom 3{3 \,0\,0}x^3 + \binom 3{2 \,1\,0}\color{brown}{x^2y} + \binom 3{1 \,1\,1}xyz \right)
- 4\left(\sum_{\text{cyclic}}x(\color{brown}{xy}+yz+\color{brown}{zx})\right)
+ 9xyz
\\[2mm]
&\qquad=
\sum_{\text{cyclic}} x^3 
+ \sum_{\text{cyclic}}(3-4)\color{brown}{(x^2y + x^2z)} 
+ (6 - 12 + 9)xyz
\end{aligned}
$$
which is the expression in the R.H.S. of $(2)$.
A: COMMENT.- In atention to said by @Erik Satie (artistic nickname) we give here another different proof.
We consider $z=a$ fixed. Then the segment with positive $x$ and $y$ of the line $x+y=3-a$ must be “under” the curve in the first quadrant of equation $f(x)=y=\dfrac{2.25-ax}{(1-a)x+a}$ which is equivalent to the proposed inequality for all $x,y$ being $z=a$. Since $f(x)$ is convex in the first quadrant (because $f''(x) \gt0$) and symmetric with respect to the diagonal $y=x$, considering the two fixed points $(x_1,x_1)$ and $(x_2,y_2)$ of the line and the curve respectively, it is enough to verify that $x_1\le x_2$ which reduces the inequality to one of a single variable $a$ easy to verify. You have then to verify the inequality
$$\dfrac{3-a}{2}\le\dfrac{-a+\sqrt{a^2+2.25(1-a)}}{1-a}$$ in which you do have to consider the cases $0\le a\lt1,\space a=1, \space 1\lt a\le3$. Note that for $a=1$ the curve $f(x)$ is a line and the difference $x_1\le x_2$  is evident.
A: Partial answer with hint :
Many answer are given so it's hard to find a new one so accept my apologize for this partial achivement .
Taking account of the comment due to Thomas Andrew we need to show for $a+c+b=3$,$a,b,c>0$ and $a,b,c\in[0,2]$,$a,b,c\neq 1$:
$$\left|\left(1-a\right)\right|\left|\left(1-b\right)\right|\left|\left(1-c\right)\right|-\frac{1}{4}< 0\tag{I}$$
Using the theorem :
Let $a_1,a_2,a_3,b_1,b_2,b_3>0$ such that :
$$a_1+a_2+a_3\geq b_1+b_2+b_3$$
And $$|a_i-a_j|\leq |b_i-b_j|,1\leq i\leq 3,1\leq j\leq 3,i\neq j$$
Then :
$$a_1a_2a_3\geq b_1b_2b_3$$
Here $a_1=a_2=a_3=\frac{1}{4^{\frac{1}{3}}}$ and $b_1=|1-a|,b_2=|1-c|,b_3=|1-b|$
Supposing we have $(I)$ the inequality is thus proved .
We can sligthly change  $a_1,a_2,a_3$ to get the equality case ($a_1=1,a_2=1/2=a_3$).
