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.

.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$
