5
$\begingroup$

I would like to check if my answer is correct:

1) Compute $$\sum_{i=1}^n(3i+4)$$. I got $(3n^2 + 11n) / 2$ using the property that $\sum_{i=1}^n i = n(n+1)/2$

2) I'm unsure how to approach double summations like this: $$\sum_{x = 1}^n\sum_{y=1}^n(x+y−1)$$. Please help explain and the correct answer would be appreciated!

  • 1
    Thank you! I wish I could checkmark both!2017-02-06
  • 1
    The second question is especially interesting. See my solution which exploits the symmetry and doesn't require expansion and substitution of standard formulas.2017-02-07

4 Answers 4

0

A few tricks:

  1. the sum of the terms is always the product of the number of terms and the average value of the terms,

  2. the average value of a constant term is that constant,

  3. the average value of a linear term is the mean of the extreme values.

Then by 1. and 3.,

$$\sum_{i=1}^n(3i+4)=n\frac{3+4+3n+4}2.$$

For the other sum, you can decompose in three double sums, on $x$, $y$ and $-1$.

Then by 1., 2. and 3.,

$$\sum_{x = 1}^n\sum_{y=1}^n(x+y−1)=2n\frac{n^2+n}2-n^2.$$


Justification:

In the double sum of $x$, the $x$ is a constant for the inner sum, which then equals $nx$. The outer sum yields

$$n\frac{n^2+n}2.$$

By symmetry, the sum on $y$ equals that on $x$, hence the factor $2$.

5

1) Looks fine to me.

2) Notice this:

$$\begin{array}{}\displaystyle\sum_{x=1}^n\sum_{y=1}^n(x+y-1)&\displaystyle\vphantom{\cfrac11}=\sum_{x=1}^n\sum_{y=1}^nx&\displaystyle+\sum_{x=1}^n\sum_{y=1}^ny&\displaystyle-\sum_{x=1}^n\sum_{y=1}^n1\\\vphantom{\cfrac11}&\displaystyle=\sum_{x=1}^nx\sum_{y=1}^n1&\displaystyle+\sum_{x=1}^n1\sum_{y=1}^ny&\displaystyle-\sum_{x=1}^n1\sum_{y=1}^n1\\\vphantom{\cfrac11}&\displaystyle=\frac{n(n+1)}2\cdot n&\displaystyle+n\cdot\frac{n(n+1)}2&\displaystyle-n\cdot n\\&=n^3\end{array}$$

  • 0
    Hm, I wonder why a downvote :-(2017-02-06
5

Second question

(Updated solution)

This can be considered a $2$-D version of the Gaussian pairing technique for summation:

$$\begin{align} S&=\sum_{x=1}^n\sum_{y=1}^n (x+y-1)\\ &=\sum_{r=1}^n\sum_{s=1}^n (2n-r-s+1) &&\scriptsize(r=n+1-x, s=n+1-y)\\ &=\sum_{x=1}^n\sum_{y=1}^n (2n-x-y+1) &&\scriptsize\text{(replacing indices $r,s$ with $x,y$)}\\ 2S &=\sum_{x=1}^n\sum_{y=1}^n (x+y-1)+(2n-x-y+1)\\ &=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}$$


For illustration, if $n=5$,

$$\scriptsize\begin{align} 2\times \boxed{\begin{array} &1&2&3&4&5\\ 2&3&4&5&6\\ 3&4&5&6&7\\ 4&5&6&7&8\\ 5&6&7&8&9 \end{array}} &= \boxed{\begin{array} &1&2&3&4&5\\ 2&3&4&5&6\\ 3&4&5&6&7\\ 4&5&6&7&8\\ 5&6&7&8&9 \end{array}} +\boxed{\begin{array} &1&2&3&4&5\\ 2&3&4&5&6\\ 3&4&5&6&7\\ 4&5&6&7&8\\ 5&6&7&8&9 \end{array}}\\ &=\boxed{\begin{array} &1&2&3&4&5\\ 2&3&4&5&6\\ 3&4&5&6&7\\ 4&5&6&7&8\\ 5&6&7&8&9 \end{array}}+ \boxed{\begin{array} &9&8&7&6&5\\ 8&7&6&5&4\\ 7&6&5&4&3\\ 6&5&4&3&2\\ 5&4&3&2&1 \end{array}}\\ &=\boxed{\begin{array} &10&10&10&10&10\\ 10&10&10&10&10\\ 10&10&10&10&10\\ 10&10&10&10&10\\ 10&10&10&10&10\\ \end{array}}\\ \boxed{\begin{array} &1&2&3&4&5\\ 2&3&4&5&6\\ 3&4&5&6&7\\ 4&5&6&7&8\\ 5&6&7&8&9 \end{array}} &= \boxed{\begin{array} &5&5&5&5&5\\ 5&5&5&5&5\\ 5&5&5&5&5\\ 5&5&5&5&5\\ 5&5&5&5&5\\ \end{array}}\\ &=5^3\end{align}$$ ($x$ horizontal L to R, $y$ vertical down, numbers in box are $x+y-1$ and are to be summed)

  • 0
    Wow. Beautiful method and nice visualization!2017-02-08
  • 1
    @AliasUser - Hey thanks! Very kind of you to say so. Glad you like it. :)2017-02-08
3

1) You got that right.

2) Do the sum for $y=1$ to $n$ as if $x$ is a constant. Then sum the result over the values of $x$

$\sum_{y=1}^n(x+y−1)= \dfrac {n(n+1)}{2}+n(x-1)= \dfrac {n(n+1)-2n}{2}+nx=\dfrac {n(n-1)}{2}+nx$

$\sum_{x = 1}^n\sum_{y=1}^n(x+y−1)=\dfrac {n^2(n-1)}{2}+n \dfrac {n(n+1)}{2}=n^3$

  • 0
    Where did the -1 go in the second step? Why isn't the final answer n^3 - 1?2017-02-06
  • 0
    @Ashley - the n(x - 1) term is distributed, resulting in nx and the -2n/2 in the fraction.2017-02-08