I'm currently covering Big-Oh and proofs by Big-Oh. I think I understand the proofs using Big-Oh, but I am struggling to understand how you figure out the Big-Oh of a function. We went through it during lectures but it's the one thing that I've revisited multiple times and I still don't understand.
The example that we went through is this: what is the Big-Oh of f(n) = n^2 + n?
The first step that my lecturer did is convert the function into this: f(n) = n^2 * (1 + 1/n). I understand why n^2 has gone outside (as it is the faster growing term between itself and n) but i'm struggling to understand how the (1 + 1/n) is created.
After this, the following is done f(n) is O(n^2 * 1 ) = O(n^2) which I understand.
I'm not sure if this is something that a lot of people generally follow or if it's something just specific to my lecturer, but i'd appreciate any advice.
Sorry for my bad formatting, i'm not sure how to make the equations look nice.