# Prove that: (s-a_1)^2 + (s-a_2)^2 +cdots+ (s-a_n)^2 =a_1^2 +a_2^2+cdots+a_n^2 when a_1^2 +a_2^2+cdots+a_n^2 = n/{2s}?

Sep 27, 2017

The given identity is false, but if:

${a}_{1} + {a}_{2} + \ldots + {a}_{n} = \frac{n}{2} s$

then:

${\left(s - {a}_{1}\right)}^{2} + {\left(s - {a}_{2}\right)}^{2} + \ldots + {\left(s - {a}_{n}\right)}^{2} = {a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2}$

#### Explanation:

Consider the case $n = 1$, $s = 2$, ${a}_{1} = \frac{1}{2}$

Then:

${a}_{1}^{2} = {\left(\frac{1}{2}\right)}^{2} = \frac{1}{4} = \frac{1}{2 \cdot 2} = \frac{n}{2 s}$

${\left(s - {a}_{1}\right)}^{2} = {\left(2 - \frac{1}{2}\right)}^{2} = {\left(\frac{3}{2}\right)}^{2} = \frac{9}{4} \ne \frac{1}{4} = {a}_{1}^{2}$

So something is not quite right with the question as stands.

Bonus

Let's try to work out the correct condition.

Working back from the desired result:

${\left(s - {a}_{1}\right)}^{2} + {\left(s - {a}_{2}\right)}^{2} + \ldots + {\left(s - {a}_{n}\right)}^{2} = {a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2}$

Multiplying out the left hand side, we have:

${a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2} - 2 s \left({a}_{1} + {a}_{2} + \ldots + {a}_{n}\right) + n {s}^{2} = {a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2}$

Subtract ${a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2}$ from both sides to get:

$- 2 s \left({a}_{1} + {a}_{2} + \ldots + {a}_{n}\right) + n {s}^{2} = 0$

Add $2 s \left({a}_{1} + {a}_{2} + \ldots + {a}_{n}\right)$ to both sides to get:

$n {s}^{2} = 2 s \left({a}_{1} + {a}_{2} + \ldots + {a}_{n}\right)$

Divide both sides by $2 s$ to get:

$\frac{n}{2} s = {a}_{1} + {a}_{2} + \ldots + {a}_{n}$

Note that all of the above steps are reversible, so if:

${a}_{1} + {a}_{2} + \ldots + {a}_{n} = \frac{n}{2} s$

then:

${\left(s - {a}_{1}\right)}^{2} + {\left(s - {a}_{2}\right)}^{2} + \ldots + {\left(s - {a}_{n}\right)}^{2} = {a}_{1}^{2} + {a}_{2}^{2} + \ldots + {a}_{n}^{2}$