Dealing with big O

55 Views Asked by At

Is this true or false?

$(n(n+1)(n+2))/6$ is $O(n^3)$ (big O)

I have broken it down to this

$(n^3 + 3n^2 + 2n) / 6$

but am unsure what to do next to prove/disprove this statement.

2

There are 2 best solutions below

2
On

Hint

Do you think that $$n\longmapsto \frac{\frac{n^3+3n^2+2n}{6}}{n^3}$$ is bounded when $n\geq 1$ ?

0
On

Working off of Surb's answer, take

$$\lim_{n \to \infty} \frac{\frac{n^3+3n^2+2n}{6}}{n^3}$$

$$\lim_{n \to \infty} \dfrac{n^3+3n^2+2n}{6n^3}$$

$$\lim_{n \to \infty} \dfrac{n^3}{6n^3} + \dfrac{3n^2}{6n^3} + \dfrac{2n}{6n^3} $$

$$\lim_{n \to \infty} \dfrac{1}{6} + \dfrac{1}{2n} + \dfrac{1}{3n^2} $$

As $n$ approaches $\infty$, $\dfrac {1}{2n}$ and $\dfrac {1}{3n^2}$ both go to zero, so the result is $\dfrac 16$.