# Talk:Natural logarithm

Template:Maths rating User:MiszaBot/config Archives: (by MiszaBot I)

## What does this number mean?

I was asked to explain the number $\log \left({\frac {i}{e}}+e^{\pi }\right)$ but i cant find a reference to it. What does the number mean? — Preceding unsigned comment added by 70.139.114.18 (talk) 18:47, 25 June 2012 (UTC)

It might be intended as a joke. It has no special significance of which I am aware. You could try asking at the Wikipedia:Reference desk/Mathematics. JRSpriggs (talk) 20:06, 25 June 2012 (UTC)

## Error in reference for taylor series

In the reference given for taylor series, http://math2.org/math/expansion/log.htm, I think the formula given for the Taylor Series Centered at 1 is wrong. The funniest is that the formula which is in the Wikipedia article is right, but is giving the link with the wrong formula as reference.

Formula given in the wikipedia article (right):

\ln(x)= (x - 1) - \frac{(x-1) ^ 2}{2} + \frac{(x-1)^3}{3} - \frac{(x-1)^4}{4} \cdots


Formula given in the reference (wrong): ln (x) = (x-1) - (1/2)(x-1)2 + (1/3)(x-1)3 + (1/4)(x-1)4 + ... — Preceding unsigned comment added by Asteba (talkcontribs) 18:45, 15 August 2013 (UTC)

## Simpler explanation for non-math nerds

I'm trying to figure out what e is, and e is defined using natural logarithm, while natural logarithm is defined using e. It's a self referential definition. Can we put something in here or on the 'e' page that explains what 'e' is or what 'natural logarithm is without using either of those two terms? There must be a simpler way of explaining it, besides giving us the value estimation.Jasonnewyork (talk) 15:01, 30 October 2013 (UTC)

e is the unique real number such that
$\int _{1}^{e}{\frac {1}{x}}\,dx=1\,.$ Is that clear enough? JRSpriggs (talk) 19:11, 30 October 2013 (UTC)

## Chemistry Notation

The notation "ln" is not used that much by mathematicians, "log" is much more common. So I find the use here rather odd -- especially since the explanation for the notation is an extract from a chemistry book. — Preceding unsigned comment added by 84.93.54.119 (talk) 11:55, 24 December 2013 (UTC)

I, a mathematician, use "ln" much more than "log". JRSpriggs (talk) 02:02, 25 December 2013 (UTC)

## High precision approximation technique using Newton's method does not work.

High precision approximation technique using Newton's method does not work. Example find the approximation of ln(x) with x=3, m=8: s=x*2^m, s=3*2^8, s=768, ln(x)~pi()/(2*average(1,4/s))-8*ln(2) = -2.41986 != ln(3) = 1.0986. — Preceding unsigned comment added by 69.14.214.74 (talk) 16:08, 2 January 2014 (UTC)

You used the wrong average. You used the arithmetic mean when you should have used the arithmetic–geometric mean. JRSpriggs (talk) 09:15, 4 January 2014 (UTC)

## A comparison of the series for calculating the natural logarithm

Here, I will apply each of the three series described in the article to solving the same problem, to wit, specify in decimal an interval of length not greater than 0.000050 which must contain ln 1.100000 . The upper bounds are obtained by multiplying the last term (or two terms) calculated by a factor which over-estimates the tail of the series.

1. Series which converges for $\vert x-1\vert \,$ less than 1, i.e. in a disc of radius 1 around 1:

$\ln {\frac {11}{10}}\,=\,{\frac {1}{1\cdot 10}}+{\frac {-1}{2\cdot 10^{2}}}+{\frac {1}{3\cdot 10^{3}}}+{\frac {-1}{4\cdot 10^{4}}}+\ldots \,.$ The lower bound is

$\ln {\frac {11}{10}}\,>\,{\frac {1}{1\cdot 10}}+{\frac {-1}{2\cdot 10^{2}}}+{\frac {1}{3\cdot 10^{3}}}+{\frac {-1}{4\cdot 10^{4}}}\,$ > 0.100000 + -0.005000 + 0.000333 + -0.000025 = 0.095308 .

The upper bound is

$\ln {\frac {11}{10}}\,<\,{\frac {1}{1\cdot 10}}+{\frac {-1}{2\cdot 10^{2}}}+\left({\frac {1}{3\cdot 10^{3}}}+{\frac {-1}{4\cdot 10^{4}}}\right)\cdot {\frac {100}{99}}\,$ < 0.100000 + -0.005000 + ( 0.000334 + -0.000025 ) · 1.010102 < 0.095000 + 0.000313 = 0.095313 .

2. Series which converges for $\left\vert {\frac {x-1}{x}}\right\vert \,$ less than 1, i.e. when the real part of x is greater than 0.5:

