# Deriving the formula of a summation

Derive the formula for $$\sum_{k=1}^n k^2$$ The solution's that I was given has $k^3 + (k-1)^3$ as the first step but doesn't say how it got to that. Any help?

• Not sure what you are asking. What do you mean you were given a solution with $k^3 + (k-1)^3$ as a first step? Could you typeset the entire solution you were given? – gt6989b Dec 9 '13 at 18:39
• That's an interesting hint that you were given. Presumably, the hint is assuming you already know how to sum k^3. – David H Dec 9 '13 at 18:39
• Two problems. 1: The answer should be in terms of $n$ and not $k$. In the sum, $k$ is just a dummy variable. 2: Even if you use $n$ rather than $k$, that expression doesn't work for $n = 0$ or $n=2$. – Carl Dec 9 '13 at 18:40
• My question is more WHY we start with $k^3 + (k-1)^3$ (i.e how do we know to just use that formula chosen for the solution) – user114675 Dec 9 '13 at 18:58

Note $(k+1)^3-k^3=3k^2+3k+1$ so \begin{align} n^3=\sum_{k=0}^{n-1} (k+1)^3-k^3&=\sum_{k=0}^{n-1} 3k^2+3k+1\\ &=3\sum_{k=0}^{n-1}k^2+3\sum_{k=0}^{n-1}k+\sum_{k=0}^{n-1}1\\ &=3\sum_{k=0}^{n-1}k^2+3\frac{(n-1)n}{2}+n\\ \frac{n^3}{6}-\frac{n(n-1)}{2}-\frac n3&=\sum_{k=0}^{n-1}k^2\\ \frac{n(n-1)(2n-1)}{6}&=\sum_{k=0}^{n-1}k^2 \end{align}

So we get $$\frac{n(n+1)(2n+1)}{6}=\sum_{k=1}^{n}k^2$$

• This is identical to the solution I got but I was more asking why we start with $(k+1)^3 - k^3$ – user114675 Dec 9 '13 at 18:57
• Oh, well the heuristic argument is that a sum of $k^n$ should have $O(k^{n+1})$. Another reason (perhaps more rigorous), is: $$\lim_{n\to\infty} \sum_{k=1}^n \frac{k^c}{n^{c+1}}=\lim_{n\to\infty} \frac 1n\sum_{k=1}^n (k/n)^c=\int_0^1 x^c\text dx=\frac{1}{c+1}$$ Once we've recognized that, it's only reasonable to consider the difference of consecutive cubes, in this example. – Tim Ratigan Dec 9 '13 at 19:07

Hint:

$$\sum_{k=1}^{n} (k+1)^3 - \sum_{k=1}^{n} k^3 = (n+1)^3-1 .$$

Now, expand the left hand side and simplify. You only need the identity

$$\sum_{k=1}^{n}k = \frac{n(n+1)}{2}.$$

Hint:

For nonnegative integers $n,r$ with $r\leq n$ it is surprisingly easy to prove by induction that

$\sum_{k=r}^{n}\binom{k}{r}=\binom{n+1}{r+1}$

This result allows you to find formulas for $\sum_{k=1}^{n}k^{r}$ for $r=1,2,3,\ldots$