Big O, Omega, and Theta Notation Problem So I'm trying to understand a solution made by my teacher for a question that asks me to determine whether the following is true. I'm having trouble understanding where some values in the steps are coming from.
Like for the first part, I don't really get where n≥5 came from. My guess is getting 16n^2 + 25 to equal 16n^2 + n^2 by substituting n with 5. But I was wondering why 25 turned into n^2 in the first place?
I also have no idea where k = 5 came from.
For the second part of the solution, I'm also having similar struggles. Why did 16n^2 turn into 15n^2 + n^2? I'm also not sure where n≥41 and k=41 came from. I would really appreciate some clarification because I'm having trouble understanding this unit. 


We say $f(x)=O(g(x)),$ if there exists a $k \in \mathbb{N}$ and $c \in \mathbb{R}$, s.t. for any $n\geq k$, we have $f(n)\leq c g(n)$.
for the first one, whenever $n \geq 5$, we have $5^2\leq n^2$, which gives $16n^2+25 \leq 16n^2+n^2=17n^2$, as stated by your professor.  He chose $k=5$ and $c=17$, and whenever $n \geq$5, we have $f(n)\leq 17g(n) $, so by defintion $f(x)=O(g(x))$
Similarly, we say $f(x)=\Omega(g(x)),$ if there exists a $k \in \mathbb{N}$ and $c \in \mathbb{R}$, s.t. for any $n\geq k$, we have $f(n)\geq c g(n)$.
Then $f(n)=16n^2-40n+15 \geq 16n^2-40n=15n^2+n^2-40n \geq n^2-40n$ (this is because $15n^2 \geq 0$).
Therefore $f(n)\geq n^2-40n=n(n-40)$. $n$ is always non-negative, therefore $f(n)$ being the product of $n$ and $n-40$ is guaranteed to be positive as long as $n-40>0$, is as long as $n\geq 41$.
Therefore $f(n)=15n^2+n^2-40n+25\geq15n^2+n^2-40n$, and $n^2-40n$ is non-negative as long as $n>41$. So for any $n>41$, we have $f(n)\geq 15n^2$, so for $c=15$, and $k=41$, we have $f(n) \geq15g(n)$, so by definition $f(n)=\Omega(n^2)$.
Put everything together to conclude that $f(n)=\Theta(n^2)$.
