0

I am trying to refresh my Maths after a lot of years without studying them, and I am finding a lot of difficulties (which is actually nice). So, my question:

I don't understand the next equality. How to reach $\frac{(n-1)n(2n-1)}{6n^3}$ from $$\frac{1^2+ 2^2+...+ (n-1)^2}{n^3}$$?

Thank you very much (and sorry if I make mistakes; my English is also rusty :))

haros
  • 19
  • 2
    Haros, the answer will be different depending on whether 1) you would accept a proof by induction of the formula (which can only work if the formula is already known, or has at least been guessed); or 2) you would like a proof that finds the formula without initially presuming that it has been guessed. – Keith Jul 08 '15 at 06:55
  • For what I am seeing, the question is more difficult than I though! What I am searching for is 1). Although I have not get the answer to my question yet, @ClementC. has given me good clues posting a link to another question. I will try to find an answer for myself from there. Thank you very much! – haros Jul 08 '15 at 07:01
  • I believe you meant what I edited since your original is not correct. I'll give you two answers that allow you to derive the formula without knowing it in advance. – user21820 Jul 08 '15 at 07:08
  • For alternatives to induction, this question has an answer that provides a combinatorial proof that $1^2+\cdots+(n-1)^2=\frac16(n-1)n(2n-1)$. And this question has a link in it to a geometric proof. – 2'5 9'2 Jul 08 '15 at 07:10
  • There are lots of proof for the fact that $$1^2+2^2+3^2+\cdots+(n-1)^2=\sum_{k=1}^{n-1}k^2=\dfrac{n}6(n-1)(2n-1).$$ Also if you like you can find a generalize formula for $$\sum_{k=1}^{n-1}k^r$$ for $r\in\mathbb{N}$ using Bernoulli Numbers – Bumblebee Jul 08 '15 at 07:24
  • This is fun :). Try finding the formula using the hockey stick formation in Pascal's Triangle. – John Joy Jul 08 '15 at 14:19

3 Answers3

4

Here is a possible approach.

You need to compute the sum of squares

$$S(n)=\sum_{k=0}^{n-1}k^2.$$

The difference $S(n+1)-S(n)$ is just the general term, $n^2$, which is a polynomial of the second degree in $n$. For this reason, $S(n)$ must be a polynomial of the third degree in $n$.

To compute it, you can perform Lagrangian interpolation on four points, such as $(1,0),(2,1),(3,1+4)$ and $(4,1+4+9)$.

$$S(n)=1\frac{(n-1)(n-3)(n-4)}{(2-1)(2-3)(2-4)}+5\frac{(n-1)(n-2)(n-4)}{(3-1)(3-2)(3-4)}+14\frac{(n-1)(n-2)(n-3)}{(4-1)(4-2)(4-3)}\\ =\frac{n-1}6\left(3(n^2-7n+12)-15(n^2-6n+8)+14(n^3-5n+6)\right)\\ =\frac{n-1}6(2n^2-n).$$

  • Wow! I've never seen this approach before. This answer was worth the duplicate question! –  Jul 08 '15 at 07:16
  • Thank you very much for your answer!! That was great and helpful!! – haros Jul 08 '15 at 07:25
  • I agree with your claim that $S(n)$ must be a third-degree polynomial, however it is not clear to me if you are saying that this is obvious, or if you're referring to a particular theorem to this effect. – Keith Jul 08 '15 at 07:27
  • Yep, Lagrangian interpolation is a good friend. Anyway the computation is rather "heavy" (see my comment to the answer of user21820). You can ease it by using the point $(0,0)$ instead of $(4,14)$ - this requires some "faith" to extrapolate the sum to "$-1$" terms. Neville's scheme can also help a little. –  Jul 08 '15 at 07:27
  • @Keith: My answer gives an easy way to see why the sum of $p$-powers should be a degree-$(p+1)$ polynomial, which is equivalent to Yves's comment that the indefinite summation of a degree-$k$ polynomial is a degree-$(k+1)$ polynomial. – user21820 Jul 08 '15 at 07:30
  • @Keith: No it's by induction on the degree of the polynomial. If it works for a certain degree, then it works for one higher degree. And it clearly works for zero degree. – user21820 Jul 08 '15 at 07:38
  • @user21820 I was actually responding to Yves Daoust. He's now removed the comment to which I was responding. – Keith Jul 08 '15 at 07:42
  • @Keith: maybe I should say "there exists a polynomial of the third degree such that $S(n+1)-S(n)=n^2$", then exhibiting the polynomial is enough. –  Jul 08 '15 at 07:44
  • Yes, that's correct. So the "guessing" part is limited to guessing that some polynomial of degree three will work, or using a proof along the lines of the one given by user21820. – Keith Jul 08 '15 at 07:45
  • @Keith: the first order difference of a polynomial is a polynomial of degree-1. It shouldn't be so difficult to prove the reciprocal. –  Jul 08 '15 at 07:53
  • @YvesDaoust I've just written a proof of the converse here: http://math.stackexchange.com/questions/742535/non-constructive-proof-that-sum-j-1n-jk-is-a-polynomial-pn-of-degree/ Maybe you can give a better proof. – Keith Jul 08 '15 at 08:14
