Change the base of a logarithm

From Applied Science

Logarithms are pretty natural when it comes to powers of two, powers of three and other common powers. If we have [math]\displaystyle{ 2^x = 5 }[/math] we know that [math]\displaystyle{ 2^2 = 4 }[/math] and that [math]\displaystyle{ 2^3 = 8 }[/math]. For [math]\displaystyle{ 2 \lt x \lt 3 }[/math] there must be some number such that raising 2 to that number yields exactly 5. The interesting property here is that we can also write [math]\displaystyle{ 3^y = 5 }[/math], which means that the number 5 can be written as many different logs with different bases each. If [math]\displaystyle{ 2^x = 5 = 3^y }[/math] the natural question is whether we can rewrite a log from one base to another. Yes, there is a formula for this.

Let's start with an arbitrary log:

[math]\displaystyle{ \log_a{b} = x }[/math]

Before going on, both the log and the exp, written with an equality sign, represent equations. The right and left sides are equal to each other, which means that we can do the same operation on both sides while keeping the equality true. Therefore:

[math]\displaystyle{ a^x = b }[/math]

[math]\displaystyle{ \log_c{a^x} = \log_c{b} }[/math]

[math]\displaystyle{ x \cdot \log_c{a} = \log_c{b} }[/math]

[math]\displaystyle{ x = \frac{\log_c{b}}{\log_c{a}} }[/math] (we can divide by a log because any log is always different than zero)

With this we have proven the formula to rewrite the log from one base into another base.

One may ask about how exactly a calculator calculates a log. This isn't something that we learn at school because it requires knowledge of limits and other concepts that are higher level mathematics. It's the same issue with trigonometry. For angles such as 30° and 90° everyone learns them, but calculations involving 20° or [math]\displaystyle{ 2^x = 5 }[/math] we need concepts that are seen in calculus and beyond. That's why exercises provide approximations for those cases if we need them to solve it.

Beyond that, when we have logarithms and computers, there comes another issue that is precision. Most of the time a logarithm yields irrational numbers and we know that it's impossible to store all digits of an irrational number because there are infinitely many digits. That discussion is probably seen on classes that cover numerical analysis.

There are certain problems that use a log in one of the steps to solve it. One common question is: What logarithm? What base? Very often we rely on the Euler's constant. Why that? Because the fact that integrating [math]\displaystyle{ 1/x }[/math] yields [math]\displaystyle{ ln(x) }[/math] and differentiating [math]\displaystyle{ e^x }[/math] yields itself makes the computation much easier. In the proof above we could have used [math]\displaystyle{ c = e }[/math] but the formula is valid for any base.