By example:
- $4^{\log_2(n)}$ evaluates to $n^2$
- $2^{\log_2(n)}$ evaluates to $n$
What is the rule behind this?
By example:
What is the rule behind this?
On
$\log_ab=x$ from definition is equivalent with $a^x=b$
then replacing $x$ from first equation in second equation we get $$a^{\log_ab}=b$$ and replacing $b$ from second equation in first equation we get $$\log_aa^x=x$$
Let, $\log_ab^c=y\iff a^y=b^c=(a^x)^c=a^{xc}\implies y=xc$ if $a\ne0,1$
So, $\log_ab^c=y=cx=c\log_ab$ so
$$\log_ab^c=c\log_ab$$ then using three last equations we get $$4^{\log_2(n)}=2^{2\log_2n}=2^{\log_2n^2}=n^2$$ $$2^{\log_2n}=n$$
On
Here's a method that relies more on applying an appropriate strategy than on formulas.
If you want to rewrite $4^{\log_2(n)}$ as a power of $n$, then you simply want to solve for $u$ in the following equation:
$$4^{\log_2(n)} = n^u$$
The standard way of solving for something that appears in the exponent of an exponentiated expression is to take the logarithm (to some fixed base) of both sides. Since $\log_2$ already shows up, we may as well take the logarithm-base-$2$ of both sides (otherwise, two different kinds of logarithms will show up, and we'd have to take care of this later): $$\log_{2}\left(4^{\log_2(n)}\right) = \log_{2}\left(n^u\right)$$ $$\log_{2}(n) \cdot \log_{2}(4) = u \cdot \log_{2}(n)$$ $$\log_{2}(4) = u$$ $$2 = u$$ In the last step I used the fact that $\log_2(4) = \log_{2}(2^2) = 2$. However, if I didn't know this, or if the numbers weren't nice (i.e. we got something like $\log_2(5) = u$), we'd still have what we wanted -- a numerical expression for the exponent of $n.$ The same method allows you to (even more easily) determine that $2^{\log_2(n)} = n.$ Here's an application of the same method to some second semester calculus (in the U.S.) semi-challenging $p$-series convergence/divergence problems.
The rules are:
therefore $4^{\log_2(n)} = 2^{2\log_2(n)} = 2^{\log_2(n^2)} = n^2$.