I choose $n$ numbers $t_i, {i=\{1,\dots,n\}}$ on a real interval $[T_0,T_1]$ with $T_0,T_1>0$. (Then I sort the $t_i$ such that $t_1\leq t_2,\leq\dots\leq t_n$.)
I would like to show that the function
$f(t_1,t_2,\dots,t_n):=\sum_{i=1}^n\sum_{j=1}^n(t_j-t_i)^2$
is maximal when I choose half of the $t_i$ to be equal to $T_0$ and the other half equal to $T_1$.
My standard tool from multi-variable calculus do not seem to help much, because the maximum of $f$ depends on the boundaries of the interval and is not a relative maximum of $f$ that I can find by setting $\nabla f=0$. I thought of using calculus of variation to maximize the functional $f[t]$ where $t:\mathbb N \rightarrow [T_0,T_1], t(i)=t_i$, but $f[t]$ is a very horrible convolution that does not seem to get me anywhere. Another possibility might be some form of induction: It is very easy to show that equidistant spacing of $t_i$ maximizes $f$ for $n=2$ and $n=3$. I just don't know how to make the induction step to $n+1$.
You are trying to maximize a convex function over a hypercube. The answer must be an extreme point of the hypercube. The only extreme points are the corner points, meaning that some of the varaibles $t_i$ will be $T_0$, and the others will be $T_1$. This holds even if the convex function is not symmetric. In general, there are $2^n$ corner points, so the problem at first seems daunting.
But this problem has symmetry: There is no distinction between variable $t_1$ and $t_2$, so without loss of generality we can assume there is an index threshold $M \in \{0, 1, ..., n\}$ such that $t_i=T_0$ if $i \leq M$ and $t_i=T_1$ if $i > M$. It remains only to choose the integer value $M \in \{0, ..., n\}$.
But we can explicitly compute the objective function for each value of $M$: $$ f = \sum_{i=1}^M\sum_{j=M+1}^n(T_1-T_0)^2 + \sum_{i=M+1}^n\sum_{j=1}^M(T_1-T_0)^2 = 2M(n-M)(T_1-T_0)^2$$ which uses the fact that $(t_i-t_j)=0$ if $i, j \leq M$, or if $i,j>M$.
So we can simply choose $M \in \{0, ..., n\}$ to maximize $M(n-M)$. If $n$ is even the answer is: $$ M=n/2 $$ If $n$ is odd the answer is $M=(n+1)/2$.