<s>[INST] Prove:$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$ 
Prove:$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$

example1: $|x-1|+|x-2|\geq 1$
my solution：(substitution)
$x-1=t,x-2=t-1,|t|+|t-1|\geq 1,|t-1|\geq 1-|t|,$
square,
$t^2-2t+1\geq 1-2|t|+t^2,\text{Since} -t\leq -|t|,$
so proved.
question1 : Is my proof right? Alternatives?
one reference answer: 
$1-|x-1|\leq |1-(x-1)|=|1-x+1|=|x-2|$
question2 : prove:
$|x-1|+|x-2|+|x-3|\geq 2$
So I guess:( I think there is a name about this, what's that? wiki item?)
$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$
How to prove this? This is  question3. I doubt whether the two methods I used above may suit for this general case.
Of course, welcome any interesting answers and good comments.
 [/INST] You want
$S(x) 
=\sum_{i=1}^n |x-i|$.
I will show
$\begin{cases}
\text{if } x \le 1&S(x) \ge \dfrac{n(n-1)}{2}\\
\text{if } x \ge n &S(x) \ge \dfrac{n(n-1)}{2}\\
\text{otherwise} &S(x) \ge \dfrac{n^2-1}{4}
\end{cases}
$
Exact results are
$\begin{cases}
\text{if } x \le 1, & S(x) = n(1-x) + \dfrac{n(n-1)}{2}\\
\text{if } x \ge n, & S(x) =  n(x-n)+ \dfrac{n(n-1)}{2}\\
\text{if } j\le x < j+1 \text{ where } 1 \le j < n, &S(x) =  \dfrac{n^2+(n-2x+1)^2-(1-2y)^2}{4}\text{ where } y=x-j
\end{cases}
$
As a check, these are correct for
$x=0, 1, n$, 
and
$n+1$.
We consider three cases:
$x \le 1$,
$x \ge n$,
and $1 < x < n$.
If $x \le 1$,
then
$|x-i| = -x+i$,
so
$\begin{align}
S(x) &= \sum_{i=1}^n (-x+i)\\
&=-nx + \frac{n(n+1)}{2}\\
&=n(1-x)-n+ \frac{n(n+1)}{2}\\
&=n(1-x) +\frac{n(n-1)}{2}\\
\end{align}
$
If $x \ge  n$,
then
$|x-i| = x-i$,
so
$\begin{align}
S(x) = \sum_{i=1}^n (x-i)
&=nx - \frac{n(n+1)}{2}\\
&=n(x-n)+n^2 - \frac{n(n+1)}{2}\\
&=n(x-n) \frac{2n^2-n(n+1)}{2}\\
&= n(x-n)+\frac{n^2-n}{2}\\
&= n(x-n)+\frac{n(n-1)}{2}\\
\end{align}
$
If $j \le x < j+1$
where $1 \le j < n$,
let $y = x-j$,
so $0 \le y < 1$.
Then
$\begin{align}
S(x)
&=\sum_{i=1}^n |x-i|\\
&=\sum_{i=1}^n |j+y-i|\\
&=\sum_{i=1}^j |j+y-i|+\sum_{i=j+1}^n |j+y-i|\\
&=\sum_{i=1}^j (j+y-i)+\sum_{i=j+1}^n -(j+y-i)\\
&=\sum_{i=1}^j (j+y-i)+\sum_{i=j+1}^n (i-j-y)\\
&=jy+\sum_{i=0}^{j-1} (i)-(n-j)y+\sum_{i=1}^{n-j} (i)\\
&=(2j-n)y+\frac{j(j-1)+(n-j)(n-j+1)}{2}\\
&=(2j-n)y+\frac{j^2-j+(n-j)^2+(n-j)}{2}\\
&=(2j-n)y+\frac{(n^2+(n-2j)^2)/2+(n-2j)}{2}\quad (*)\\
&=(2j-n)y+\frac{n^2+(n-2j)^2+2(n-2j)}{4}\\
&=\frac{n^2+(n-2j)^2+2(n-2j)-4y(n-2j)}{4}\\
&=\frac{n^2+(n-2j)^2+2(1-2y)(n-2j)}{4}\\
&=\frac{n^2+(n-2j+1-2y)^2-(1-2y)^2}{4}\\
&=\frac{n^2+(n-2x+1)^2-(1-2y)^2}{4}\\
&\ge \frac{n^2-1}{4}\\
\end{align}
$
Note: The line marked "(*)" used
$a^2+b^2 = \dfrac{(a+b)^2+(a-b)^2}{2}$.
</s>