# Triangle Inequality: Upper bound for $\left|\sum_{i=1}^n\frac{x_i}{i}\right|$

Let integer $n>1$ and $x_1,\cdots, x_n\in\mathbb{R}$ such that $|x_1|+\cdots+|x_n|=1$ and $x_1+\cdots+x_n=0$. Prove that $$\left|\frac{x_1}{1}+\frac{x_2}{2}+\cdots+\frac{x_n}{n}\right|\leq \frac{1}{2}\left(1-\frac{1}{n}\right).$$

I thought of using the triangle inequality, but got stuck halfway. Any hints or tips? Thanks!

• It's better to give a brief outline of what you've tried rather than just say "got stuck halfway", because we don't know how exactly you "got stuck".. – user21820 Nov 20 '15 at 11:15

Let $I=\{i:x_i>0\}, J=\{j:x_j<0\}$, $S=\sum_{i \in I}x_i, T=\sum_{j \in J}|x_j|$, $A=\sum_{i \in I}\frac{x_i}{i}, B=\sum_{j \in J}\frac{|x_j|}{j}$. Then we have $S=T=\frac{1}{2}$, hence $A \leq \frac{1}{2}$ and $B \geq \frac{1}{2n}$ and the value of the expression is $A-B$ (if $A>B$ as we may assume w.l.o.g).
Using Abel's rearrangement and $\displaystyle \sum\limits_{k=1}^{n}x_k = 0$: $$\sum\limits_{k=1}^{n}\frac{x_k}{k} = \sum\limits_{k=1}^{n-1}\left(\frac{1}{k} - \frac{1}{k+1}\right)\sum\limits_{j=1}^{k}x_j + \left(\frac{1}{n}\sum\limits_{k=1}^{n}x_k\right) = \sum\limits_{k=1}^{n-1}\frac{x_1+\cdots +x_k}{k(k+1)}$$
On the other hand, $$\sum\limits_{k=2}^{n} \left(1 - \frac{1}{k}\right)|x_k| \ge \left|-\left(\sum\limits_{k=2}^{n}x_k\right)+\sum\limits_{k=2}^{n}\frac{x_k}{k}\right| = \left|\sum\limits_{k=1}^{n}\frac{x_k}{k}\right|$$
Thus, $$\left|\sum\limits_{k=1}^{n}\frac{x_k}{k}\right| \le \frac{1}{2}\left(1-\frac{1}{n}\right)$$