2022-01-16

I encountered while learning about definite integrals:
$\sum _{k=1}^{n}{k}^{2}=\frac{n\left(n+1\right)\left(2n+1\right)}{6}$

Annie Levasseur

Expert

The standard method is induction and you should look it up as it is a popular second example (first is $\sum n$ )
Another argument is use:
$24{n}^{2}+2={\left(2n+1\right)}^{3}-{\left(2n-1\right)}^{3}$
and get a telescoping sum.
$26\sum _{1}^{n}{k}^{2}+2n=\sum _{1}^{n}{\left(2k+1\right)}^{3}-\sum _{1}^{n}{\left(2k-1\right)}^{3}$
$24\sum _{1}^{n}{k}^{2}+2n={\left(2n+1\right)}^{3}-1$
$24\sum _{1}^{n}{k}^{2}=8{n}^{3}+12{n}^{2}+4n$
$24\sum _{1}^{n}{k}^{2}=4n\left(n+1\right)\left(2n+1\right)$
$\sum _{1}^{n}{k}^{2}=\frac{n\left(n+1\right)\left(2n+1\right)}{6}$

abonirali59

Expert

Another simple proof could be as follows: note that each square can be written as a sum of odd numbers:
$\sum _{k=1}^{n}\left(2k-1\right)={n}^{2}$
When writing each square as a sum of odd numbers we get that
$S=\sum _{k=1}^{n}{k}^{2}=1+\left(1+3\right)+\left(1+3+5\right)+\dots$
$=\sum _{k=1}^{n}\left(n-k+1\right)\left(2k-1\right)=\left(2n+3\right)\sum _{k=1}^{n}k-\left(n+1\right)\sum _{k=1}^{n}1-2S$
Therefore
$=\frac{\left(2n+3\right)n\left(n+1\right)}{2}-n\left(n+1\right)=\frac{\left(2n+1\right)n\left(n+1\right)}{2}$

alenahelenash

Expert

My contribution: $\sum _{k=1}^{n}{k}^{2}=\frac{1}{4}\sum _{k=1}^{n}\left(2k{\right)}^{2}$ $=\frac{1}{4}\sum _{k=1}^{n}\left(\left(2k\right),\left(2\right)\right)+\left(\left(2k+1\right),\left(2\right)\right)$ $=\frac{1}{4}\sum _{k=1}^{2n+1}\left(\left(k\right),\left(2\right)\right)$ $=\frac{1}{4}\left(\left(2n+2\right),\left(3\right)\right)$ $=\frac{1}{4}\cdot \frac{\left(2n+2\right)\left(2n+1\right)\left(2n\right)}{1\cdot 2\cdot 3}=\frac{\left(n+1\right)\left(2n+1\right)n}{1\cdot 2\cdot 3}$ $=\frac{1}{6}n\left(n+1\right)\left(2n+1\right)$