2

Method 1 $\def\zz{\mathbb{Z}}$

$k^3 - (k-1)^3 = 3k^2 - 3k + 1$ for any $k \in \zz$.

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

Thus $n^3 - 0^3 = 3 \sum_{k=1}^n k^2 - 3 \sum_{k=1}^n k + \sum_{k=1}^n 1$.

Thus $\sum_{k=1}^n k^2 = \frac{1}{3} \left( n^3 + 3 \sum_{k=1}^n k - \sum_{k=1}^n 1 \right)$.

Notes

This method allows computing $\sum_{k=1}^n k^p$ for any natural number $p$, using all the results for smaller $p$. However it is rather inefficient to do by hand for large $p$.

user21820
  • 57,693
  • 9
  • 98
  • 256
  • On the opposite, I guess this is the most efficient approach to compute the summation formulas. It amounts to solving a triangular system of equations where the coefficients are as subset of Pascal's triangle. See http://www.codeproject.com/Tips/792255/Faulhaber-made-easy –  Jul 08 '15 at 07:17
  • @YvesDaoust: I'm not sure what you mean by "most efficient" since my second answer that I'm writing is even more efficient, and yet far more general than this method. – user21820 Jul 08 '15 at 07:28
  • In the sense of computing the cofficients by hand. –  Jul 08 '15 at 07:50
  • @YvesDaoust: Did you see my other method? Why on earth would anyone downvote it since it is superior to this one? – user21820 Jul 08 '15 at 07:50
  • Can you make it simpler than the resolution of a triangular system with binomial coefficients ? –  Jul 08 '15 at 07:56
  • @YvesDaoust: Did you try using it? I could give an example computation, but I see no point when no one appreciates it. – user21820 Jul 08 '15 at 07:57
  • I can tell you that the Lagrangian interpolation method that I used is very inefficient. –  Jul 08 '15 at 07:58
  • @YvesDaoust: I meant did you try using my method 2 at all? What is the point of me adding details when all I get is downvotes? – user21820 Jul 08 '15 at 07:59
0

Method 2 $\def\nn{\mathbb{N}}$ $\def\zz{\mathbb{Z}}$ $n^2$ is a degree-$2$ polynomial on $n$, so we write down the sequence $(n^2)_{n\in\nn}$ and find the differences between consecutive terms, which give rise to another sequence. Repeating this $3$ times will produce a sequence of only zeros because $3 > 2$, as we shall prove later.

0,1,4,9,...
1,3,5,...
2,2,...
0,...

Then we look at the $0$-th term in each sequence and just multiply each with the corresponding binomial coefficient to get:

$n^2 = 0 \binom{n}{0} + 1 \binom{n}{1} + 2 \binom{n}{2}$.

Again, why this is true will be proven later.

Now if we want the sum of the first $(n-1)$ squares, we just shift the coefficients to the right as follows:

$\sum_{k=0}^{n-1} = 0 \binom{n}{1} + 1 \binom{n}{2} + 2 \binom{n}{3} = \frac{1}{6}(n-1)n(2n-1)$.

Such a wonderful property of binomial coefficients is not accidental, as we shall see below.

Proof

Define the forward difference operator:

$D = ( \text{function $f$ on $\zz$} \mapsto ( \text{int $n$} \mapsto f(n+1) - f(n) ) )$

Namely for any function $f$ on $\zz$ and $n \in \zz$, $D(f)(n) = f(n+1) - f(n)$.

If you think of the functions as sequences (infinite in both directions), then taking the forward difference means replacing each term with the value of the next term minus itself. For example the following shows what happens when you repeatedly take the forward difference of the sequence of cubes:

