Recall that a logarithm is an exponent:
for example,
[beautiful math coming... please be patient]
$\,\log_2 8\,$ (log base two of eight) is the power that $\,2\,$ must be raised to, to get $\,8\,$.
In this case, the numbers work out nicely: $\log_2 8 = 3\,$, since $\,2^3 = 8\,$.
But what if, say, you need to know $\,\log_2 9\,$?
You know it will be a little more than $\,3\,$, but suppose you need a six decimal place approximation?
Most calculators have only two built-in logarithms:
The good news is that it is very easy to rename a logarithm as an expression involving a different base.
All that is needed is the Change of Base Formula for Logarithms, which is the subject of this section.
Here's a preview of coming attractions: [beautiful math coming... please be patient] $$ \begin{gather} \text{changing to natural logs:}\cr\cr \log_2 9 \ \ =\ \ \frac{\ln 9}{\ln 2} \overset{\text{calculator}}{\ \ \ \ \strut\approx\ \ \ \ } 3.169925\cr\cr\cr \text{changing to common logs:}\cr\cr \log_2 9 \ \ =\ \ \frac{\log 9}{\log 2} \overset{\text{calculator}}{\ \ \ \ \strut\approx\ \ \ \ } 3.169925 \end{gather} $$
Indeed, you can change to any allowable base: e.g., [beautiful math coming... please be patient] $$\log_2 9 = \frac{\log_7\, 9}{\log_7\, 2}$$ However, this isn't a useful name for calculator computation.
You probably already see the pattern from these three examples.
Here's the precise statement:
The following equations are equivalent:
| [beautiful math coming... please be patient] $y=\log_b\,x\,$ | Give a name, $\,y\,$, to the left-hand side of the Change of Base formula. |
| $b^y=x\,$ | Write the equivalent exponential form of the equation. |
| [beautiful math coming... please be patient] $\log_a\, b^y = \log_a\,x$ | Apply the function $\,\log_a\,$ to both sides of the equation. (For more advanced readers: equivalence comes from the fact that $\,\log_a\,$ is a one-to-one function.) |
| $y\ \log_a\, b= \log_a\,x$ | Use a property of logs to bring the $\,y\,$ down. |
| $\displaystyle y = \frac{\log_a\,x}{\log_a\,b}$ | Divide both sides by $\,\log_a\,b\,$. Compare with the first step! |
WolframAlpha has no trouble with logarithms, no matter what the base is.
For example, try each of these:
log base 2 of 9
common log of 100
natural log of e^2