Wolfram Alpha graph of ln(x) shows as ln(abs(x))

In summary, the conversation discusses how Wolfram Alpha handles ln(x) and ln(abs(x)) and how it deals with negative and complex numbers. It also touches on the different notations for logarithms and the potential ambiguity in using log(x). The conversation concludes with an explanation of the complex plane and the branching point of ln(z).
  • #1
rudy
45
9
Hello-

I was checking an answer to an integral on Wolfram Alpha and noticed I don't know how they distinguish between ln(x) and ln("absolute value of"(x)). It appears all of their inputs and outputs imply absolute value (taking positive and negative x-values)

Is anyone here familiar with their site and can explain why this is or how they distinguish between the two?

Here is a link to "ln(x)" on wolfram alpha:

https://www.wolframalpha.com/input/?i=lnx

P.S. In case anyone is wondering why the input says "log(x)", Wolfram Alpha only deals with ln, so log = ln on W.A.

Thanks,

Rudy
 

Attachments

  • Screen Shot 2017-10-14 at 7.25.37 PM.png
    Screen Shot 2017-10-14 at 7.25.37 PM.png
    15.1 KB · Views: 1,328
Physics news on Phys.org
  • #2
How about ln(abs(x)) or ln|x|? And yes, meanwhile log without an explicit basis means ln.
 
  • #3
Hi Rudy,

By default Wolfram uses complex numbers.
Ln is well defined for negative numbers then, which shows up as having an imaginary part of pi (for the principle branch).
It just looks like the ln of an absolute value, which happens to be the real part.
For the principle branch we have:
$$\ln(-x)=\ln(e^{\pi i}\cdot x)=\pi i + \ln x$$
 
Last edited:
  • #4
fresh_42 said:
How about ln(abs(x)) or ln|x|? And yes, meanwhile log without an explicit basis means ln.
It -- log(x) -- didn't always mean ln(x). Back in the "old days" log(x) meant ##log_{10}(x)## and ln(x) meant ##log_e(x)##.

Also, in many computer science books, log(x) means ##log_2(x)##.
 
  • #5
Yes, I know, and I like ##\ln (x)##. That's why I said "meanwhile". But someone once said about me: If it was you to decide, we would still start our cars with a handle. Hmm, why not? Better than a battery failure in a cold winter.

I remember a discussion we had on PF before about ##\ln (x)## and I still can't see the advantage of ##\log (x)##. It's a letter more, ambiguous and ##\ln (x)## isn't assigned another usage and is easy to write by hand. I'm not sure, but I think I've even seen ##\operatorname{lb}## for ##\log_2## as well.
 
  • #6
I like Serena said:
Hi Rudy,

By default Wolfram uses complex numbers.
Ln is well defined for negative numbers then, which shows up as having an imaginary part of pi (for the principle branch).
It just looks like the ln of an absolute value, which happens to be the real part.
For the principle branch we have:
$$\ln(-x)=\ln(e^{\pi i}\cdot x)=\pi i + \ln x$$

