By Induction $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$ But I didn't understand how I can do this, for this function or another function, i.e how to derive the right hand side function for the summation.
-
1I would start with $n=1$ – Dr. Sonnhard Graubner Oct 08 '18 at 10:36
-
Then we assume that for $n=k$ is hold $$\sum_{i=0}^k i^2=\frac{(k^2+k)(2k+1)}{6}$$ – Dr. Sonnhard Graubner Oct 08 '18 at 10:39
-
what I mean is that how can I the function is derived, before substituting n=1 – Aliyu Marke Oct 08 '18 at 10:39
-
This formula is well-known – Dr. Sonnhard Graubner Oct 08 '18 at 10:40
-
Checking that $\frac{(n^2+n)(2n+1)}{6}$ is the right formula, and finding that formula in the first place are two completely different tasks. Are you asking how one would find it in the first place (which is not very induction firendly), or how one would prove that it is true (which is a standard induction exercise)? – Arthur Oct 08 '18 at 10:40
-
yes, I am asking about how one would find it in the first place. – Aliyu Marke Oct 08 '18 at 10:47
-
It's not an exact duplicate (as this is about how to find the formula rather than how to prove it), but the other post does have answers containing constructive ways to reach the solution. – Arthur Oct 08 '18 at 11:37
1 Answers
There is a certain amount of guessing involved. You start by looking at similar formulas and looking for a pattern.
\begin{align} \sum_{i=0}^n i^0 = n+1 \\ \sum_{i=0}^n i^1 = \dfrac 12 n^2 + \dfrac 12 n \\ \end{align}
It's not a lot, but it suggests the hypothesis
$$\sum_{i=0}^n i^2 = An^3 + Bn^2 + Cn+D \tag{1}$$
for some numbers $A,B,C$, and $D$.
The first step is to make equation $(1)$ true for $n=0$.
\begin{align} \sum_{i=0}^0 i^2 &= A0^3 + B0^2 + C0+D \\ 0 &= D \\ D &= 0 \end{align}
So we can now replace equation $(1)$ with
$$\sum_{i=0}^n i^2 = An^3 + Bn^2 + Cn \tag{2}$$
The next induction step is to assume that equation $(2)$ is true for some particular value, say $n = k$ and then make sure that it also true for $n = k+1$.
\begin{align} \sum_{i=0}^{k+1} i^2 &= \sum_{i=0}^{k} i^2 + (k+1)^2 \\ A(k+1)^3 + B(k+1)^2 + C(k+1) &= Ak^3 + Bk^2 + Ck + (k^2+2k+1) \\ Ak^3 +(3A+B)k^2 + (3A+2B+C)k + (A+B+C) &= Ak^3 + (B+1)k^2 + (C+2)k \\ (3A-1)k^2 + (3A+2B-2)k + (A+B+C-1) &= 0 \\ \hline 3A-1 &= 0 \\ 3A+2B-2 &= 0 \\ A+B+C-1 &= 0 \\ \hline A &= \dfrac 13 \\ B &= \dfrac 12 \\ C &= \dfrac 16 \end{align}
Hence
\begin{align} \sum_{i=0}^n i^2 &= \dfrac 13 n^3 + \dfrac 12 n^2 + \dfrac 16 n \\ &= \dfrac 16(2n^3 + 3n^2 + n) \\ &= \dfrac 16 n(2n^2 + 3n + 1) \\ &= \dfrac 16 n(n+1)(2n+1) \\ \end{align}

- 26,769