let $x,y,z\ge 0$,and such $$xy+yz+xz=xyz+2$$ show that $$x^2+y^2+z^2+xyz(x+y+z-2)\ge 4$$
my try: let $x+y+z=p,xy+yz+xz=q, xyz=r$
then $$q=r+2$$ show that $$p^2-2q+r(p-2)\ge 4$$ then I can't,Thank you
let $x,y,z\ge 0$,and such $$xy+yz+xz=xyz+2$$ show that $$x^2+y^2+z^2+xyz(x+y+z-2)\ge 4$$
my try: let $x+y+z=p,xy+yz+xz=q, xyz=r$
then $$q=r+2$$ show that $$p^2-2q+r(p-2)\ge 4$$ then I can't,Thank you
@chenbai's solution does not seem to pass the turing test. A sensible solution would seem to go along the following lines: with the OP's notation, $x, y, z$ are roots of the polynomial $$S(x) = x^3 - p x^2 + q x - r = 0.$$ For all of these to be real, the derivative of $S(x)$ must have two real roots, so
$$p^2 - 3 q > 0$$
and $S(x)$ at the smaller root must be positive, while at the larger root it must be negative, which means that $$\frac{1}{27} \left(4 p^3 r-p^2 q^2-18 p q r+4 q^3+27 r^2\right)<0.$$ The desired inequality must be a logical consequence of the last two, though I don't see the computation right now.
WLOG, $z=$Min{$x,y,z$},$z=\dfrac{2-xy}{x+y-xy}, t^2=xy,p=x+y, \implies p^2 \ge 4t^2,p\ge2t$
$z\ge 0 \implies (2-t^2)(p-t^2)\ge 0 \implies p\ge 2, t^2 \le2 $.
(if $p<2, t^2\le \dfrac{1}{2} \implies z>1$, but $z\le \dfrac{x+y}{2} < 1, $ contradict.)
(if $t^2>p\ge2 ,z=\dfrac{t^2-2}{t^2-p}<\dfrac{p}{2} \iff t^2 >\dfrac{p^3-4}{p-2} \iff \dfrac{p^2}{4} > \dfrac{p^3-4}{p-2} \iff 3p^3+2p^2<16$, but $3p^3+2p^2\ge40$ ,contradict)
replace $x,y,z$ with $p,t$ we have the inequality:
$f(p)=p^4-2t^2p^3-4p^2+(t^6+4t^4+4t^2)p-3t^6-3t^4+4 \ge 0$
$f'(p)=4p^3-6t^2p^2-8p+t^6+4t^4+4t^2 , f''(p)=12p^2-12tp-8 ,\dfrac{12t}{2*12}=\dfrac{t}{2}<1<2 \implies 2t\ge 2 ,f''_{min}=f(2t)=24t^2-8>0 \\ 2t<2,f''_{min}=f(2)=40-24t>0$
so $f'(p)$ is mono increasing function $\implies$
$2t>2,f'_{min}=f(2t)=t(t^5-20t^3+32t^2+4t-16)=t(13(2-t^2)(t-1)+(t-1)^2(t^3+2t^2-4x+9)+1)\ge t > 0 \\ 2t<2,f'_{min}=f(2)=t^6+4t^4-20t^2+16=t^6+4t^2(1-t)(4-t)>0$
so $f(p)$ is mono increasing function $\implies$ $2t \ge 2, f_{min}=f(2t)=(t-1)^2(t^2-2)^2(2t+1) \ge 0,t=1 $ or $t^2=2$ get min zero.
$2t<2,f_{min}=f(2)=-t^6+5t^4-8t^2+4=(1-t^2)(t^2-2)^2 \ge 0$
so $f(p) \ge 0$, the "=" will hold when $p=2t, t=1 $ or $t=\sqrt{2} \implies x=y=1=z$ or $x=y=\sqrt{2},z=0$
Let $x+y+z=3u$, $xy+xz+yz=3v^2$ and $xyz=w^3$.
Hence, the condition does not depend on $u$ and we need to prove that $f(u)\geq0$,
where $f(u)=9u^2-6v^2+w^3(3u-2)-4$.
But $f$ is an increasing function, which says that it's enough to prove our inequality
for a minimal value of $u$, which happens for equality case of two variables.
Let $y=x$. Then $z=\frac{2-x^2}{x(2-x)}$ and we need to prove that $$(x-1)^2(x^2-2)^2(2x+1)\geq0,$$ which is obvious.
Done!
In addition to the inequalities given by @Igor Rivin, here are some more. (All of these can be found with QM-AM-GM and Cauchy-Schwarz.) \begin{align} q&=r+2\\ p^2&\geq3q\\ pq&\geq 9r\\ \frac p3&\geq\sqrt[3]r\implies p^3\geq27 r=27(q-2) \end{align}