Log base (-2) of 4
logarithms - how to simplify log base 2 and log base 4 - Mathematics Stack Exchange
algebra precalculus - How is $2^{\log_4 n}= n^{\log _42}$? - Mathematics Stack Exchange
Path of Exile 2
How do I calculate the logarithm in base 2?
To calculate the logarithm in base 2, you probably need a calculator. However, if you know the result of the natural logarithm or the base 10 logarithm of the same argument, you can follow these easy steps to find the result. For a number x:
-
Find the result of either
log10(x)orln(x). -
Divide the result of the previous step by the corresponding value between:
-
log10(2) = 0.30103; or -
ln(2) = 0.693147.
-
-
The result of the division is
log2(x).
What is the logarithm in base 2 of 256?
The logarithm in base 2 of 256 is 8. To find this result, consider the following formula:
2x = 256
The logarithm corresponds to the following equation:
log2(256) = x
In this case, we can check the powers of 2 to see if we can find the value of x: 20 = 1, 21 = 2, 22 = 4, …, 27 = 128, and 28 = 256.
Since we found the argument of our logarithm, we can write that:
log2(256) = 8.
Why is the logarithm in base 2 important?
In a computer world, binary code is of essential importance: words, numbers, pictures, and everything else can be reduced to a string of 0s and 1s. Since the binary code uses only two digits, the number 2 appears consistently in computer science.
The widespread appearance of log2 in computer science has no strong mathematical reason (since logarithms can change base by multiplication) but can be useful. For example, using log2 to compute entropy allows us to obtain the result expressed in bits, which are the natural unit.
Videos
Shouldn't this just be 2? My calculator is giving me a complex number. Why is this the case? Because (-2) squared is 4 so wouldn't the above just be two?
$\log_2(2x+1)-5\log_4x^2+4\log_2x$
$=\log_2(2x+1)+\log_2x^4-5\frac{\log_yx^2}{\log_y4}$
as $\log a+ \log b=\log ab,m\log a=\log a^m$ and $\log_yz=\frac{\log_xz}{\log_xy}$ where $x\neq 1$ as $\log_1y$ is not defined.
$=\log_2(2x+1)x^4-5\frac{\log_yx^2}{\log_y2^2}$
$=\log_2(2x+1)x^4-5\frac{2\log_yx}{2\log_y2}$
$=\log_2(2x+1)x^4-5\log_2x$
$=\log_2(2x+1)x^4-\log_2x^5$
$=\log_2\frac{(2x+1)x^4}{x^5}$
$=\log_2\frac{(2x+1)}{x}$
Suppose that $x>0$ is some number, and $\log_4x=y$. That means that $4^y=x$. Now $4=2^2$, so $x=4^y=\left(2^2\right)^y=2^{2y}$, and that means that $\log_2x=2y$. In other words, we’ve just demonstrated that for any $x>0$, $\log_2x=2\log_4x$.
Now you have $\log_2(2x+1)-5\log_4x^2+4\log_2x$, which mixes logs base $2$ with logs base $4$; it would be much easier to simplify if all of the logs were to the same base. Use the result of the first paragraph to change $\log_2(2x+1)$ to $2\log_4(2x+1)$ and $\log_2x$ to $2\log_4x$; then you have
$$2\log_4(2x+1)-5\log_4x^2+8\log_4x\;,$$
and you can use the usual properties of logs to express this as the log base $4$ of a single expression.
Going back to $\log_2x=2\log_4x$, if you happen to notice that $2\log_4x=\log_4x^2$, you simply replace $5\log_4x^2$ by $5\log_2x$ to get
$$\log_2(2x+1)-5\log_2x+4\log_2x\;,$$
which is even easier to simplify. The answers that you get by these two approaches won’t be identical, since one will be a log base $4$ and the other a log base $2$, but they’ll be equal, and you can use the relationship $\log_2x=2\log_4x$ to verify this.
Take the logarithm in base $4$: \begin{align} &\mathrm{(LHS)} & \log_4(2^{\log_4n})=(\log_4n)(\log_42) \\ &\mathrm{(RHS)} & \log_4(n^{\log_42})=(\log_42)(\log_4n) \end{align} Since the logarithms are equal, the numbers are equal.
Notice, log rule: $\color{red}{\log_{a^n}(b)=\frac 1n\log_a(b)}$ hence, simplifying LHS & RHS as follows
$$LHS=2^{\log_4n}=2^{\log_{2^2}n}=2^{\frac{1}{2}\log_2n}=2^{\log_2n^{1/2}}=n^{1/2}=\color{blue}{\sqrt n}$$ $$RHS=n^{\log_42}=n^{\log_{2^2}2}=n^{\frac{1}{2}\log_22}=n^{\frac 12}=\color{blue}{\sqrt n}$$