I was messing around today and came across the following which I believe to be true: $$\left(\sum x_i\right)^2-2\sum_{cyc}x_ix_j=\sum x_i^2$$ for a set of $x=(x_1,x_2,...x_n)$ where $n\ge2$ and it is easy to prove for small values manually but how would I prove this rigourously? I thought about using the usual method of a base case, $n=k$ then $n=k+1$ but I am not quite sure how to do this?
$$n=2$$ $$\sum x_i=x+y,\sum_{cyc}x_ix_j=xy,\sum x_i^2=x^2+y^2$$ now: $$(x+y)^2-2xy=x^2+y^2$$ is easily shown. I have done the same for $n=3$ but how should I go about doing the general case?
If you expand $$(x_1 + \cdots + x_n)(x_1 + \cdots + x_n)$$ you get $n^2$ addends: $x_1^2, \ldots, x_n^2$, as well as two each of $x_i x_j$ for $i \ne j$. The cyclic sum accounts for some of these latter terms, but misses terms like $x_1 x_3$ or $x_2 x_4$.