# Finding the Big-O notation with logarithms involved.

I am trying to understand algorithms and especially the Big-O notation and I came across this question that included logs:

The question wants me to prove that the Big-O notations for $\log_3 x$ is $\log_2 x$. I know how to solve the ones with no logs, but I am very confused on how to approach the ones with logs. Thank you so much in advance!

Do I start by breaking it down?

$\log_3 x$ is $O(\log_2 x)$, where $3$ and $2$ are the log bases.

## 1 Answer

Hint: Use the change of base formula for logs \begin{align} \frac{\log_2 y}{\log_2 3} = \log_3 y. \end{align}

• I don't really understand what you mean :( @JackyChong – Emily Mar 7 '17 at 2:26
• Since $\frac{1}{\log_2(3)}$ is a constant ... – gue Mar 7 '17 at 6:32