Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

At small values close to $x=1$, you can use taylor expansion for $\ln x$:

$$ \ln x = (x-1) - \frac{1}{2}(x-1)^2 + ....$$

Is there any valid expansion or approximation for large values (or at infinity)?

$\endgroup$

7 Answers

$\begingroup$

Almost as Semiclassical answered, write $x=A \times 10^{n-1}$ where $n$ is the number of digits before the decimal point, that is to say $1\leq A < 10$ and use the very fast converging expansion $$\log \left(\frac{1+y}{1-y}\right)=2\sum_{k=0}^{\infty}\frac{y^{2 k+1}}{2 k+1}$$ with $y=\frac{A-1}{A+1}$.

Let us take an example : $x=123456789$; then $A=1.23456789$ and $n=8$; so $y \approx 0.104972$. Now, let us look at the value of $$S_p=2\sum_{k=0}^{p}\frac{y^{2 k+1}}{2 k+1}$$ For the first values of $p$, the sums are successively $0.2099447424$, $0.2107158833$, $0.2107209817$, $0.2107210219$, $0.2107210222$ which is the solution for ten exact decimal places.

So, by the end $$\log^{(p)}(x)=(n-1)\log(10)+ S_p$$ which leads to the successive values of $18.63062549$, $18.63139663$ ,$18.63140173$, $18.63140177$, $18.63140177$ for an exact value equal to $\approx 18.63140177$.

$\endgroup$ 5 $\begingroup$

for any positive $x$

$\ln \left( x \right) \approx a{x^{\frac{1}{a}}} - a$
where $a$ is any large constant

The larger $a$, the better approximation.

$\endgroup$ 6 $\begingroup$

There is no polynomial or rational approximation to $\ln(x)$ that is accurate for all large $x$.

This follows from the fact that $\ln(x) =o(x^{\epsilon}) $ for every $\epsilon > 0$.

$\endgroup$ $\begingroup$

A crude approach is to assume scientific notation: If $x=A \times 10^n$ where $1\leq A < 10$. Then $\ln x = \ln A + n\ln 10\approx 2.3n$. To be a little more precise, we know $\ln x\in [n \ln 10,(n+1)\ln 10)$.

$\endgroup$ 2 $\begingroup$

Hint: $~\ln x=-\ln\dfrac1x~:~$ Can you take it from here ?

$\endgroup$ 4 $\begingroup$

There is a procedure from my complex variables class fifty years ago called "analytic continuation" that allows you to modify a power series to a different radius of convergence. But any series will have a finite radius of convergence, and when you get near that cutoff point, convergence is very slow. That is why most log routines incorporate scaling to reduce the range. However, instead of scaling by the number base, you can take the square root of the argument.

Pade approximations are rational functions that frequently beat truncated power series. Although you still have the problem of limited range, you reduce the need for range reduction. For example, Ln(1+x) = x(6+x)/(6+4x).

As for the previously posted series above with y = (a-1)/(a+1), I have seen a Pade approximation that is truly spectactular. It is in the article on Shank's Transformation, and it is P{ ln (1+y)/(1-y) } = 2y*(15 - 4y^2 )/(15 - 9y^2 ) ln(1) = 0, ln(2) = 0.693122 max error = -0.000025. You should probably use a computer algebra system for this work to reduce the frustration and likelihood of error.

If you just need to compute logs somewhere, consider using a table of multipliers and their logs. Good multipliers are powers of two or have only two bits, so you can do the multiply quickly in hardware by shift and add. Their logs will have as many bits as you need. So you do something like the Handbook of Mathematical Functions table 4.3 to bust the argument down to a range where the approximation is good. See Knuth, vol 1 page 22++ for algorithms that compute logs one bit at a time. One of these is due to Euler, and involves a square root for each bit; the other squares x and divides by the base of the log if the square is greater than the base. Since your base is e, that division would demand greater resources than division by 2 or 10.

$\endgroup$ 1 $\begingroup$

The taylor series for $\ln(\cdot)$ in the vicinity of point $a$ is

$$\ln(x+a) =\ln(a) + 2 \cdot (y+\frac{y^3}{3}+\frac{y^5}{5}+\frac{y^7}{7} + \ldots + \frac{y^{2n+1}}{2n+1}), \mathrm{where\;} y=\frac{x}{x+2a}$$

So for fast convergence, we need the logarithms of first 26 primes numbers: $2,3,5,7.\ldots$

$\endgroup$ 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy