Why is wolfram plotting a wrong graph for $f(x) =8^{\log_{8}({x-3})}$?

294 Views Asked by At

I'm manually plotting various functions' graphs and use desmos and wolfram to validate whether I've analyzed the function in a correct way. But then I came to the following function and it seems that wolfram is showing a wrong result:

$$ f(x) =8^{\log_{8}({x-3})} $$

After defining the range of the arguments the function may be reduced to $f(x) = x-3$ where $x \gt 3$, which eventually appears to be a linear function.

It's clear that the range of $x$ is restricted to $x>3$ in $\mathbb R$ since $\log(x)$ is not defined for $x \le 0$. But wolfram alpha expands the line below the X-axis and shows that the function exists for $x \le 3$

Am I missing something or is that just wolfram reducing the function and plotting the graph for the result?

5

There are 5 best solutions below

7
On BEST ANSWER

Because Wolfram can deal with complex numbers. $$\log_8(-|x|)=\log_8(|x|e^{i\pi})=\log_8|x|+\log_8e^{i\pi}=\log_8|x|+i\pi\frac{1}{\ln 8}$$

6
On

Well I don't understand what is Wolfram doing. In my opinion it is wrong. If that would be right graph it would mean that the domain of this $f$ is whole $\mathbb{R}$ which is not true.

It is $f(x)=x-3$ for $x>3$. However Desmos and Geogebra are drawing correctly.

0
On

Judging from Wolfram Alpha's result when evaluating the offending function at $x=0$, it appears Wolfram Alpha is taking a complex logarithm for the negative input values, which happens to get turned back into a real value after exponentiation.

Edit: As Clarinetist's answer indicates, it does look like Wolfram Alpha is internally simplifying the expression to $x-3$. The fact that it has no problem evaluating $\log_8(-3)$ as a complex number may be part of the "justification" it uses to conclude that this is a valid simplification, but I'm not sure anyone except a Wolfram programmer could really tell you what's happening internally.

0
On

Wolfram appears to be "simplifying" it before plotting. To demonstrate this, click "Open Code" at the bottom right.

enter image description here

The circled part below speaks for itself:

enter image description here

0
On

Follow how a logarithm is defined, it is elementary..

$$ f(x)=y = =8^{log_{8}({x-3})} $$

By definition of logarithm for the relation

$$ {log_{8}({x-3})}={log_{8}(y)} $$

you recognize that you have taken log of something to another common base. So cancel those appendages ( Valid for monotonic single valued real log function)

$$ y= x-3$$

is a straight line ( defined for all $x,y$) plotted by WA after removing the embellishments.