Home » Blog » Formula for the sum of squares from 1 to n

Formula for the sum of squares from 1 to n

Prove that

    \[ \sum_{k=1}^n n^2 = \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}. \]


Proof. We know k^3 - (k-1)^3 = 3k^2 - 3k + 1, and the from the telescoping property we have,

    \[ \sum_{k=1}^n (k^3 - (k-1)^3) = n^3. \]

So, using the additivity and homogeneity properties of finite sums, we have,

    \begin{align*}  n^3 = \sum_{k=1}^n (3k^2 - 3k + 1) & \implies n^3 = 3\sum_{k=1}^n k^2 - 3 \sum_{k=1}^n k + \sum_{k=1}^n 1 \\ & \implies \sum_{k=1}^n k^2 = \frac{n^3}{3} +  \sum_{k=1}^n k - \frac{1}{3} \sum_{k=1}^n 1  \end{align*}

But, we know that \sum_{k=1}^n k = \frac{n^2}{2} + \frac{n}{2} and we know \sum_{k=1}^n 1 = n. So,

    \begin{align*} \sum_{k=1}^n k^2 &= \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{2} - \frac{n}{3} \\ &= \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}. \qquad \blacksquare \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):