$\ln {\frac {11}{10}}\,=\,{\frac {1}{1\cdot 11}}+{\frac {1}{2\cdot 11^{2}}}+{\frac {1}{3\cdot 11^{3}}}+{\frac {1}{4\cdot 11^{4}}}+\ldots \,.$ The lower bound is

$\ln {\frac {11}{10}}\,>\,{\frac {1}{1\cdot 11}}+{\frac {1}{2\cdot 11^{2}}}+{\frac {1}{3\cdot 11^{3}}}\,$ > 0.090909 + 0.004132 + 0.000250 = 0.095291 .

The upper bound is

$\ln {\frac {11}{10}}\,<\,{\frac {1}{1\cdot 11}}+{\frac {1}{2\cdot 11^{2}}}+{\frac {1}{3\cdot 11^{3}}}\cdot {\frac {11}{10}}\,$ < 0.090910 + 0.004133 + 0.000251 · 1.100000 < 0.095320 .

3. Series which converges for $\left\vert {\frac {x-1}{x+1}}\right\vert \,$ less than 1, i.e. when the real part of x is greater than 0.0:

$\ln {\frac {11}{10}}\,=\,{\frac {2}{21}}\left(1+{\frac {1}{3\cdot 441}}+{\frac {1}{5\cdot 441^{2}}}+{\frac {1}{7\cdot 441^{3}}}+\ldots \right)\,.$ The lower bound is

$\ln {\frac {11}{10}}\,>\,{\frac {2}{21}}\left(1+{\frac {1}{3\cdot 441}}+{\frac {1}{5\cdot 441^{2}}}\right)\,$ > 0.095238 · ( 1.000000 + 0.000755 + 0.000001 ) > 0.095309 .

The upper bound is

$\ln {\frac {11}{10}}\,<\,{\frac {2}{21}}\left(1+{\frac {1}{3\cdot 441}}+{\frac {1}{5\cdot 441^{2}}}\cdot {\frac {441}{440}}\right)\,$ < 0.095239 · ( 1.000000 + 0.000756 + 0.000002 ) < 0.095312 .

So these series agree that ln 1.1000 is 0.0953 to four decimal places. Of these three series, the last is the most efficient, that is, it gives the most precision for the same effort, or it achieves the same precision with least effort.

I did not include the so-called high precision methods and continued fractions in this comparison because it is not clear to me how to get error bounds on those methods. If you have a suggestion of how to do that I would be pleased to read it. JRSpriggs (talk) 19:44, 8 January 2014 (UTC)

Here, I apply Newton's method with f(y) = exp(y)-x to the same problem. In general, the iteration is

$y_{n+1}\,=\,y_{n}-{\frac {\exp(y_{n})-x}{\exp(y_{n})}}\,=\,y_{n}+{\frac {x}{\exp(y_{n})}}-1\,.$ For 0 ≤ y ≤ 0.1, the exponential function can be calculated to six decimal places (actually maybe ten or more places) by the approximation

$\exp(y)\,\approx \,1+{\frac {y}{1}}\left(1+{\frac {y}{2}}\left(1+{\frac {y}{3}}\left(1+{\frac {y}{4}}\left(1+{\frac {y}{5}}\cdot {\frac {1}{1-{\frac {y}{6}}}}\right)\right)\right)\right)\,.$ Also notice that when calculating error bounds on yn+1, we can neglect any small errors in yn. To get the error bounds, I will use the facts that

${\frac {x-1}{x}}\leq \ln(x)\leq x-1\,,$ $\ln(x)=y_{n}+\ln \left({\frac {x}{\exp(y_{n})}}\right)\,$ and consequently

$y_{n}+{\frac {{\frac {x}{\exp(y_{n})}}-1}{\frac {x}{\exp(y_{n})}}}\leq \ln(x)\leq y_{n}+{\frac {x}{\exp(y_{n})}}-1=y_{n+1}\,.$ Now, in the case of our problem where x=1.1, we get

$y_{0}=0\,$ $y_{1}=0+{\frac {1.1}{\exp(0)}}-1=1.1-1=0.1\,$ $y_{2}=0.1+{\frac {1.1}{\exp(0.1)}}-1\approx 0.0953\,$ And thus the upper bound is

$\ln(1.1) The lower bound is

$\ln(1.1)>0.095300+{\frac {{\frac {1.1}{\exp(0.095300)}}-1}{\frac {1.1}{\exp(0.095300)}}}>0.095310\,.$ So this might be faster than the series (if x is near 1.0; we want much more precision and you do not put an excessive effort into calculating the earlier values of y), but at the expense of being considerably more complicated. JRSpriggs (talk) 13:15, 14 January 2014 (UTC)

