This is a homework problem and I'm not sure if I am doing it correctly.
Show that $\log(n^2+1)\in \Theta(\log n)$.
I got:
$$ \log (n^2) \leq \log(n^2+1) \leq \log (n^2+n^2) $$ $$ 2\log n \leq \log(n^2+1) \leq \log(2\cdot n^2) $$ $$ 2\log n \leq \log (n^2+1) \leq \log 2 + \log(n^2)$$ $$ 2\log n \leq \log(n^2+1) \leq 1 + 2\cdot\log n$$
I'm not sure if I have proved it according to the definition that a function $f(x)$ is in $Θ(g(x))$ if there exist positive constants $a,b$, and $n_0$ such that $a\cdot g(x) ≤ f(x) ≤ b\cdot g(x)$ for all $n > n_0$.
I feel like I did something wrong here.