Logarithm Graphs in Wolfram Alpha
At the Wolfram Alpha Workshop at ICTCM, there was universal disappointment about the fact that you cannot get a graph of a logarithm that is only over the real numbers. We tried everything we could think of to remove the complex part of the graph.
Personally, I have tried and tried and tried and tried to explain the problem with this in the feedback window for Wolfram Alpha, but been universally unsuccessful. Every time I suggest a change, I am told that the “After review, our internal development group believes the plots for input “log(x)” are correct.” … yes, I know that … that doesn’t mean it’s the answer that most people will be looking for.
I find it ironic that “inverse of e^x” produces the graph we’d like to see, and even gives log(x) as an equivalent.

But then ask for a graph of log(x) or ln(x) and the graph will always include the solution over the complex numbers.

What’s worse is that W|A inconsistently decides when to use reals only and when to use both complex and real numbers. For example, the output for y=ln(x), y=x includes the complex numbered plot, while the output for y=ln(x), y=2x-3 includes only the Reals. What!?! Actually, I have some idea why this is … it seems that in some cases, if the extra graph intersects the real part of the log graph, then you get reals only. If the graphs do not intersect, then you get real+complex. For example compare the output for y=ln(x), y=2x-3 to the output for y=ln(x), y=2x+5. On the other hand, when I tried to show a graph transformation, like y=ln(x) with y=ln(x)+4 (including the extra graph y=4x-3), I was back to getting the graphs with complex numbers again. Maddening.

We spend a LOT of time in the algebra and precalculus levels working with transformations of graphs, understanding inverse functions, and specifics like the domain of a graph. We can’t use Wolfram Alpha for any of these topics with regards to logarithms because of the way the graphs look. I can live with the fact that W|A uses log(x) instead of ln(x) … it’s not great, and is confusing to students, but I can explain it and live with it. But as long as the Wolfram Alpha graph includes the complex number system with no way to see the graphs on only the reals, we’ll have to pull out that old-fashioned graphing calculator to teach this section, and that’s a shame.
I’ve also heard the argument that we should just include the domain we want to see in the W|A input. For example, y=ln(x), x>0. But how is a student, learning logs for the first time, supposed to recognize that this is required? After all, the graph they see when they first try W|A with y=ln(x) leads them to believe that y=ln(x) has a domain that includes all real numbers but zero. This argument also means that to show graph transformations, we need to use much more complicated graphing commands, restricting each domain separately (to tell you the truth, I have not yet figured out a way to do it … although I suspect it’s possible).
It seems to me that there are two obvious solutions to this math teaching nightmare, and I can’t imagine why either one wouldn’t serve all parties using Wolfram Alpha (both high-level mathematicians, and the rest of us):
Solution #1: Use a toggle-able option to see the graph with only reals or both complex and reals (I would prefer a default to the Real numbers graph, since my guess would be that the majority of the world’s population would be looking for that one).

Solution #2: Display TWO graphs. Show a graph of the logarithm that is only on the real number system. Then, below it, show a graph that includes both the complex and real number systems.

That’s all – end of rant. This is the one thing I absolutely hate about Wolfram Alpha. And I’m guessing that I’m not alone here. Please can’t we just find a solution without hearing “After review, our internal development group believes the plots for input “log(x)” are correct.” again?
Possibly Related Posts:
- Navigating WolframAlpha Pro Features
- Abandoning ship on using Wolfram Alpha with Students
- Timeline of the Rise of Data
- Wolfram Alpha in a Nutshell
- Giving up Calculation by Hand





For what it’s worth, if you click on the graph to get the Mathematica input for the graph, you can c&p that into the W|A input and edit the domain of the graph, like so:
http://www.wolframalpha.com/input/?i=PlotLogx%2C+{x%2C+0%2C5}]
This still obviously isn’t intuitive for the students, but it might be worth showing them since it’s a technique that also lets them customize any other plots they’re interested in looking at.
Agree generally, but
I can live with the fact that W|A uses log(x) instead of ln(x) … it’s not great, and is confusing to students, but I can explain it and live with it.
ln(x) is a textbook / calculuator thing. I have never seen ln(x) outside of one.
So I consider Wolfram Alpha’s behavior of taking ln(x) and writing it as log(x) to be an ok one.
Here’s that link again in a form that maybe will work properly:
http://bit.ly/9nUBRi
Also, here’s the documentation for the Plot command:
http://reference.wolfram.com/mathematica/ref/Plot.html
Hrm, ironically, if you try this example from the docs that is *supposed* to limit the range to the reals, W|A breaks:
Plot[Sqrt[x], {x, -5, 5}, PlotRange -> Automatic]
http://bit.ly/c0yHt7
The change in using log(x) instead of ln(x) largely occurred through the use of programming languages. Because ln looks like “one n”, to avoid confusion, log was chosen to represent the natural log since the change of base formula could convert this to any other base. This also made for easier debugging back in the days of punchcards. (Been there, done that.)
In mathematics, log(x) has traditionally represented the common logarithm or base-10 log. This was true even back in the slide rule days.
One other workaround, but not a very elegant one, is to use ContourPlot to produce the graph of ln(x). For example:
ContourPlot[{y=ln(x)},{x,-10,10},{y,-10,10}]
plots ln(x) for x values from -10 to 10, and omits the imaginary part. Of course, the x-axis and y-axis are also gone.
You can view the output at: http://bit.ly/bMMPt1
In mathematics, log(x) has traditionally represented the common logarithm or base-10 log. This was true even back in the slide rule days.
I know the history — but can you find me a science or math article in the last 15 years that uses log(x) to mean base 10? (Not being snarky or whatever, I really am curious, it would be helpful for reference.)
In any case, a working professional now would expect log(x) to be by default natural log.
Possible third solution: use three colors on the graph instead of two.
Color 1: Real solutions
Color 2: Real part of complex solutions
Color 3: Imaginary part of complex solutions
That way students can quickly see the difference between real and complex solutions, and can be told to ignore the complex solutions for now.
I was searching for a solution to let WolframAlpha plot a function as a real function, and found your blog article.
More than one year later, there still no solution for this problem.
I think they are going to have to make the change, because you can now get the CORRECT graphs (without imaginary numbers) using Google search.
Thanks for the info. Google search works great!