Finding $c$ and $n_0$ for a big-O bound A book I am reading demonstrates how $5n^3 + 2n^2 + 22n + 6 = O(n^3)$, which I believe is true. After all, there exists a value $c$ for which $cn^3$ is always greater than $5n^3 + 2n^2 + 22n + 6$ for all $n$ greater than or equal to some value $n_0$.

However, the book then casually notes that $c = 5$ and $n_0 = 10$. Where did these values come from? What algebraic calculations were done (if any) to derive the $c$ and $n_0$ values?
$c=5$ is clearly the wrong answer, since for any $n$,
$$cn^3 &lt; 5n^3 + \text{(positive terms)}$$

However, if we take $c&gt;5$ then there will exists some $N_0$ such that for $n&gt;N_0$
$$cn^3 \ge 5n^2+2n^2+22n+6$$

If we let  $g(n)=(c-5)n^3-2n^2-22n-6$, then Since $\lim_{n\to\infty} g(n)=\infty$,  by the limit definition there always exists $N_0$ such that for any $n&gt;N_0$, $g(n) &gt;0$. This implies the above claim. 

To find that $N_0(c)$ you can try to find the roots of $g(n)$. $N_0$ will be the most positive root.