6
$\begingroup$

Based on an interesting question here (second question), I have devised a similar one.

Evaluate the following double sum without expansion and substitution of standard sum-of-integers formula.

$$\sum_{x=1}^n\sum_{y=1}^n (n-x+y)$$

  • 4
    Are you challenging us with this $n^3$ problem ?2017-02-07
  • 0
    @YvesDaoust - It's too easy for you! But thought I'd put it down here for others who might find it interesting.2017-02-07
  • 1
    So my answer in that link counts as expansion?2017-02-07
  • 0
    @SimplyBeautifulArt - Your answer for the other question is perfectly valid. However, the objective of this question is to see if there is another approach to arrive at the solution, given the neat result *a posteriori*.2017-02-07
  • 0
    No, I was wondering if my old answer already satisfies this question2017-02-07
  • 0
    @AhmedS.Attaalla Lol, same2017-02-07
  • 0
    @SimplyBeautifulArt - Well this has a slightly different summand.2017-02-07

5 Answers 5

14

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}$$

  • 0
    Very nice solution - thanks! (+1)2017-02-07
  • 0
    I mean, it's practically the same as the last one I posted in the link you mentioned...2017-02-07
  • 0
    It's slightly different because the signs for $x,y$ are different.2017-02-07
5

$$\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?

  • 0
    Your beforelast line is wrong (or clumsy).2017-02-07
  • 0
    @YvesDaoust Oops ... Corrected. :)2017-02-07
  • 0
    Thanks for posting an answer (+1). Perhaps a bit of expansion, but fortunately the last two terms cancel out, before you need to evaluate the sum of integers!2017-02-07
3

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.$$

  • 0
    Very nice solution - thanks! (+1)2017-02-07
3

Here's a slightly different way to look at it. First, we rewrite the sum as: $$\sum_{x=1}^{n} \sum_{y=1}^{n} (n-x+y) = \sum_{(x,y)\in\{1,\dots,n\}^2} (n-x+y) \enspace,$$ with the usual meaning of $A^2$ as the set of all ordered pairs of elements of the set $A$. Then, we observe that for $x\neq y$, the sum of the two terms corresponding to the pairs $(x,y)$ and $(y,x)$ is: $$(n-x+y) + (n-y+x) = 2n$$ Therefore, we can think of each of the two pairs as contributing $n$ to the sum. For $x=y$, the term corresponding to $(x,y)$ is just $n$.

Conclusion: every pair contributes $n$ to the sum, so the sum is $n^2\cdot n= n^3$.

  • 0
    Nice solution - thanks. (+1)2017-02-07
2

$$\begin{align} S&=\sum_{x=1}^n\sum_{y=1}^n (n-x+y)\\ &=\sum_{r=1}^n\sum_{s=1}^n (n+r-s) &&\scriptsize (r=n+1-x, s=n+1-y)\\ &=\sum_{x=1}^n\sum_{y=1}^n(n+x-y) &&\scriptsize\text{(replacing $r,s$ with $x,y$, or directly, by symmetry)}\\ 2S&=\sum_{x=1}^n \sum_{y=1}^n (n-x+y)+(n+x-y)\\ &=2\sum_{x=1}^n\sum_{y=1}^n n\\ S&=\sum_{x=1}^n\sum_{y=1}^n n\\ &=\color{red}{n^3}\end{align}$$