Logarithm equivalence

72 Views Asked by At

Is it true that $\displaystyle 3^{\log(n)} = n^{\log(3)}$? I'm writing this because I found this while I was calculating a recurrence:

enter image description here

4

There are 4 best solutions below

0
On BEST ANSWER

Hint: taking the logarithm on both sides we get $$\log(n)\log(3)=\log(3)\log(n)$$

0
On

If $a,b>0$, then $a^b=e^{b\log a}$. Therefore$$3^{\log n}=e^{\log(n)\log(3)}=e^{\log(3)\log(n)}=n^{\log3}.$$

0
On

Note that: $$\text{IF}\space 3^{\log(n)}=n^{\log3} \space \text{THEN} \space \;\log(3^{\log(n)})=\log(n^{\log3})$$ Then via the rule $\log(x^a)=a\log(x)$, we get $$\log(n)\log(3)=\log(3)\log(n)$$ which are clearly equal.

0
On

For fun:

Start with the equality:

$\log n \log 3 = \log 3 \log n.$

$\exp (\log n \log 3) = \exp (\log 3 \log n);$

$(\exp (\log n))^{\log 3}=(\exp (\log 3))^{\log n};$

$n^{\log 3} = 3^{\log n};$

Note: Assumed that $\log$ is base $e$.