<s>[INST] If $a,b,c,d > 0$ and $a+b+c+d=1$ , find the maximum value of $M=abc+abd+acd+bcd-abcd$ 
If $a,b,c,d > 0$ and $a+b+c+d=1$ , find the maximum value of $$M=abc+abd+acd+bcd-abcd$$ 

I don't have any idea how to simplify this equation. I have tried for $a,b,c>0$ and $a+b+c=1$ and I got $ab+ac+bc-abc=(1-a)(1-b)(1-c)<= 8/27$. 
Thanks.
 [/INST] The following solution is similar to my answers
in An inequality $16(ab + ac + ad + bc + bd + cd) \le 5(a + b + c + d) + 16(abc + abd + acd + bcd)$
and An inequality $2(ab+ac+ad+bc+bd+cd)\le (a+b+c+d) +2(abc+abd+acd+bcd)$
Let $x = a + b, \, y = c + d$.
We have $x + y = 1$.
We have
\begin{align*}
 M &= ab y + cd x - ab cd\\
 &= xy - (x - ab)(y - cd)\\
 &\le xy - (x - x^2/4)(y - y^2/4) \tag{1}\\
 &= -\frac{1}{16}x^2y^2 + \frac{1}{4}xy(x + y)\\
 &= -\frac{1}{16}x^2y^2 + \frac{1}{4}xy\\
 &= -\frac{1}{16}(2 - xy)^2 + \frac14 \\
 &\le -\frac{1}{16}(2 - 1/4)^2 + \frac14 \tag{2}\\
 &= \frac{15}{256}
\end{align*}
where we have used $ab \le (a + b)^2/4 = x^2/4 \le x$ and $cd \le (c + d)^2/4 = y^2/4 \le y$ in (1), and
$xy \le (x + y)^2/4 = 1/4$ in (2).
Also, when $a = b = c = d = 1/4$,
we have $a + b + c + d = 1$ and $M = 15/256$.
Thus, the maximum of $M$ is $15/256$.
</s>