On second thought, since the above version of Newton's method merely has quadratic convergence, it might be better to use a different function with Newton's method which will have cubic convergence, to wit
$f(y)=x\exp(-{\frac {1}{2}}y)-\exp({\frac {1}{2}}y)\,.$ This would give
$y_{n+1}=y_{n}-{\frac {x\exp(-{\frac {1}{2}}y_{n})-\exp({\frac {1}{2}}y_{n})}{-{\frac {1}{2}}x\exp(-{\frac {1}{2}}y_{n})-{\frac {1}{2}}\exp({\frac {1}{2}}y_{n})}}\,$ $=y_{n}+2\cdot {\frac {x-\exp(y_{n})}{x+\exp(y_{n})}}\,.$ If we replace
$y_{n}=\delta _{n}+\ln(x)\,,$ then we get
$\delta _{n+1}=\delta _{n}+2\cdot {\frac {1-\exp(\delta _{n})}{1+\exp(\delta _{n})}}\,.$ We recognize this as the hyperbolic tangent
$\delta _{n+1}=\delta _{n}-2\cdot \tanh({\frac {1}{2}}\delta _{n})=+{\frac {{\delta _{n}}^{3}}{12}}-{\frac {{\delta _{n}}^{5}}{120}}+{\frac {17{\delta _{n}}^{7}}{20160}}-\cdots \,.$ This has cubic convergence as one might expect since the second derivative of function f is zero at the same y as f is zero:
$f''(y)={\frac {1}{4}}f(y)\,.$ Again for x=1.1, we get
$y_{0}=0\,$ $\delta _{0}\approx {\frac {-1}{10}}\,$ $y_{1}=0+2\cdot {\frac {1.1-1}{1.1+1}}={\frac {2}{21}}=0.095238\;095238\;095238\ldots \,$ $\delta _{1}\approx {\frac {-1}{12\;000}}\,$ and at the next step we would have
$\delta _{2}\approx {\frac {-1}{20\;736\;000\;000\;000}}\,$ which would give us more precision at the second step than the previous function f gave us at the third step.
Thus, barring errors in my calculation of the exponential, this should be ln(1.1) correct to 13 decimal places:
$y_{2}=0.095\;310\;179\;804\;293\;4\ldots \,.$ JRSpriggs (talk) 10:35, 29 January 2014 (UTC)
According to my copy of the Handbook of Mathematical Functions, the actual value is
$\ln(1.1)=0.095\;310\;179\;804\;324\;9\ldots \,.$ Thus the actual error is -315×10−16 which is slightly closer to zero than my estimate of the error. JRSpriggs (talk) 11:18, 29 January 2014 (UTC)

## Natural logarithm of thirty

Calculating the natural logarithm of a number distant from 1, e.g. 30, is a problem for the methods described in my previous section of talk. The Taylor series does not converge there at all. The other two series for calculating the natural logarithm of 30 and the series for the exponential of ln(30) would converge, but only extremely slowly. The continued fractions require as many steps as the corresponding series from which they were derived. So as a practical matter, it is impossible to directly calculate the natural logarithm of thirty by any of those methods. However, it can be done indirectly by factoring 30 appropriately. For example:

$30={\left({\frac {81}{80}}\right)}^{15}\cdot {\left({\frac {16}{15}}\right)}^{34}\cdot {\left({\frac {25}{24}}\right)}^{25}\,$ which is easily verified by counting up the factors of 2, 3, and 5 (these are the only prime factors of these numbers). Thus

$\ln(30)=15\cdot \ln {\left({\frac {81}{80}}\right)}+34\cdot \ln {\left({\frac {16}{15}}\right)}+25\cdot \ln {\left({\frac {25}{24}}\right)}\,.$ These numbers are close enough to 1 that their series converge quite quickly. A low precision value can be obtained with just the first term of the third series, so:

$\ln(30)\approx 15\cdot {\frac {2}{161}}+34\cdot {\frac {2}{31}}+25\cdot {\frac {2}{49}}=0.1863+2.1935+1.0204=3.4003\,.$ Error analysis gives 3.40 < ln(30) < 3.41 . JRSpriggs (talk) 17:37, 6 February 2014 (UTC)

JR, this is good stuff, but I don't see what it has to do with improving the article. I don't think there's any prospect that we're going to put detailed info about the challenges for numerical methods, and ways to get around them, into the article itself. --Trovatore (talk) 19:55, 6 February 2014 (UTC)
Yes, I just could not resist the challenge of seeing how far I could go using just the simple calculator built into Windows. It can remember only one other number than the one that I am currently working on and has no functions more complex than square-root.
Also, I still have doubts about the usefulness of the so-called high precision methods and the continued fractions.
I did make some changes to the article between January 17 and February 3 based on things I learned while writing the previous section of talk. JRSpriggs (talk) 20:53, 6 February 2014 (UTC)

## Shouldn't the axes of the graph, "Graph of the natural logarithm function" be labelled?

I feel the graph, "Graph of the natural logarithm function", would be improved by labeling the axes. — Preceding unsigned comment added by 71.166.8.154 (talk) 03:43, 26 February 2014 (UTC)