Warm-up

Can you convince yourself that \(n^2 ≤ \displaystyle\sum_{r=1}^{n} r^2 ≤ n^3\)?

Think about representing the sum of the first \(n\) square numbers as bars of width \(1\) and height \(r^2\).

the first n square numbers represented as bars of width 1 and height r squared. A rectangle is drawn around the bars with width n and height n squared

\[\displaystyle\sum_{r=1}^{n} r^2 = 1+4+9+16+\cdots+n^2\]

Written in this form we see that \(n^2 ≤ 1+4+9+\cdots+n^2\).

the first n square numbers represented as bars of width 1 and height r squared. A rectangle is drawn around the bars with width n and height n squared

We might also have seen this from the diagram above as the last bar has an area of \(n^2\).

When is \(n^2 = \displaystyle\sum_{r=1}^{n} r^2\) and when is \(n^2 < \displaystyle\sum_{r=1}^{n} r^2\)?

The second half of the inequality can also be determined from this diagram. The sum of the square numbers is enclosed by a rectangle made up of the axes, the dotted line, and the last bar. This rectangle has an area of \(n^3\) and so \(\displaystyle\sum_{r=1}^{n} r^2 ≤ n^3\)

Putting this together gives us \(n^2 ≤ \displaystyle\sum_{r=1}^{n} r^2 ≤ n^3\).