Square of the sum of n positive numbers I have a following problem
When we want to write $a^2 + b^2$ in terms of $(a \pm b)^2$ we can do it like that
$$a^2 +b^2 = \frac{(a+b)^2}{2} + \frac{(a-b)^2}{2}.$$
Can we do anything similar for $a_1^2 + a_2^2 + \ldots + a_n^2$ ?
I can add the assumption that all $a_i$ are positive numbers.
I mean to express this as combination of their sums and differences.
I know that this question is a little bit naive but I'm curious whether it has an easy answer.

Another way would be:
$$\frac{\sum_{x\in \{-1,1\}^n}(x_1a_1+x_2a_2+....+x_na_n)^2}{2^n}$$
Where $x_i$ is the ith component of the vector $x$
