View attachment 28954
I understand we take the log of both side. And I get log n/ log 2 instead. Is there a formula...but somehow how come it suppose to be log n (base 2)?
When you solve an exponential equation, you can use any base for the log that you want. If you are using "log" to mean the "common",
base 10, log, then you have found a way to solve the equation [imath]2^x=n[/imath] for x in terms of that log, and can calculate the value with a scientific calculator. The same is true if you are using "log" to mean the "natural",
base e, log.
If you don't want to use a calculator to evaluate your answer, then you can instead take the
base 2 log of both sides. Then you get [imath]\log_2(2^x) = \log_2(n)\;\Leftrightarrow\;x=\log_2(n)[/imath], which is what you were expecting.
You might also notice that if you take the logs in your answer to have base 2, then you get exactly what you expected: [imath]x=\frac{\log_2(n)}{\log_2(2)}=\frac{\log_2(n)}{1}=\log_2(n)[/imath].
The log you use will be the log you get! And you typically have this choice between using base 10 or e in order to get a decimal answer, or using the base of the exponential function to get the simplest form of the answer.