Big O Proof , f(n) = 2n + 1 and I have to prove f(n) is O n^2 If I have $f(n) = 2n + 1$ and I  have to prove $f(n) \in O(n^2)$, by proving there exists positive constants $c$ and $n_0$ such that $f(n)&lt;cn^2, \forall n\ge n_0$, can I do this all in one step by putting in values of $c$ and $n_0$ at once or do I have to put in values of c first and then get n on one side and put in values for $n_0$, the for all $n \ge n_0$ confuses me.
It all depends on the case and how easy it is to search $n_0$ or use $c$, in your case you can show that $2n + 1$ belongs to $n^2$, taking the constant $c = 1$, so that in the proof of BigO, $g (n)$ dominates $f(n)$, what is the same $2n + 1 \le c (n^2)\to  2n + 1 \le n^2$; now you can search a $n_0$.