Wikipedia:Reference desk/Archives/Mathematics/2023 June 11

= June 11 =

Logarithms and exponentiation
I know that $$a^{\log_b(n)} = n^{\log_b(a)}$$ (because I asked Wolfram Alpha), but I don't know why. I suspect it has something to do with $$a^{\log_b(n)} = a^{\ln(n)/\ln(b)} = a^{\ln(n)\frac{1}{\ln(b)}}$$, but that is where I lose course. --Stephan Schulz (talk) 07:02, 11 June 2023 (UTC)
 * Take the log: With $$\ln x^y = y \ln x$$ both sides end up as $$\frac{\ln a \ln n}{\ln b}$$. --Wrongfilter (talk) 07:16, 11 June 2023 (UTC)
 * Thanks a lot. I can follow that computation. It does not quite give me the the intuitive understanding I have hoped for (I probably need to do more work with logarithms), but I think I can convert it to a forward argument, which may give me more insight. --Stephan Schulz (talk) 07:44, 11 June 2023 (UTC)
 * The essence is the exponent rule $$c^{uv}=\left(c^u\right)^v=\left(c^v\right)^u.$$ Substitute $$\log_c a$$ and $$\log_c b$$ for $$u$$ and $$v$$ in the last equation, and you get $$\left(c^{\log_c a}\right)^{\log_c b}=\left(c^{\log_c b}\right)^{\log_c a},$$ which is the same as $$a^{\log_c b}=b^{\log_c a}.$$ Walking this through with $$\log_2$$ on a concrete example:
 * $$8^{\log_2 32}=(2^3)^5=(2^5)^3=32^{\log_2 8}.$$
 * --Lambiam 09:42, 11 June 2023 (UTC)
 * To clarify, Lambiam's statement applied to the equivalence talked about above is this:
 * $$a^{\log_{b}(n)} = b^{\log_{b}(a)\log_{b}(n)} = b^{\log_{b}(n)\log_{b}(a)} = n^{\log_{b}(a)}$$.
 * Another way of showing it, switching bases only once but also using more complicated log identities, is: $$a^{\log_{b}(n)} = a^{\frac{\log_{a}(n)}{\log_{a}(b)}} = n^{\frac{1}{\log_{a}(b)}} = n^{\log_{b}(a)}$$. GalacticShoe (talk) 13:51, 11 June 2023 (UTC)
 * The shortest version I can think of now uses $$x^y = e^{y\ln x}$$ and includes some of the arguments above: $$a^{\log_b(n)} = e^{\left(\frac{\ln a \ln n}{\ln b}\right)} = n^{\log_b a}$$. --Wrongfilter (talk) 15:52, 11 June 2023 (UTC)