During tutorials last week, a number of students asked how to understand identities that are used in the calculation of various Riemann sums and their limits.

These identities are:

 

\sum_{i=1}^n 1=n

\sum_{i=1}^n i=\frac{n(n+1)}{2}

\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}

\sum_{i=1}^n i^3=\left(\frac{n(n+1)}{2}\right)^2

 

Let’s go through these one by one. We must first remember what the sigma notation means. If we have:

 

\sum_{i=1}^n f(i)

 

It means the sum of terms of the forms f(i) for i starting with 1 and going up to i=n. Sometimes n will actually be an integer, and sometimes it will be left arbitrary. So, the above sum can be written as:

 

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

 

We haven’t specified what f is, but that’s because this statement is general and applies for any time of function of i. In the first of the identities above, the function is simply f(i)=1, which isn’t a very interesting function, but it still is one. It says, whatever i we put in, output 1. So this sum can be written as:

 

\sum_{i=1}^n 1=1+1+1+1+....+1

 

Where there are n terms. Well, if we take 1 and we add it to itself n times, we get n. That is, n lots of 1 gives n.

Now let’s look at the second identity. We can expand this as:

 

\sum_{i=1}^n i=1+2+3+4+5+6+...(n-2)+(n-1)+n

 

The function now is simple f(i)=i. It looks like adding all of these up is going to be quite a pain, but we can actually use a clever shortcut. What happens if we take the last term and add it to the first term? That will give us 1+n. Let’s put these two together:

 

\sum_{i=1}^n i=(n+1)+2+3+4+5+6+...(n-2)+(n-1)

 

Now let’s take the last term above and add it to the second term. This gives us (n-1+2) which is actually (n+1), so we can put these two together and we have:

 

\sum_{i=1}^n i=(n+1)+(n+1)+3+4+5+6+...(n-2)

 

We can do the same thing with the next term too: (n-2+3), which again is (n+1):

 

\sum_{i=1}^n i=(n+1)+(n+1)+(n+1)+4+5+6+...(n-3)

 

So we are taking all of the terms, pairing them up, and they give (n+1) every time. If there are n terms n the sum, then there are n/2 pairs of terms, so in the end we will get n/2 terms which are all equal to (n+1). What do we have if we have n/2 lots of (n+1)? Well, we have n(n+1)/2, so:

 

\sum_{i=1}^n i=\frac{n(n+1)}{2}

 

To calculate the next identity, we need to use the idea of a telescoping sum. A telescoping sum you can think of as two sums added together, where there is a cancellation in every term except the first, or last, or both.

For instance:

 

\sum_{i=1}^n f(i)-f(i-1)

 

Well, it looks like there are going to be 2 terms for each value of i, and there are n values of i that we sum over, so this should contain 2n terms, right? Well, if you telescope it all the way out, then yes, but it turns out that we can compress the telescope. Let’s start by writing this out completely:

 

\sum_{i=1}^n f(i)-f(i-1)=(f(1)-f(0))+(f(2)-f(1))+(f(3)-f(2))+.....(f(n)-f(n-1))

 

Written like this, there are indeed 2n terms, but we can see that terms between brackets cancel. For instance, the first bracket has an f(1) and the second bracket has a -f(1), so these cancel. If we perform all of the cancellations, we get:

 

\sum_{i=1}^n f(i)-f(i-1)=-f(0)+f(n)

 

All that we are left with are 2 terms. If f(0) happened to be 0, then we would have only 1 term.

Let’s look at a particular example:

 

\sum_{i=1}^n i^3-(i-1)^3

 

Now our f(i)=i^3 (and thus f(i-1)=(i-1)^3). So we have:

 

\sum_{i=1}^n i^3-(i-1)^3=-f(0)+f(n)=-0^3+n^3=n^3

 

So the answer to this is n^3. However, we can write this in a different way. We could first expand out i^3-(i-1)^3. If we expand this out, we get:

 

i^3-(i-1)^3=i^3-(i^3-3i^2+3i-1)=3i^2-3i+1

 

So we could write:

 

\sum_{i=1}^n i^3-(i-1)^3=\sum_{i=1}^n 3i^2-3i+1

 

But we know that a sum of several terms added together is the same as the addition of the separate sums, so we can write:

 

\sum_{i=1}^n i^3-(i-1)^3=\sum_{i=1}^n 3i^2-3i+1=\sum_{i=1}^n 3i^2-\sum_{i=1}^n 3i+\sum_{i=1}^n

which we can write as

=3\sum_{i=1}^n i^2-3\sum_{i=1}^n i+\sum_{i=1}^n

 

But we know from the telescoping sum calculation that this is equal to n^3, so:

 

3\sum_{i=1}^n i^2-3\sum_{i=1}^n i+\sum_{i=1}^n=n^3

 

We already know the last two of the sums above, so let’s write them out:

 

3\sum_{i=1}^n i^2-3\frac{n(n+1)}{2}+n=n^3

 

and let’s rearrange to get:

 

\sum_{i=1}^n i^2=\frac{n^3+3\frac{n(n+1)}{2}-n}{3}

 

Which can be rearranged to give:

 

\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}

 

So we have the third of our identities which we wrote above.

The last of the identities can be found in a similar way, which is explained very well here.

How clear is this post?