Interesting, so is there no way to express ln(x) in the "traditional" (not using complex #s) sense on W.A.? In other words, is there a way I can use W.A. to check integrals with ln(abs(x)) in the answer? (Subtract pi*i for example...). Or should I just tell my professor that all my answers are formatted as outputs from W.A. :-p
 
  • #7
rudy said:
Interesting, so is there no way to express ln(x) in the "traditional" (not using complex #s) sense on W.A.? In other words, is there a way I can use W.A. to check integrals with ln(abs(x)) in the answer? (Subtract pi*i for example...). Or should I just tell my professor that all my answers are formatted as outputs from W.A. :-p
ln(x) "in the 'traditional sense'" does not allow x ≤ 0. That is not the fault of WA, that is standard mathematics. ln(x) is not the same as ln(abs(x)), which WA handles easily. WA handles them both correctly.
 
Last edited:
  • #8
Just noticed that W|A has a button on the right side of the graph that says Complex-valued plot, which we can change to Real-valued plot. :)
 
Last edited:
  • Like
Likes FactChecker
  • #9
fresh_42 said:
I'm not sure, but I think I've even seen ##\operatorname{lb}## for ##\log_2## as well.
lb? I have seen ld once in a while.

WolframAlpha typically understands things like “where x>0”, but for integrals over positive x that doesn’t matter anyway.
 
  • #10
mfb said:
WolframAlpha typically understands things like “where x>0”, but for integrals over positive x that doesn’t matter anyway.
I think the classical problem here is:
$$\int \frac {dz}z = \ln z + C$$
which is what W|A reports.
(Aside from the fact that they use the ambiguous ##\log##. I'm still wondering what their rationale is.)
For reals this becomes:
$$\int \frac {dx}x = \begin{cases}\ln x + C_1 &\text{if }x > 0 \\ \ln(-x) + C_2 & \text{if }x < 0\end{cases}$$
which is defined for negative x, and which is only properly defined if the bounds are either both positive or both negative.
And usually, somewhat erroneously though due to the different integration constants, it is abbreviated to:
$$\int \frac{dx}x = \ln|x| + C$$
which I'm guessing is what Rudy is being taught, and what he is supposed to verify.
 
Last edited:
  • Like
Likes mfb
  • #11
I like Serena said:
I think the classical problem here is:
$$\int \frac {dz}z = \ln z + C$$
which is what W|A reports.
(Aside from the fact that they use the ambiguous ##\log##. I'm still wondering what their rationale is.)
For reals this becomes:
$$\int \frac {dx}x = \begin{cases}\ln x + C_1 &\text{if }x > 0 \\ \ln(-x) + C_2 & \text{if }x < 0\end{cases}$$
which is defined for negative x, and which is only properly defined if the bounds are either both positive or both negative.
And usually, somewhat erroneously though due to the different integration constants, it is abbreviated to:
$$\int \frac{dx}x = \ln|x| + C$$
which I'm guessing is what Rudy is being taught, and what he is supposed to verify.

THIS sounds like the explanation I was looking for. I need to look over your explanation as I don't fully follow at first glance but thank you very much!
 
  • Like
Likes jim mcnamara and I like Serena
  • #12
fresh_42 said:
If it was you to decide, we would still start our cars with a handle.
Two of my motorcycles are started using a "handle" (kickstarter).
 
  • Like
Likes fresh_42
  • #13
I like Serena said:
Hi Rudy,

By default Wolfram uses complex numbers.
Ln is well defined for negative numbers then, which shows up as having an imaginary part of pi (for the principle branch).
It just looks like the ln of an absolute value, which happens to be the real part.
For the principle branch we have:
$$\ln(-x)=\ln(e^{\pi i}\cdot x)=\pi i + \ln x$$
Well, in Mathematica it's correctly implemented, i.e., when I plot log[x] it leaves out anything with arguments ##x \leq 0##.

It's also not true that ln is uniquely defined everywhere on the complex plane, but it has an essential singularity (or branching point) at ##z=0##. The standard definition is to cut the complex plane along the negative real axis. The value along the branch cut on one sheet of the corresponding Riemann surface jumps by the value ##2 \pi \mathrm{i}##. On the principal sheet, ##ln z \in \mathbb{R}## for ##z>0##. Consequently on this sheet the principal values along the negative real axis are
$$\ln(z \pm \mathrm{i} 0^+)=\ln(|z|) \pm \mathrm{i} \pi.$$
That's how it's implemented in Mathematica as well as in standard programming languages.

Obviously Wolfram alpha plots real and imaginary part for arguments along the real axis, assuming an infinitesimal positive imaginary part of the argument.
 

1. What is the significance of the absolute value in the ln(x) graph on Wolfram Alpha?

The absolute value in the ln(x) graph on Wolfram Alpha is used to ensure that the output is always positive. Since the natural logarithm function only accepts positive inputs, the absolute value function is used to cover both positive and negative inputs, resulting in a continuous graph.

2. Why does the ln(x) graph on Wolfram Alpha show a different shape compared to other graphing calculators?

The ln(x) graph on Wolfram Alpha shows a different shape because it uses a different method to calculate the natural logarithm function. Wolfram Alpha uses a more accurate method called the Taylor series expansion, which takes into account more terms in the series compared to other graphing calculators that use simpler methods.

3. How does the ln(x) graph on Wolfram Alpha handle complex inputs?

The ln(x) graph on Wolfram Alpha can handle complex inputs by using the complex logarithm function, which takes into account the complex nature of the input. The graph will show a complex curve in the complex plane, indicating the real and imaginary parts of the output.

4. Can the ln(x) graph on Wolfram Alpha be adjusted to show a different base for the logarithm function?

Yes, the ln(x) graph on Wolfram Alpha can be adjusted to show a different base for the logarithm function. This can be done by adding the base as a subscript after the "ln" symbol, such as ln2(x) for a base 2 logarithm. The graph will then show the corresponding logarithmic curve for the chosen base.

5. Is there a way to view the derivative of the ln(x) graph on Wolfram Alpha?

Yes, the derivative of the ln(x) graph on Wolfram Alpha can be viewed by typing "derivative of ln(x)" into the search bar. This will show the derivative function, which can then be plotted on the graph by clicking on the "Add to graph" button. The resulting graph will show the slope of the ln(x) curve at each point.

Similar threads

  • General Math
Replies
3
Views
987
  • Calculus
Replies
7
Views
2K
  • Calculus
Replies
8
Views
1K
Replies
3
Views
1K
Replies
1
Views
1K
  • Calculus
Replies
3
Views
1K
  • Programming and Computer Science
Replies
18
Views
2K
Replies
16
Views
3K
Replies
33
Views
4K
Replies
4
Views
2K
Back
Top