Proof for inequality with $a,b,c,d$ with $d =\max(a,b,c,d)$ 
Let $a,b,c,d$ positive real numbers with $d= \max(a,b,c,d)$. Proof
  that 
$$a(d-c)+b(d-a)+c(d-b)\leq d^2$$



*

*I believe that the GM-AM inequality with $n=4$ variables  might be helpful. 


$$\sqrt[n]{x_1 x_2 \dots x_n} \le \frac{x_1+ \dots + x_n}{n}$$
We also know that the Geometric mean is bounded as follows :
$$ \min \{x_1, x_2, \dots x_n\} \le \frac{x_1+ \dots + x_n}{n}
\le \max \{x_1, x_2, \dots x_n\}$$
** I also tried to draw an square and some rectangles, but nothing worked out.
 A: Consider the polynomial $$f(x)=x^3-(a+b+c)x^2+(ab+bc+ac)x-abc$$
having $a,b,c$ as roots. We have 
$$f(d)=d^3-(a+b+c)d^2+(ab+bc+ac)d-abc=d\cdot(RHS-LHS)-abc $$
and $f(d)=(d-a)(d-b)(d-c)\ge0$.
Or in short
$$ a(d-c)+b(d-a)+c(d-b)=(a+b+c)d-(ac+ab+bc)\\=\frac{d^3-(d-a)(d-b)(d-c)-abc}{d}\le d^2$$ 
A: Divide both sides by $d^2$ to get an equivalent inequality:
$\dfrac{a}{d}\cdot \left(1 - \dfrac{c}{d}\right) + \dfrac{b}{d}\cdot \left(1 - \dfrac{a}{d}\right) + \dfrac{c}{d}\cdot \left(1 - \dfrac{b}{d}\right) \leq 1$.
Now let $x = \dfrac{a}{d}$, $y = \dfrac{b}{d}$, and $z = \dfrac{c}{d}$, then : $0 \leq x, y, z \leq1$, and we are to prove:
$x(1 - z) + y(1 - x) + z(1 - y) \leq 1$.
Consider $f(x,y,z) = x(1 - z) + y(1 - x) + z(1 - y) - 1 = x + y + z - xy - yz - zx - 1$. We find the critical points of $f$. So take partial derivatives: 
$f_x = 1 - y - z = 0 \iff y + z = 1$
$f_y = 1 - x - z = 0 \iff x + z = 1$
$f_z = 1 - x - y = 0 \iff x + y = 1$.
Thus $\nabla{f} = 0 \iff x + y = y + z = z + x = 1 \iff x = y = z = \dfrac{1}{2}$. Thus the maximum of $f$ occurs at either the critical values or the boundary points which are: $(x,y,z) = (0,0,0), (0,1,1), ..., (1,1,1)$. Of these values, the max is $0$. So $f(x,y,z) \leq 0$ which is what we are to prove.
A: The inequality, after multiplying it out and moving all to one side, is
$$d^2-ad-bd-cd+ab+ac+bc\ge 0.\tag{1}$$
Since $d=\max(a,b,c,d)$ each of $d-a,\ d-b,\ d-c$ is nonnegative and so
$$(d-a)(d-b)(d-c)\ge 0,
\\ d^3-ad^2-bd^2-cd^2+abd+acd+bcd\ge abc,$$
where at the last step we moved the $-abc$ term over to the right side.
Now since $a,b,c,d$ are positive one can divide both sides of this last inequality by $d$ and obtain $(1)$ as desired, in fact there is the lower bound $abc/d$ for the left side of $(1).$ Note one really only needs $d>0$ (to justify division by $d$) and $a,b,c\ge 0$ for the conclusion to hold. 
