2

Problem: Find ln (0.97) with 7-decimal-place accuracy.

I'm trying to approximate this via a power series for ln(1-x). (Taylor series are not introduced until the next chapter.) For x=0.03, I see that $$\ln(1-x)=-\sum_{n=1}^\infty (0.03)^n/(n)$$

My instinct is to find n such that $$Rn\le\int_n^\infty \frac{(0.03)^x}{x} dx\lt error$$

This is where I'm stuck. I don't know what to do with this integral, and I am not sure if the difficult integral is arising from a previous error. Any advice on how I should proceed?

dboko
  • 35

1 Answers1

10

Instead of your series, it is rather usual to consider this one for computing values of $\ln$ function :

$$\ln \left(\dfrac{1+x}{1-x} \right)=2\left(x+\dfrac{x^3}{3}+\dfrac{x^5}{5}+\dfrac{x^7}{7}+\cdots \right)\tag{1}$$

with quicker convergence (see "more efficient series" in https://en.wikipedia.org/wiki/Logarithm).

With which value of $x$ ? You have to solve for that

$$\dfrac{1+x}{1-x}=0.97$$

giving $$x=-\tfrac{0.03}{1.97}\approx -0.015228426395939...$$

Now, consider the first terms of (1):

$$\begin{matrix}2x&=&-0.030456852791878\cdots&\\ 2x^3/3&=&-0.000002354365183\cdots&\\ 2x^5/5&=&-0.000000000327593\cdots&\\ 2x^7/7&=& \; -0.000000000000054\cdots \ &etc.\\ &&\rule[5pt]{90pt}{1pt}\\ \ln(0.97)&=&-0.030459207484709\cdots& \end{matrix}$$

What do we see ? That taking the first term ($2x$) in the series above with this value of $x$ gives a value with already 5 common decimal places with the target value $\ln(0.97)$. The desired precision (at least 7 decimal places) is obtained by adding the two first terms.

Remarks :

1) Take a look at the many interesting answers to the following question What is the fastest algorithm for finding the natural logarithm of a big number?, in particular iterative Halley's method.

2) One finds on libraries' shelves dusty hand-computed "logarithm tables" ; it means strenuous efforts using different techniques (usually not involving series expansion (1)). An interesting book on these issues : "The History of Mathematical Tables. From Sumer to spreadsheets" (Oxford University Press) by Campbell-Kelly et al. It contains a wealth of interesting information in particular about the computation of these tables:(https://www.semanticscholar.org/paper/The-history-of-mathematical-tables-%3A-from-Sumer-to-Campbell-Kelly-Robson/ea87b0b23e9b551fc9793b548cee3102fd5754a2). See in particular its chapters 2 and 4.

3) In the same vein : https://www.sciencedirect.com/science/article/pii/S0315086002000186. Besides telling the strange story of a father and his two daughters devoting 25 years of their life to the computation of tables that weren't published), this article contains an interesting example that I think valuable to reproduce. It will help to understand one of the techniques - among others - used to find logarithms of prime numbers. Imagine you are looking for a good approximation of $\ln 1619$ (in fact, most tables in the past were dealing with base $10$ logarithms, but it doesn't matter, the explanation is common with the neperian logarithms). Assume that by chance (or by observation) it has been noticed that $1619$ is part of a decomposition ending with many nines (or ending with ''$000001$'' for example, which amounts to the same) ; here:

$$1155999999=3 \times 7 \times 11^2 \times 281 \times 1619$$

Rewrite it under the form :

$$\ln(1619)=\ln(A - 1) - \ln 3 - \ln 7 - 2 \ln 11 - \ln 281 \ \ \text{with} \ \ A=1156 \times 10^6$$

Now transform the first expression in order to be able to use the classical series :

$$\ln(A-1)=\ln(A)+\ln(1-\tfrac{1}{A})=\ln(A)+\left(\tfrac{1}{A}+\tfrac{1}{2A^2}+\cdots\right)$$

which here is strikingly convergent series (because $\tfrac{1}{A} \approx 10^{-9}$) yielding in this case a $10^{-18}$ accuracy by only using the two terms one finds in the last parenthesis above, being assumed that $\ln 3, \ \ln 5, \ \ln 11, \ \ln 281, \ \ln 10, \ \ln 1156$ have been previously computed with a similar accuracy.

4) Connected : my answer to a similar problem : https://math.stackexchange.com/q/3193225 using the alternated series theorem to guarantee a bound of the error (but unfortunately with low convergence).

Jean Marie
  • 81,803