Prove that $0 \leq ab + ac + bc - abc \leq 2.$ 
Let $a,b,$ and $c$ be nonnegative real numbers such that $a^2+b^2+c^2+abc = 4$. Prove that $$0 \leq ab + ac + bc - abc \leq 2.$$

I tried using rearrangement to get $a^2+b^2+c^2+abc = 4 \geq ab+bc+ac+abc$. Then I just need to show that $0\leq ab + ac + bc - abc$ and $4-2abc \leq 2$. I am not sure if this method will work, though. 

I have a diferent solution for this question using a trigonometric substitution.Let:
$\\ \\ \displaystyle u=a\sqrt{\frac{2a+bc}{(2b+ac)(2c+ab)}};v=b\sqrt{\frac{2b+ac}{(2a+bc)(2c+ab)}};w=c\sqrt{\frac{2c+ab}{(2a+bc)(2b+ac)}} \\ \\$
This implies that:
$\\ \displaystyle a=2\sqrt{\left(\frac{1}{1-uv}-1\right)\left(\frac{1}{1-uw}-1\right)}$ 
$\\ \displaystyle b=2\sqrt{\left(\frac{1}{1-uv}-1\right)\left(\frac{1}{1-vw}-1\right)};$ 
$\\ \displaystyle c=2\sqrt{\left(\frac{1}{1-uw}-1\right)\left(\frac{1}{1-vw}-1\right)};\\ $
Observe that:
$\\ \displaystyle a^{2}+b^{2}+c^{2}+abc=4\Rightarrow \left(\frac{1}{1-vw}-1\right)\left(\frac{1}{1-uw}-1\right)+ \left(\frac{1}{1-vw}-1\right)\left(\frac{1}{1-uv}-1\right)+\left(\frac{1}{1-uw}-1\right)\left(\frac{1}{1-uv}-1\right)+
2\left(\frac{1}{1-uv}-1\right)\left(\frac{1}{1-uw}-1\right)\left(\frac{1}{1-vw}-1\right)=1\Rightarrow  uv+vw+uw=1 $
Using that $\displaystyle uv+uw+vw=1$, our inequality is equivalent to:

.
  $\\ \\ \displaystyle \frac{2uv\sqrt{(u+w)(v+w)}}{(u+w)(v+w)(v+u)}+ \frac{2uw\sqrt{(v+w)(u+v)}}{(u+w)(v+w)(v+u)}+\frac{2vw\sqrt{(u+v)(u+w)}}{(u+v)(v+w)(u+w)}  -
\frac{4uvw}{(u+v)(v+w)(u+w)}\leq1\\ \\$

Let $\displaystyle a'=v+w,b'=u+w, c'=u+v$, observe that $\displaystyle a',b',c'$ will be sides of an arbitrary triangle.Let $\displaystyle  S=\frac{a'+b'+c'}{2}$, we get $ \displaystyle u=S-a',v=S-b', w=S-c' $, and our inequality is equivalent to:

.
  \begin{equation}
    \frac{2(S-a')(S-b')\sqrt{a'b'}}{a'b'c'}+\frac{2(S-a')(S-c')\sqrt{a'c'}}{a'b'c'}+\frac{2(S-b')(S-c')\sqrt{b'c'}}{a'b'c'}  -\frac{4(S-a')(S-b')(S-c')}{a'b'c'}\leq 1 \tag{1}
\end{equation}

We have to prove the inequality (1).Let's prove it, for that, consider that the square of every real number is positive, so we will have:
$ \\ \\ \displaystyle 0 \leq(\sqrt{a'}-\sqrt{b'})^2  \Rightarrow  2\sqrt{a'b'} \leq a'+b' \Rightarrow \frac{2(S-a')(S-b')\sqrt{a'b'}}{a'b'c'} \leq \frac{(a'+b')(S-a')(S-b')}{a'b'c'} \\ \\ $
$\displaystyle 0 \leq(\sqrt{a'}-\sqrt{c'})^2  \Rightarrow  2\sqrt{a'c'} \leq a'+c' \Rightarrow \frac{2(S-a')(S-c')\sqrt{a'c'}}{a'b'c'} \leq \frac{(a'+c')(S-a')(S-c')}{a'b'c'} \\ \\ $
$\displaystyle 0 \leq(\sqrt{b'}-\sqrt{c'})^2  \Rightarrow  2\sqrt{b'c'} \leq b'+c' \Rightarrow \frac{2(S-b')(S-c')\sqrt{b'c'}}{a'b'c'} \leq \frac{(b'+c')(S-b')(S-c')}{a'b'c'} \\ \\ $
Adding all the inequalities above and subtracting $\displaystyle \frac{4(S-a')(S-b')(S-c')}{a'b'c'} $ we get:
\begin{equation*}
    \frac{2(S-a')(S-b')\sqrt{a'b'}}{a'b'c'}+\frac{2(S-a')(S-c')\sqrt{a'c'}}{a'b'c'}+\frac{2(S-b')(S-c')\sqrt{b'c'}}{a'b'c'}-\frac{4(S-a')(S-b')(S-c')}{a'b'c'} \leq 
\end{equation*}
\begin{equation}
     \frac{(a'+b')(S-a')(S-b')}{a'b'c'}+\frac{(a'+c')(S-a')(S-c')}{a'b'c'}+\frac{(b'+c')(S-b')(S-c')}{a'b'c'} -\frac{4(S-a')(S-b')(S-c')}{a'b'c'} \tag{2}
\end{equation}
Observe that:
$\\ \\ \displaystyle a'+b'=2\left(S-c'+\frac{c'}{2}\right); \displaystyle a'+c'=2\left(S-b'+\frac{b'}{2}\right);\displaystyle b'+c'=2\left(S-a'+\frac{a'}{2}\right)\\ \\$
Take the RHS of (2):
$\\ \\ \displaystyle \frac{(a'+b')(S-a')(S-b')}{a'b'c'}+\frac{(a'+c')(S-a')(S-c')}{a'b'c'}+\frac{(b'+c')(S-b')(S-c')}{a'b'c'} -\frac{4(S-a')(S-b')(S-c')}{a'b'c'}=$
$\\ \\ \displaystyle \frac{2\left(S-c'+\frac{c'}{2}\right)(S-a')(S-b')}{a'b'c'}+\frac{2\left(S-b'+\frac{b'}{2}\right)(S-a')(S-c')}{a'b'c'}+\frac{2\left(S-a'+\frac{a'}{2}\right)(S-b')(S-c')}{a'b'c'} -\frac{4(S-a')(S-b')(S-c')}{a'b'c'}=$
$\\ \\ \displaystyle \frac{(S-a')(S-b')}{a'b'}+\frac{(S-a')(S-c')}{a'c'}+\frac{(S-b')(S-c')}{b'c'} +\frac{2(S-a')(S-b')(S-c')}{a'b'c'} =\sin^{2}\frac{\alpha}{2}+ \sin^{2}\frac{\beta}{2}+ \sin^{2}\frac{\gamma}{2}+2\sin\frac{\alpha}{2} \sin\frac{\beta}{2} \sin\frac{\gamma}{2}=1$
By the law of cosines.Replacing this result in RHS of (2).Thus (1)
 yields.
