14 ms·
I was curious to see the plot of log(log x). It's weird. Fortunately we have Wolfram Alpha so it was trivial to quickly see it: http://www.wolframalpha.com/inp
by PhantomGremlin 11y ago
I was curious to see the plot of log(log x).
It's weird. Fortunately we have Wolfram Alpha so it was trivial to quickly see it: http://www.wolframalpha.com/input/?i=plot+log(log+x) http://www.wolframalpha.com/input/?i=plot+log(log+x)
- dastbe 11y agoSo I would argue the easiest way to plot log log x is to parameterize the x domain. For f x = log x where log has base b, we know that f b^0 = 0, f b^1 = 1, etc. what does g x = log log x look like? Well, we know log x is undefined for x < 0, which implies g is undefined for x < b^0 = 1, or b^b^0. More generally, you can say when f x = y, g b^x = y. So we know that g intercepts 0 at b^b^0 = b. You could do this for several more points for y = 1, y = 2, and so on, or you could draw a graph of log x and just relabel the x-axis to be 1) shifted by 1 with the x-intercept at b and 2) scaled logarithmically.
- ivan_ah 11y agoI was going to comment that Google search does plots too, but in this case it seems to get it wrong: https://www.google.ca/search?q=plot%20ln(ln(x) https://www.google.ca/search?q=plot%20ln(ln(x))
- jamessb 11y agoHow so? The important parts to include on a sketch are that the function is monotonically increasing, has an asymptote at x=1 [0], intercepts the x-axis at x=e (approx 2.7) and quickly becomes almost flat. Both graphs agree on these points. Wolfram Alpha is using the complex logarithm (https://en.wikipedia.org/wiki/Complex_logarithm https://en.wikipedia.org/wiki/Complex_logarithm) to extend to x < 1; Google isn't. I'm fairly sure an interviewer would expect a sketch that looks like Google's, perhaps with a comment that achieving ln(ln(x)) < 1 is possible (only) if the ln function is allowed to take complex values. [0]: For values of x < 1, ln(x) < 0, so ln(ln(x)) is not a real number.
- ivan_ah 11y agoYou're right, the plot is correct. I didn't look closely and thought the vertical asymptote was at x=0, but actually it is at x=1 as you mentioned.