[Math] Prove that $7n^2 + 2n + 3 = O(n^2)$ using the definition of O notation.

asymptoticsdiscrete mathematics

Prove that $7n^2 + 2n + 3 = O(n^2)$ using the definition of O notation. I need to use two constants and prove that they satisfy the O definition.

I'm new to big O and want to know whether I am approaching the problem the right way. Is below how I prove the problem? If not, what do I need to keep in mind or what should I do differently? I'm basing my answer off of what I've been reading, so I could be way off.

Proof: by the big-oh definition, $T(n)$ is $O(n^2)$ if $T(n) \leq c * n^2$ for some $n \geq n_0$ . Let us check this condition: if $7n^2 + 2n + 3 \leq c * n^2$ then $7 + 2/n^2 + 3/n^2 \leq c.$ Therefore, the big oh condition holds for $n \geq n_0 = 1$ and $c \geq 12 (= 7 + 2 + 3)$

Best Answer

For all $n \ge 1$, we have $2n \le 2n^2$ and $3 \le 3n^2$. Therefore, $7n^2+2n+3 \le 7n^2+2n^2+3n^2 = 12n^2$.