Show that $(n+1)^3= O(n^3)$ by definition

42 Views Asked by At

Show that following is true

Show that $(n+1)^3= O(n^3)$ by definition

Attempt to show

By definition the mentioned statement is true when:

$$ \exists(c,n_0) : (n+1)^3 \ge cn^3 \text{ when } n> n_0 $$

let $n=1,n_0 = 0$, then we have

$$ (n+1)^3 \ge n^3 \text{ when } n > 1 $$

$$ \iff (n^2+2n+1)(n+1)-n^3 \ge 0 $$ $$ \iff n^2\cdot n + 2n \cdot n + 1 \cdot n + n^2 + 2n + 1 -n^3 \ge 0 $$ $$ \iff n^3-n^3+3n^2+3n+1 \ge 0 $$ $$ \iff 3n^2+3n+1 \ge 0 $$

Then check when $3n^2+3n +1 = 0$

$$ 3n^2+3n+1 = 0 \iff n = \frac{-3 \pm \sqrt{3^2-4\cdot 3 \cdot 1}}{2 \cdot 3} $$

We notice that $3^2-4\cdot 3 \cdot 1 < 0$ which implies $3n^2+3n+1 > 0$ when $n \in \mathbb{R}$ which implies statement has to be true when $n > 1$


Is this correct?

1

There are 1 best solutions below

0
On BEST ANSWER

Seems fine but it is easier to note that $$ n+1\leq 2n $$ for $n\geq 1$ whence $$ (n+1)^3\leq (2n)^3=8n^3 $$ for $n\geq 1$ as desired.