Jump to content

Talk:Natural logarithm: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
Line 4: Line 4:
|archive = Talk:Natural logarithm/Archive 1
|archive = Talk:Natural logarithm/Archive 1
}}
}}
{{Vital article|class=C|topic=Mathematics|level=5}}
{{Vital artículo|class=C|topic=Mathematics|level=5}}
{{archives}}
{{archives}}



Revision as of 11:10, 22 April 2022

WikiProject iconMathematics C‑class High‑priority
WikiProject iconThis article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
CThis article has been rated as C-class on Wikipedia's content assessment scale.
HighThis article has been rated as High-priority on the project's priority scale.

Template:Vital artículo

What exactly do we mean by "cubic convergence"?

For simplicity, I will assume here that x ≥ 1 and thus ln (x) ≥ 0. If we apply Halley's method#Cubic convergence to our situation (trying to calculate the natural logarithm of x), using f(y) = exp (y) - x as we do in Natural logarithm#High precision, then we get the following

for

.

Thus

.

To extend this to 0 < x ≤ 1, replace x by 1 / x and observe that the result can be returned to the same form.

After that one can replace x by x / exp (yn), getting

.

OK? JRSpriggs (talk) 14:52, 1 May 2018 (UTC)[reply]

It is also useful to notice that for x > 0,

and thus

.

Consequently,

,

that is, the iteration never overshoots. JRSpriggs (talk) 09:16, 2 May 2018 (UTC)[reply]

While

,

it may be more useful to know how close to the "root" ln (x) one has to be before the cubic convergence becomes effective. More on this later. JRSpriggs (talk) 09:30, 2 May 2018 (UTC)[reply]

I did some calculations and got

Since ln(x)-yn+1 is an odd function of ln(x)-yn, it should be possible to increase the exponent of the bound from 4 to 5. However, I doubt that the extra effort would be worthwhile since this does nothing to get rid of the cubic term. For that, we would need a better function in the iteration. JRSpriggs (talk) 21:41, 4 May 2018 (UTC)[reply]

Belatedly, I realized that the calculations I was doing were a round-about way of getting the Taylor series of a certain function

.

That made it a lot simpler. However, although I have reason to think that the coefficients will remain small numbers, the expression I have for the derivatives produces large positive and large negative numbers which mostly cancel. This means that it is still not easy, and so I cannot yet determine the error bound.

More terms can be determined from hyperbolic function#Taylor series expressions. JRSpriggs (talk) 02:27, 6 May 2018 (UTC)[reply]

The main cost of performing an iteration is calculating the exponential of yn. We can use the formula I gave in my first comment in this section to avoid doing the last exponential before comparing it to x to see whether it is close enough. Here is pseudo-code for the algorithm:

input x and tolerance.
verify that they are positive real numbers.
let y := 0.
let expy := 1.
begin loop:
let nexty = y + 2 ( (x - expy) / (x + expy) ).
let min := min (x, expy).
if ( 3 (x + expy) - 5 min ) | x - expy |3tolerance 6 (x + expy) min3, then:
let lnx := nexty.
output lnx.
stop.
end if.
let y := nexty.
let expy := exp ( y ) *** this is the expensive step which we are trying to avoid.
end loop.
end routine.

Note that this uses the theorem

to get around the fact that we do not yet know what ln (x) is. JRSpriggs (talk) 03:40, 6 May 2018 (UTC)[reply]

The test for exiting the loop is intended to achieve the same effect as:

but without having to calculate exp (yn+1) and without knowing ln (x). Can the test be simplified? Yes, if you are not too picky about getting it right. We could define another variable

let threshold := cube_root ( 12 tolerance )

and compare | x - expy | ≤ threshold min. Or we could use nexty as a substitute for ln (x), which would make the test | nexty - y | ≤ threshold. JRSpriggs (talk) 13:03, 7 May 2018 (UTC)[reply]

To get a general idea of how this technique (the iterative method, not the program) converges, I ran a test beginning with a distant initial guess y0. I got the following:

ln (x) - y0 = 4.0000000000
ln (x) - y1 = 2.0719448398
ln (x) - y2 = 5.193595899·10-1
ln (x) - y3 = 1.13675706·10-2
ln (x) - y4 = 1.224097816·10-7

Notice that at first it moves closer by a little less than 2 which is the limit on how far it can move in one iteration. Then after it comes within 1 of the correct value, the cubic convergence begins to take hold. JRSpriggs (talk) 04:20, 8 May 2018 (UTC)[reply]

An alternative iteration to get the natural logarithm

I discussed the current version of Natural logarithm#High precision in the previous section of talk, Talk:Natural logarithm#What exactly do we mean by "cubic convergence"?. Now, I would like to suggest an alternative. Thanks to the third order Householder's method, we could use

