0

I am reading about Gaussian elimination, and the book gives the equation for the number of multiplications/divisions needed to solve a nXn matrix $$\sum_{2}^{n} (k^2-k)$$

The formula I can understand, but what confuses me is when the book says this:

"Through induction you can show that $$\sum_{2}^{n} (k^2-k)=\frac{n^3-n}{3}$$

Edit: Sorry, I was asking the wrong question. I can se that through induction it is true, but how did they come to $\frac{n^3-n}{3}$ without induction in the first place?

  • Induction. Base: $n=2 \Rightarrow 4-2=2=\frac{8-2}{3}$. Step. $n=m+1$, $S_{n}=S_{n-1}+n^2-n=\frac{m^3-m}{3}+(m+1)^2-(m+1)=\frac{m^3-m+3m^2+6m+3-3m-3}{3}=\frac{m^3+3m^2+3m+1-m-1}{3}=\frac{(m+1)^3-(m+1)}{3}$. – Ivan Kaznacheyeu Nov 04 '21 at 12:40
  • Do yo know what induction means ? If yes, apply it. – Bobby Laspy Nov 04 '21 at 12:41
  • Sorry, I was asking the wrong question. How did they come to $\frac{n^3-n}{3}$ without induction in the first place? – Erik Eriksson Nov 04 '21 at 12:45
  • @IvanKaznacheyeu: you complicate things by introducing $m$. Simply write $S_n-S_{n-1}=\frac{n^3-n-(n-1)^3+(n-1)}3=n^2-n$. – Bobby Laspy Nov 04 '21 at 12:45
  • I believe it is necessary to introduce $m$ for correct proof, $n$ is dumb number in formula to prove,$m$ is certain number in a proof. – Ivan Kaznacheyeu Nov 04 '21 at 12:49
  • I don't think they got to $\dfrac{n^3-n}3$ without induction in the first place. I think they used induction to arrive at it. What makes you think they arrived at $\dfrac{n^3-n}3$ without induction when the quoted text says they got there with induction? – it's a hire car baby Nov 04 '21 at 12:51
  • @IvanKaznacheyeu: I mean $m+1$ instead of $m$. (And $n$ makes no difference.) – Bobby Laspy Nov 04 '21 at 12:51
  • I agree that induction proves the formula, but to get to do the induction you must first have an inkling of what the formula is going to be. How did they arrive at that is my question. – Erik Eriksson Nov 04 '21 at 12:52
  • One way is to use binomial coefficients. $k(k-1)=2\binom k2$. If you stare at the Pascal triangle for a little while you will see why $$\binom 22 +\binom 32=\binom 33+\binom32=\binom 43$$ hence $$\binom 22+\binom 32+\binom42=\binom 43+\binom 42=\binom53$$ hence $$\binom22+\binom32+\binom42+\binom52=\binom53+\binom52=\binom63$$ et cetera. Look up hockey stick identity. – Jyrki Lahtonen Nov 04 '21 at 12:57
  • @JyrkiLahtonen This looks promising :). Thank you – Erik Eriksson Nov 04 '21 at 13:06

4 Answers4

1

For any polynomial $P$ of degree $d+1$, $P(n)-P(n-1)$ is a polynomial of degree $d$. And if $P(n)$ is a sum up to $n$, then $P(n)-P(n-1)$ is the last term of the sum.

There are several ways to discover $P$. For instance by indeterminate coefficients.

With $$\sum_{k=2}^n(k^2-k)=an^3+bn^2+cn+d,$$

you solve

$$n^2-n=a(n^3-(n-1)^3)+b(n^2-(n-1)^2)+c(n-(n-1)).$$

Also see https://www.codeproject.com/Tips/792255/Faulhaber-made-easy, which can be adapted to any polynomial function.

1

HINT...They have used the formulas $$\sum_{r=1}^n r^2=\frac n6(n+1)(2n+1)$$ and $$\sum_{r=1}^n r=\frac n2(n+1)$$

David Quinn
  • 34,121
  • Thank you. The second one is easy enough, but I'm going to have to stare sum of squares a bit longer. – Erik Eriksson Nov 04 '21 at 13:05
  • @ErikEriksson Many approaches to deriving that identity are given here. A popular one uses (essentially) the hockey stick identity. Because identities of this type can be seen as telescoping sums, I tried to explain how one finds the right telescoping function by integrating the one related to the previous exponent. – Jyrki Lahtonen Nov 04 '21 at 13:14
  • @JyrkiLahtonen I breezed past binomial equation in calculus and thought I understood it enough. But clearly there is a word there worth diving into. Thank you, this is very helpful and interesting. – Erik Eriksson Nov 04 '21 at 13:17
0

Okay, your mean is how to calculate $\sum_{k=2}^n k^2$ right?, I assume that you know $\sum_{k=2}^n k$. First Let us : $$ S = \sum_{k=2}^n k^2 \\ P(n,k) = \sum_{i=2}^k i = \frac{(n+k)(n-k+1)}{2} = \frac{n^2 -k^2 + n +k}{2} \\ \text{especially: } P = \sum_{k=2}^n k $$

Now we expand $\sum_{k=2}^n k^2$, $$ \begin{align*} S=\sum_{k=2}^n k^2 &= 2^2 + 3^2 + 4^2 + 5^2 \cdots + n^2 \\ &= 2(2 + 3 +4 \cdots +n) + (3+2\cdot4+3\cdot5+\cdots+(n-2)\cdot n)\\ &=2(2 + 3 +4 \cdots +n) + (3 + 4 + \cdots + n) + \cdots + ((n-1) + n) + n \\ &=2P(n,2) + P(n,3) + P(n,4) + \cdots + P(n,n) \\ &\text{Using }P(n,k) \text{ 's formula, we have:} \\ &= P + \frac{(n-1)n}{2}+\frac{2+ \cdots +n}{2} + \frac{n^2(n-1)}{2} - \frac{S}{2} \\ &= \frac{3}{2}P + \frac{n^3-n}{2} - \frac{S}{2} \end{align*} $$

$\implies$ $$ \frac{3}{2}(S-P) = \frac{n^3-n}{n} \\ S-P = \frac{n^3-n}{3} \\ \sum_{k=2}^n(k^2-k)=S-P=\frac{n^3-n}{3} $$ done.

0

$$\begin{align*}\sum_{k = 2}^n (k-1)k & =2\times\sum_{k = 2}^n \frac {k!}{(k-2)!\times2!}\\ & = 2\times \sum_{k = 2}^n \binom{k}{2}\\ &= 2\times\binom{n+1}{3} = \frac {n^3-n}{3}\\ \end{align*}$$