Lets say that I know that $n$ values $x_i$ sums up to $\mu$: $$ \mu=\sum_{i=1}^n x_i $$ I also now that $0\leq x_i\leq 1$ for all $i=1\cdots n$.
I want to find an upper bound as tight as possible for the sum of their squares $\sum_{i=1}^n x_i^2$ as a function of $\mu$ and $n$.
I know that in general $\sum_{i=1}^n x_i^2 \leq (\sum_{i=1}^n x_i)^2=\mu^2$, but in this case if $\mu=n$ because of the costraints it results $\sum_{i=1}^n x_i^2=n=\mu<\mu^2=n^2$ which is too loose for what I need.
Any ideas?