# Homework Help: Double summation,

1. Jun 16, 2013

### TelusPig

1. The problem statement, all variables and given/known data
How can I compute the sum
An example to calculate
$$\sum_{i=1}^n\sum_{j=i+1}^n(i+2j)$$?? I only have an example where n=1 and it gives a sum of 0 (why?)

Maybe with n=3, what would the expanded form look like?

2. Relevant equations
I know how to do double sums, but when I have indexes ranging from a constant to a constant. But I haven't encountered one where the index is dependent on the other sum's index.

3. The attempt at a solution
I tried computing the inner sum first:

$$\sum_{i=1}^3 \left( \sum_{j=i+1}^{3}i +2\sum_{j=i+1}^{3}j \right)$$
$$=\sum_{i=1}^3 \left(i(3-(i+1)+1) +2\sum_{j=i+1}^{3}j \right)$$
$$=\sum_{i=1}^3 \left(3i-i^2 +2\sum_{j=i+1}^{3}j \right)$$
$$=3(1+2+3)-1^2-2^2-3^2+2\sum_{i=1}^3\sum_{j=i+1}^{3}j$$

I don't know what to do about the summation of j, since it's indexed at j but it starts at i+1?

I only know that the answer is 20 because of Wolfram for when n = 3
http://www.wolframalpha.com/input/?i=Sum[i+2j,+{i,+1,+3},+{j,+i+1,+3}]

Last edited: Jun 16, 2013
2. Jun 16, 2013

### lurflurf

Just do the inner sum first
$$\sum_{i=1}^n\sum_{j=i+1}^n(i+2j)=\sum_{i=1}^n((n-i)i+n(n+1)-i(i+1))=\sum_{i=1}^n(n(n+1)+(n-1)i-2i^2)$$

3. Jun 16, 2013

### SteamKing

Staff Emeritus
When the starting value of the summation index is greater than the final value of the summation index, then by implication, the sum = 0, since there are no terms to be summed.

4. Jun 16, 2013

### TelusPig

May I ask how you are computing the "2j" sum? I'm guessing it's the 2 last terms n(n+1) - i(i+1) since (n-i)i sums the "i" term.

Last edited: Jun 16, 2013
5. Jun 16, 2013

### TelusPig

I tried going back to this and elaborated more, by thinking that the sum of j is just like the sum of integers formula

$$\sum_{i=1}^n \left( \sum_{j=i+1}^{n}i +2\sum_{j=i+1}^{n}j \right)$$
$$\sum_{i=1}^n \left(i(n-(i+1)+1) +2\sum_{j=1}^{n-i}(j+i) \right)$$ by index shifting
$$\sum_{i=1}^n \left(i(n-i) +2\sum_{j=1}^{n-i}j+2\sum_{j=1}^{n-i}i \right)$$
$$\sum_{i=1}^n \left(i(n-i) +2*\frac{(n-i)(n-i+1)}{2}+2*(i(n-i-1+1)) \right)$$using the sum of consectuive integers formula on j
$$\sum_{i=1}^n \left(i(n-i) +(n-i)(n-i+1)+2i(n-i) \right)$$

Though this doesn't give the same answer..

6. Jun 16, 2013

### haruspex

Doesn't give the same answer as what? Looks right, and it produces 20 for n=3. How about finishing the summation into closed form?

7. Jun 16, 2013

### lurflurf

There are many ways to manipulate this. One way it to note

$$\sum_{j=i+1}^n=\sum_{j=1}^n-\sum_{j=i}^n$$
Remember the outside index is treated as constant in the inside sum
use these formula you should know
$$\sum_{k=1}^n 1=n \\ \sum_{k=1}^n k=n(n+1)/2 \\ \sum_{k=1}^n k^2=n(n+1)(2n+1)/6$$

here is how to expand n=3 maybe that will help
$$\require{cancel} \sum_{i=1}^3 \sum_{j=i+1}^3 (i+2j)=\sum_{j=1+1}^3 (1+2j)+ \sum_{j=2+1}^3 (2+2j)+ \cancel{\sum_{j=3+1}^3 (3+2j)} \\ =(1+2\cdot2)+(1+2\cdot 3)+(2+2\cdot 3)=5+7+8=20$$

The crossed out sum is 0

8. Jun 16, 2013

### TelusPig

Oh it did turn out to be the same answer. I think I confused one of my "i"s with a "1" on paper. Thanks a lot though for the supplemental info above!! :)