# Solution

Prove the following statement holds for every positive integer $n$.

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

Let's argue by induction...

Starting with the basis step...

We must show that the statement holds for the smallest value of $n$ that we wish to consider.

Since we seek to prove the statement holds for every positive integer, then the smallest value we wish to consider would be $n=1$.

When $n=1$, the left side collapses to a "sum" containing only a single term: $$\sum_{i=1}^n i^2 = 1^2 = 1$$

While on the right side, if $n=1$, we have $$\frac{n(n+1)(2n+1)}{6} = \frac{1(1+1)(2 \cdot 1 + 1)}{6} = \frac{2 \cdot 3}{6} = 1$$

Since the left and right sides agree in value, the statement is true when $n=1$

Now we proceed with the inductive step...

We must show that if we know the statement holds for some particular value of $n$, say $n=k$, then the statement must also hold when $n=k+1$.

Equivalently for this problem, we need to show if the following "inductive hypothesis" is true for some value $k$ $$\sum_{i=1}^k i^2 = \frac{k(k+1)(2k+1)}{6}$$ then $$\sum_{i=1}^{k+1} i = \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}$$

To this end, we will attempt to manipulate the left side of the above equation until it looks like the right side. We can use the inductive hypothesis to provide the transition from an expression involving $\sum$ to a simpler algebraic expression.

$$\begin{array}{rcl} \sum_{i=1}^{k+1} i^2 &=& \left( \sum_{i=1}^{k} i^2 \right) + (k+1)^2\\\\ &=& \left( \frac{k(k+1)(2k+1)}{6} \right) + (k+1)^2\\\\ &=& \frac{k(k+1)(2k+1)+6(k+1)^2}{6}\\\\ &=& \frac{(k+1)[(k(2k+1)+6(k+1)]}{6}\\\\ &=& \frac{(k+1)(2k^2 +7k +6)}{6}\\\\ &=& \frac{(k+1)(k+2)(2k+3)}{6}\\\\ &=& \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}\\\\ \end{array}$$

Having met with success in both the basis and inductive steps, we can conclude by the principle of mathematical induction that the following must then be true for every positive integer $n$. $$\displaystyle{\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}}$$

QED.