Double Sum with a Neat Result

Last two sums are equal in the first line:$$\begin{array}{}\displaystyle\sum_{x=1}^n\sum_{y=1}^n(n-x+y)&\displaystyle\vphantom{\cfrac11}=\sum_{x=1}^n\sum_{y=1}^nn&\displaystyle-\sum_{x=1}^n\sum_{y=1}^nx&\displaystyle+\sum_{x=1}^n\sum_{y=1}^ny\\\vphantom{\cfrac11}&\displaystyle=n\sum_{x=1}^n1\sum_{y=1}^n1\\\vphantom{\cfrac11}&\displaystyle=n\cdot n\cdot n\\&=n^3\end{array}$$


$$\sum_{x=1}^n\sum_{y=1}^n (n-x+y)$$ $$=\sum_{x=1}^n\left(\sum_{y=1}^nn-\sum_{y=1}^nx+\sum_{y=1}^ny\right)$$ $$=\sum_{x=1}^n\left(n\cdot n-n\cdot x+\sum_{y=1}^ny\right)$$ $$=\sum_{x=1}^nn\cdot n-\sum_{x=1}^nn\cdot x+\sum_{x=1}^n\sum_{y=1}^ny$$ $$=n\cdot n\cdot n-n\cdot\sum_{x=1}^n x+n\sum_{y=1}^ny$$ $$=n\cdot n\cdot n\underbrace{-n\cdot\sum_{k=1}^n k+n\sum_{k=1}^nk}_\text{Change in index does not change the scenario}$$ $$=n^3$$

Will this do? Or is this an expansion?


By symmetry, the double sums on $x$ and $y$ are equal and cancel, hence $n^3$.


Shorter but a little more obfuscated:

$$\bar n+\bar x-\bar y=n\to n^3.$$

Tags:

Summation