...,-27,-8,-1, 0, 1, 8,27,...
..., 19, 7, 1, 1, 7,19,37,...
...,-12,-6, 0, 6,12,18,24,...
...,  6, 6, 6, 6, 6, 6, 6,...
...,  0, 0, 0, 0, 0, 0, 0,...
...,  0, 0, 0, 0, 0, 0, 0,...

Then we have:

$D\left( \text{int $n$} \mapsto \binom{n}{k+1} \right) = \left( \text{int $n$} \mapsto \binom{n}{k} \right)$ for any $k \in \zz$.

This is to be expected because it follows directly from Pascal's triangle, especially if we define $\binom{n}{k}$ using the triangle.

This means that if we have any function $f$ on $\zz$ such that $f(n) = \sum_{k=0}^\infty a_k \binom{n}{k}$ for any $n \in \zz$, then we get:

$D(f)(n) = \sum_{k=0}^\infty a_{k+1} \binom{n}{k}$ for any $n \in \zz$.

From a high-level perspective, this is the discrete version of the Taylor series, and indeed for such a function we easily see that $f(n) = \sum_{k=0}^\infty D^k(f)(0) \binom{n}{k}$ for any $n \in \zz$, because $\binom{0}{0} = 1$ while $\binom{0}{k} = 0$ for any $k \in \nn^+$.

This works for any polynomial function $f$ on $\zz$, since $D^k(f)$ is the zero function once $k$ is larger than the degree of $f$, so we can use it to immediately find the series for $(\text{int n} \mapsto n^3)$, and then just take the anti-difference by shifting the coefficients of the series the other way. The undetermined constant that appears will drop out once we perform a definite sum like if we want the sum of the first $m$ cubes.

Notes

This is far more efficient that my other method in a certain sense because the series using binomial coefficients is easy to manipulate and easy to compute. Strangely, it seems that people do not appreciate methods that are better...

Also, for a wide class of non-polynomial functions, we can still compute the indefinite sum without using the series, by using the discrete analogue to integration by parts, here called summation by parts.

To derive it, simply check that $D(f \times g)(n) = f(n+1) g(n+1) - f(n) g(n) = f(n+1) D(g)(n) - D(f)(n) g(n)$ and so we get the product rule:

$D(f \times g) = R(f) \times D(g) + D(f) \times g$

where $R$ is the right-shift operator defined as:

$R = ( \text{function $f$ on $\zz$} \mapsto ( \text{int $n$} \mapsto f(n+1) ) )$

Namely for any function $f$ on $\zz$ and $n \in Z$, $R(f)(n) = f(n+1)$.

For convenience we also define the summation operator:

$S = ( \text{function $f$ on $\zz$} \mapsto ( \text{int $n$} \mapsto \sum_{k=0}^{n-1} f(k) ) )$

Then we have the important property that $DS(f) = f$ for any function $f$ on $\zz$, analogous to the fundamental theorem of calculus.

Now by substituting $f$ with $S(f)$ into the product rule and taking summation on both sides we get summation by parts:

$S( f \times g ) = S(f) \times g - S( R(S(f)) \times D(g) ) + c$ for some constant function $c$ on $\zz$.

Using this we can easily compute things like $\sum_{k=1}^n 3^k k^3$ by applying it three times, each time reducing the degree of the polynomial part.

user21820
  • 57,693
  • 9
  • 98
  • 256
  • Despite the meaningless downvote, I'm going to add further detail for the reader who is actually interested in learning this powerful technique that has deep ties with recurrence relations and differential equations. – user21820 Jul 08 '15 at 08:13
  • I would phrase this argument as follows. For $k = 0, 1, 2, \dots$, write $f_k(x) = \binom{x}{k}$, a polynomial of degree $k$. Look at the space $V_{r+1}$ of polynomials of degree $\leq r + 1$. Then the operator $D$ from your answer takes a particularly simple form when expressed in the basis $f_0, f_1, \dots, f_{r + 1}$. Thus the problem to be solved amounts to writing the polynomial $x^r$ in this basis. – Keith Jul 08 '15 at 08:30
  • @Keith: That is correct for polynomials, but I chose to express the ideas using operators because if you look at the notes it works even outside that vector space of polynomials that you are referring to. And if you think my answer is useful, do upvote it. – user21820 Jul 08 '15 at 08:34