<s>[INST] Finding Maximum Under Constraint Suppose $a$,$b$,$c$ satisfy $a+b+c=1$ and $a$,$b$,$c\in [0,1]$
Find the maximum value of $(a-b)(b-c)(c-a)$
 [/INST] Another way is not to use calculus. WLOG, let $a=$MAX{$a,b,c$},then if we want max, it must >0, $→ a>c>b$, rewrite it to $\left(a-b\right)\left(c-b\right)\left(a-c\right)$, since $b\ge0$, so $0<a-b\le a,0<c-b\le c → \left(a-b\right)\left(c-b\right)\left(a-c\right)\le ac\left(a-c\right)$, then $b=0$ hold max,since $b=0$ will make $a,c$ much bigger also which make ac(a-c) bigger also, so we can sure $b=0$ is the condition ,ie, $a+c=1$ ,let $a=\cos ^2 x,c=\sin ^2 x$, we have:
$ac\left(a-c\right)=\left(\cos x *\sin x\right)^2\left(\cos ^2x-\sin ^2x\right)=\dfrac{\sin ^2\left( 2x\right)* \cos 2x}{4}=\dfrac{\left(1-\cos \left(4x\right)\right)\cos \left(2x\right)}{8}=\dfrac{\sqrt{\dfrac{\left(1+\cos 4x\right)\left(1-\cos 4x\right)^2}{2}}}{8}=\dfrac{\sqrt{\left(2+2\cos 4x\right)\left(1-\cos 4x\right)\left(1-\cos 4x\right)}}{16}\le \dfrac{\sqrt{\left(\dfrac{4}{3}\right)^3}}{16}=\dfrac{\sqrt{3}}{18}$ (AM-GM), the max will be hold when $1-\cos 4x=2+2coos4x$, ie.
$\cos 4x=-\dfrac{1}{3}→ \cos 2x=\sqrt{\dfrac{1-1/3}{2}}=\dfrac{\sqrt{3}}{3} → \cos ^2x=\dfrac{1+\dfrac{\sqrt{3}}{3}}{2}=\dfrac{3+\sqrt{3}}{6}=a, c=\dfrac{3-\sqrt{3}}{6}$
</s>