<s>[INST] maximum value of $\sum (a-b)^2$ 
If $a^2+b^2+c^2=5$ and $a,b,c \in \mathbb{R},$ find the maximum
value of $(a-b)^2+(b-c)^2+(c-a)^2$.

My Try: $(a-b)^2+(b-c)^2+(c-a)^2=2(a^2+b^2+c^2)-2(ab+bc+ac)$
$$=10-2(ab+bc+ac)$$
Now this implies $ab+bc+ac\le 5$. So
$$(a-b)^2+(b-c)^2+(c-a)^2 = 10-2(ab+bc+ac) \geq 20.$$
Could some help me to find max of $(a-b)^2+(b-c)^2+(c-a)^2$? Thanks.
 [/INST] Here's a more visual approach; for a point $(a,b,c)\in\Bbb{R}^3$ the condition that
$$a^2+b^2+c^2=5,$$
is equivalent to being on the sphere of radius $\sqrt{5}$ centered at the origin, and
$$(a-b)^2+(b-c)^2+(c-a)^2=||(a,b,c)-(b,c,a)||^2,$$
where the point $(b,c,a)\in\Bbb{R}^3$ is obtained from $(a,b,c)$ by a rotation of one third of a full turn around the line spanned by $(1,1,1)$. Then clearly the distance is maximal precisely when $(a,b,c)$ is on the equator w.r.t. the axis of rotation, and as the following picture shows;

by elementary geometry the distance between $(a,b,c)$ and $(b,c,a)$ is $\sqrt{3}$ times the radius, which is $\sqrt{5}$. Hence the desired maximum is $(\sqrt{3}\times\sqrt{5})^2=15$.
</s>