Prove that $1^3 + 2^3 + \cdots+n^3$ is $O(n^4)$

79 Views Asked by At

I suppose I am not exactly familiar with the process for finding the "Big-O" of this problem. Isn't the highest term still to the 3rd degree? $(n^3)$ which would make me think that it is $O(n^3)$, since that seems to be the upper bound...?

1

There are 1 best solutions below

3
On

We have $$ 1^3 + 2^3 + \cdots + n^3 = \sum_{i=1}^n i^3 \le \sum_{i=1}^n n^3 = n \cdot n^3 = n^4 $$ for all $n$. Hence, $\sum_{i=1}^n i^3 \in O(n^4)$.