For my algorithm analysis course, I've derived from an algorithm the function f(n) = n^2 - n + 2. Now I need to prove or disprove f(n) ∈ O(n). Obviously it's not, so I've been trying to disprove that for a few hours and can't figure out how to do it.
To disprove it, I need to prove the negative:
∀M > 0, ∀N > 0, ∃n > N s.t. n^2 - n + 1 < M·n
I've tried working backwards and forwards, but can't seem to get anywhere. I've also tried to prove that, against my judgment, f(n) ∈ O(n):
∃M > 0, ∃N > 0 s.t. ∀n > N, n^2 - n + 1 ≥ M·n
... with no success. What am I doing so horribly wrong?