4
$\begingroup$

I'm preparing for an exam, and one of the review problems is to sort functions by order of growth, and this was the only summation in it. I know that

$$\sum \limits_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6},$$

But what if I did not know the closed form? How, then, would I prove

$$\sum \limits_{i=1}^n i^2 \in \Theta (n^3).$$

$\endgroup$
  • 3
    $\begingroup$ Note that the hard part is showing $\sum_{i=1}^n i^2 \geq c n^3$, since trivially: $\sum_{i=1}^n i^2 \leq n \cdot n^2 = n^3$ (bounding the sum by its largest term times the number of terms). $\endgroup$ – JavaMan Dec 11 '11 at 21:46
  • 2
    $\begingroup$ Well, $\sum_{i=1}^n i^2 \leq n \cdot n^2$ (trivially) and $\sum_{i=1}^n i^2 \geq \frac{n}{2} \cdot (n/2)^2$ by taking the last half of the series. $\endgroup$ – cardinal Dec 11 '11 at 21:48
  • 1
    $\begingroup$ Hint: compare with the integral of x^2 $\endgroup$ – Bruno Joyal Dec 11 '11 at 21:49
8
$\begingroup$

There is a trick to compute easily the growth of such a sum at first order. Indeed, we have :

$$\frac{1}{n^3} \sum_{i=1}^n i^2 = \frac{1}{n} \sum_{i=1}^n \left(\frac{i}{n}\right)^2,$$

which is a Riemann sum for the function $x \to x^2$ on $[0,1]$. Hence :

$$\lim_{n \to + \infty} \frac{1}{n^3} \sum_{i=1}^n i^2 = \int_0^1 x^2 dx = \frac{1}{3}.$$

Not only does this answer your problem, but it also gives you an asymptotic equivalent of the series.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.