How to determine time complexity with a simple way? I'm learning about time complexity but all the cases we did in class were rather simple. Now I'm working on my home work and the cases our teacher let us have was: $$f(n) = 4n(n + 2 \log^2 n^2) + e^{−n} + 8 \sin(2πn/256). $$

Is there a simple way how a I can determine which one of this is the true one? Because this look much more complicated then the ones we did in our class.


$f(n) =o(n\log_2n)$
$f(n) =o(2^n)$
$f(n) =o(n^4)$
$f(n) =O(n\log_2 n^n)$
$f(n) =O(2n + 1)$
Asymptotic notation satisfies the following two useful properties:
$$
\Theta(f(n)) + \Theta(g(n)) = \Theta(\max(f(n),g(n)) \\
\Theta(f(n)) \Theta(g(n)) = \Theta(f(n)g(n))
$$
Using these, you can determine that $f(n) = \Theta(4n^2\log^2 n)$.

Now you can check each of 1.-5. individually, using the fact that $n^a\log^bn = O(n^c\log^dn)$ iff $a &lt; c$ or $a=c$ and $b \leq d$.