Upper bound for the absolute value of an inner product I am trying to prove the inequality
$$ 
\left|\sum\limits_{i=1}^n a_{i}x_{i} \right|  \leq \frac{1}{2}(x_{(n)} - x_{(1)}) \sum\limits_{i=1}^n \left| a_{i} \right| \>,$$
where
$x_{(n)} = \max_i x_i$ and $x_{(1)} = \min_i x_i$, subject to the condition $\sum_i a_i = 0$.
I've tried squaring and applying Samuelson's inequality to bound the distance between any particular observation and the sample mean, but am making very little headway. I also don't quite understand what's going on with the linear combination of observations out front. Can you guys point me in the right direction on how to get started with this thing?

Hint:
$$
\left|\sum_i a_i x_i\right| = \frac{1}{2} \left|\sum_i a_i x_i\right| + \frac{1}{2} \left|\sum_i a_i \cdot (-x_i)\right| \>.
$$
Now, 


*

*What do you know about $\sum_i a_i x_{(1)}$ and $\sum_i a_i x_{(n)}$? (Use your assumptions.)

*Recall the old saw: "There are only three basic operations in mathematics: Addition by zero, multiplication by one, and integration by parts!" (Hint: You won't need the last one.)


Use this and the most basic properties of absolute values and positivity to finish this off.
