Why is the graph of 2logx different from log(x^2)? [duplicate]

$\begingroup$

According to Logarithmic exponent rules: log(x^y) = y ∙ log(x)

For example: 2 log x = log x^2

However take the following graphs:

y=2logxenter image description here

y=logx^2enter image description here

The graphs seems to display something that should not be the case, what am I missing or misunderstanding? I am quite confused.

$\endgroup$ 4

3 Answers

$\begingroup$

$\log$ is only defined for positive inputs. Therefore taking $2\log x$ is bad when $x$ is negative, but $\log x^2$ is fine as $x^2$ is positive. Therefore the graphs are the same for positive $x$, but different for negative $x$.

$\endgroup$ $\begingroup$

The domain of $\log x$ and $\log x^2$ is different in the sense that you can plug in negative numbers into $\log x^2$ but not $2\log x$

$\endgroup$ $\begingroup$

In general, the "laws" of exponents and logarithms that you know and love are OK for powers and logarithms of positive numbers, but things are more complicated when negative or complex numbers are involved. For example, $(a^b)^c = a^{bc}$: but not when $a = -1$, $b = 2$, $c = 1/2$. To make sense of this, you have to consider multivalued functions in complex analysis.

$\endgroup$ 2

You Might Also Like