Advantages: It converges faster, moving upto 3 when far away (as opposed to 2 for the Halley's method) per iteration and having quintic (fifth power) convergence (usually the third Householder's method only gives quartic convergence, but this is a especially favorable situation) when close rather than the cubic convergence of the Halley's method. This may allow for fewer iterations of the method and thus fewer evaluations of the power series for the exponential.

Disadvantages: It is a change, and any change may cause confusion. It requires three more multiplications to compute the adjustment. It is slightly more complex than the previous method. Although, I have proved that the convergence is quintic, I do not have the coefficient yet. If it is too large, that might be a problem.

Do you think that we should change the section to use this new method? JRSpriggs (talk) 05:05, 9 May 2018 (UTC)[reply]

I don't think it's appropriate for this article. In fact, a whole lot of the stuff currently in the "Series" and "Continued fraction" sections should probably be pruned out, as well. This is not an article on numerical methods for computing logarithms. --Trovatore (talk) 09:46, 9 May 2018 (UTC)[reply]
In that case, can we create an article on numerical methods for computing logarithms and transfer that material to it? JRSpriggs (talk) 00:14, 10 May 2018 (UTC)[reply]
Hmm, is that a topic called out as such in the literature? Certainly numerical methods are an important area of study and can be covered in Wikipedia, but going into detail about the pluses and minuses of specific ways of computing a particular function feels a little "handbook-like" to me.
That said, I wouldn't object to it nearly as much in its own article. Just make sure all the methods are sourced (and specifically for computing logs). Also convergence estimates, caveats, etc, should have sources that specifically say this is what happens when you're computing logarithms. --Trovatore (talk) 00:42, 10 May 2018 (UTC)[reply]

For the iteration suggested above,

.

JRSpriggs (talk) 06:08, 10 May 2018 (UTC)[reply]

Assuming that errors in calculating exp (yn) and yn+1 from x and yn are negligible,

JRSpriggs (talk) 01:27, 17 May 2018 (UTC)[reply]

Section on origin of the term

I've just removed the section titled Origin of the term natural logarithm. There was a ton of WP:OR/WP:SYNTH in here. The one source listed (which I had to check an archived copy of) didn't seem to actually verify anything at all in here. At best, it was just some extra history capped off with a statement to the effect of: "and that's why it's called the natural logarithm". If anyone disagrees or thinks any of this could/should be salvaged, please feel free to comment. –Deacon Vorbis (carbon • videos) 13:45, 18 July 2019 (UTC)[reply]

