Derive a polynomials formula by setting $n = 1$, $n = 2$, $n = 3$ to determine the coefficients. Derive a formula for the sum of squares $1^2 + 2^2 + 3^2 + … + n^2$. 
Hint: assume the formula is a polynomial of degree 3, i.e. $an^3 + bn^2 + cn + d$, and use the cases of $n=0, n=1, n=2$, and $n=3$ to determine its coefficients.
 A: .I'll answer your question, but I sincerely encourage you to have an attempt at your question before you ask a question in this website.
So we assume that the sum of squares up till $n$ is given by a cubic polynomial $an^3+bn^2+cn+d$. What we do is  put n=0,1,2,3 on both sides of the equation:
$$
\sum_{i=1}^n i^2 = an^3+bn^2+cn+d
$$
We get four equations, one each for $0,1,2,$ and $3$, as follows:
$$
n=0 \implies d=0
$$
$$
n = 1 \implies a+b+c+d=1^2=1 
$$
$$
n=2 \implies 8a+4b+2c+d=1^2+2^2=5
$$
$$
n=3 \implies 27a+9b+3c+d=1^2+2^2+3^2=14
$$
So we have to solve the system:
$$
a+b+c=1 ; 8a+4b+2c=5;27a+9b+3c=14.
$$
Eliminte $c $ from the second and third equations using  the first equation directly:
$$
6a+2b=3;24a+6b=11
$$
Solving, $a=\frac{1}{3}$,$b=\frac{1}{2}$,and then by substituting back,$c=\frac{1}{6}$. So our final formula is $\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} = \sum_{i=1}^{n} i^2$
A: Another derivation is using proof by induction; these are the $\color{green}{\mathrm{three}}$ steps to carry out: 
Step 1: Basis Case: For $i=1$: $$\sum^{i=k}_{i=1} i^2=\frac{1(1+1)(2\times 1+1)}{6}= \frac{2\times 3}{6}=1$$ So statement holds for $i=1$.
Step 2: Inductive Assumption: Assume statement is true for $i=k$: 
$$\sum^{i=k}_{i=1} i^2=\frac{k(k+1)(2k+1)}{6} $$
Step 3: Prove Statement holds for $i=k+1$. You need to prove that for $i=k+1$: $$\sum^{i=k+1}_{i=1} i^2=\color{blue}{\frac{(k+1)(k+2)(2k+3)}{6}}$$
To do this you cannot use: $$\sum^{i=k}_{i=n} i^2=\color{red}{\frac{n(n+1)(2n+1)}{6}} $$ as this is what you are trying to prove.
So what you do instead is notice that:
$$\sum^{i=k+1}_{i=1} i^2= \underbrace{\frac{k(k+1)(2k+1)}{6}}_{\text{sum of k terms}} + \underbrace{(k+1)^2}_{\text{(k+1)th term}}$$
$$\sum^{i=k+1}_{i=1} i^2= \frac{k(k+1)(2k+1)}{6}+\frac{6(k+1)^2}{6}$$
$$\sum^{i=k+1}_{i=1} i^2= \frac{(k+1)\left(k(2k+1)+6(k+1)\right)}{6}$$
$$\sum^{i=k+1}_{i=1} i^2= \frac{(k+1)(2k^2+\color{green}{7k}+6)}{6}=\frac{(k+1)(2k^2+\color{green}{4k+3k}+6)}{6}=\frac{(k+1)\left(2k(k+2)+3(k+2)\right)}{6}=\color{blue}{\frac{(k+1)(k+2)(2k+3)}{6}}\quad \forall \space k \in \mathbb{N}$$
Which is the relation we set out to prove. So the method is to substitute $i=k+1$ into the formula you are trying to prove and then use the inductive assumption to recover the $\color{blue}{\mathrm{blue}}$ equation at the end.
