Why does $\ln x / \ln b = \log_b x$?

$\begingroup$

I'm doing some Java code. As far as I can tell, Java only has functions that do natural log and base $10$ log. I have a requirement to specify the base. I've seen that doing $\ln x/ \ln b$ is the same as $\log_b x$.

I've done this and it seems to work. I'd like to better understand why though.

$\endgroup$ 1

1 Answer

$\begingroup$

Let $y = \log_b x$. This is the same as $x = b^y$.

If you take the natural logarithm on both sides you get $$\ln x = \ln b^y = y \ln b$$ so that $y = \dfrac{\ln x}{\ln b}$. That is, $$ \log_b x = \frac{\ln x}{\ln b}.$$

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like