Read above section "Why natural"? Also see History of logarithms and recall previous name Hyperbolic logarithm. Justification for removal is weak. — Rgdboer (talk) 21:46, 19 July 2019 (UTC)[reply]
I'm not sure why concerns about OR/SYNTH are weak, and reading the above section really only strengthens my concerns there. This looks like a reading of primary source material and making conjectures based on that (however plausible doesn't matter). If someone can find a good history source that can confirm any of this, then great, but otherwise, I don't really understand the resistance here. –Deacon Vorbis (carbon • videos) 22:16, 19 July 2019 (UTC)[reply]
In science the term natural philosophy is associated with perceptible phenomena. In mathematics it is area which forms the perceptible quantification of natural logarithm. Would you please consider the quotation from Tom Whiteside on History of logarithms. Your challenge of this origin of the descriptor natural perpetuates ignorance of the concept and its relation to hyperbolic angle. — Rgdboer (talk) 21:48, 20 July 2019 (UTC)[reply]
After reading this I am actually less convinced that "naturalness" of the log is related to hyperbolic area. —Kusma (t·c) 15:25, 21 July 2019 (UTC)[reply]
(Whoops, forgot to reply.) I don't understand; are you claiming that the use of "natural" in "natural logarithm" is related to its use in "natural philosophy" (which itself is really just an old term for "science"). If not, then what are you getting at? If so, do you have source(s) to back this up? This all seems to be getting away from the main issue, which is that any claims about the term's etymology should be (secondarily) sourced – not left to editors to speculate about. –Deacon Vorbis (carbon • videos) 21:24, 21 July 2019 (UTC)[reply]
The essential nature of area defining this function was acknowledged by Derek Thomas Whiteside (1961) "Patterns of mathematical thought in the later seventeenth century", Archive for History of Exact Sciences 1(3):179–388, § III.1 The logarithm as a type-function pp 214–231, see especially page 231. — Rgdboer (talk) 23:11, 21 July 2019 (UTC)[reply]
@Rgdboer: I don't have access to this source, can you quote the relevant portion(s)? –Deacon Vorbis (carbon • videos) 00:09, 22 July 2019 (UTC)[reply]
Deacon Vorbis, a quote is in our article History of logarithms. It seems to me to be about several concepts from analysis and geometry coming together and becoming the natural logarithm, but I don't see any justification to say that the naturalness is inherited from geometry instead of from analysis. We don't call them "hyperbolic logarithms" any more, so it seems to me we are de-emphasizing the relation to geometry these days. —Kusma (t·c) 10:31, 22 July 2019 (UTC)[reply]
Mmm, okay, and yeah, I managed to ... "find" ... a full copy, and there's really no discussion on why the term is appropriate, or who first used it, etc. So barring any other sources, I'm not sure there's anything to do here. –Deacon Vorbis (carbon • videos) 13:33, 22 July 2019 (UTC)[reply]
The section has been restored with citation from V. Frederick Rickey who explicates Euler's development of the subject. — Rgdboer (talk) 22:11, 26 July 2019 (UTC)[reply]
@Rgdboer: The source you cited merely says that Euler called it by "natural or hyperbolic", not any of rest of that, or why he chose the term "natural" (was that term already in use? did Euler coin it?). I'm sure that a brief mention of Euler in the history section would be fine, but not any of the big pile of OR that was the main concern. –Deacon Vorbis (carbon • videos) 22:44, 26 July 2019 (UTC)[reply]
"Big pile of OR" should be described as 270 years have passed since Euler: anything original on this topic is unlikely. — Rgdboer (talk) 22:53, 26 July 2019 (UTC)[reply]
@Rgdboer: Are you talking to me? I'm guessing so, but you didn't indent your reply (I've done so for you), or give an actor for should be described, so it's hard to be sure. Anyway, I'm not sure what else I can do here. Nowhere in the section was there really an explanation of the origin of the term natural logarithm, and what was there wasn't sourced, so I don't understand what you're looking for here. –Deacon Vorbis (carbon • videos) 00:58, 27 July 2019 (UTC)[reply]

e^-lnx

Should we not include the line:


e-lnx = 1/x

? — Preceding unsigned comment added by 2603:6011:3140:7400:B4A0:B8CE:398B:B46E (talk) 03:52, 12 March 2021 (UTC)[reply]

Absolute values in logarithms

(Moved the following unsigned comment by User:David phys davalos from my talk page).--Sapphorain (talk) 00:10, 9 July 2021 (UTC)[reply]

The antiderivative of 1/x is not log(abs(x)), is simply log(x), please do not undo my changes. (Unsigned comment by User:David phys davalos)

Both ln|x| and ln(x) are antiderivatives of 1/x for x real and nonzero. But as at this point of the article the function ln(x) is only defined as a real function of the real positive variable x, we better stick to the former.--Sapphorain (talk) 00:10, 9 July 2021 (UTC)[reply]

Observe that if you are taking only x>0, abs(x) is precisely not needed, it introduces confusion since log(x) is in general different from log(abs(x)). I agree that they are the same for x>0, therefore you do not need the absolute value. The confusion is introduced because log(|x|) can be trivially extended for all real x (and real-valued), while log(x) does not enjoy such property. Moreover, is log(x) what is eventually extended, not log(abs(x)). In summary, as you said abs(x) does nothing, so let's make things simpler. — Preceding unsigned comment added by David phys davalos (talkcontribs) 20:41, 9 July 2021 (UTC)[reply]

In fact, observe that using the uneded abs(x) introduces inconsistencies when dealing with trigonometric functions, giving rise to functions defined in domains that they shouldn't be. I encourage you to leave things simpler (and in fact, correct).

I reverted you. Things are not simpler when they involve undefined notions, they are just not anymore understandable. --Sapphorain (talk) 21:27, 9 July 2021 (UTC)[reply]

Wow, wait, what notion is not defined?. You are making things involved since you are confusing domain issues with the function itself. Please provide a reference of your highly non-standard and non sense rules. — Preceding unsigned comment added by David phys davalos (talkcontribs) 23:18, 9 July 2021 (UTC)[reply]

If you do not want to 'believe' me, believe Wolfram: https://www.wolframalpha.com/input/?i=int%281%2Fx%2Cx%29 — Preceding unsigned comment added by David phys davalos (talkcontribs) 23:22, 9 July 2021 (UTC)[reply]

And: https://www.wolframalpha.com/input/?i=int%281%2Fabs%28x%29%2Cx%29

Now, please, let's stop this annoying game. You already said that for x>0 abs(x) does nothing, and the article is about x>0, abs(x) is totally not needed! and introduces confusion for the reader that eventually reads complex logarithms. — Preceding unsigned comment added by David phys davalos (talkcontribs) 23:26, 9 July 2021 (UTC)[reply]

At this point of the article, is defined exclusively for a real positive argument, as a real function. For a value of such that is negative, for instance, is undefined.--Sapphorain (talk) 06:22, 11 July 2021 (UTC)[reply]