3
$\begingroup$

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.

  • 0
    Is sunflower's answer enough?2012-12-11

2 Answers 2

3

Yes. You have to sum over all of the possibilities of $a\pm b\pm c$: $4(a^2+b^2+c^2)=(a+b+c)^2+(a+b-c)^2+(a-b+c)^2+(a-b-c)^2$

This can be extended to n factors by:

$\sum_{k=1}^n a_k^2=\sum_{\alpha=(1,-1,...,-1)\; |a_i|=1}^{(1,...,1)}\frac{\big(\sum_{i=1}^{n}\alpha_ia_i\big)^2}{2^{n-1}}$

($\alpha$ is a multiindex with values that are either -1 or 1, except the first that is always 1)

1

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$

  • 0
    nah, sorry. I was looking at the solutions for$n=2$or 3 where the first index is 1. (These work just fine too). For those, we have only half the terms and thus, only $2^{n-1}$ but you are correct.2012-12-11