Good approximation to $\ln(x)$ for $x$ in $1 < x < e$ I'm looking for a simple function that gives a good approximation to $\ln(x) $ within $1 < x < e$.
Do you have anything in mind? I'm not looking for an infinite function, but a short and finite version of it might be good, if it's also a simple solution as well.
 A: There is a simple approximation through the Cauchy-Schwarz inequality, $\log(x)\approx\sqrt{x}-\frac{1}{\sqrt{x}}$.
$$ \log(x)=\int_{1}^{x}\frac{dt}{t}\stackrel{CS}{\leq}\sqrt{\int_{1}^{x}1\,dt \int_{1}^{x}\frac{dt}{t^2}} = \sqrt{\frac{(x-1)^2}{x}}. $$
A better approximation is given by a Padé approximant at $x=1$,

$$ \log(x) \approx \frac{3x^2-3}{x^2+4x+1}.$$

We also have a technique allowing to convert a not-so-good approximation $f_1$ into a better approximation $f_2$:
$$ f_2(x) = 1+\frac{1}{x}\left(-1+\int_{1}^{x}f_1(t)\,dt\right) $$
This tecnique produces, starting from $f_1(x)=\sqrt{x}-\frac{1}{\sqrt{x}}$, the following approximation that is comparable to the previous Padé approximant:

$$ \log(x) \approx \frac{\left(-1+\sqrt{x}\right) \left(-1+5 \sqrt{x}+2 x\right)}{3 x}$$

A: As $n \to \infty$, $ n(x^{1/n}-1) $ converges to $\log{x}$ from below, while $n(1-x^{-1/n})$ converges from above. Choose a large enough $n$ and you'll get a simple uniform approximation that you can make as accurate as you like.
A: Here are two approximations for the natural logarithm from K. Oldham & J. Spanier, An Atlas of Functions, 1st Ed., Ch. 25, Hemisphere.
$$\ln(x)\simeq\frac{x-1}{\sqrt{x}},\ \ \ \ 3/4\le x\le 4/3$$
$$\ln(x)\simeq (x-1)\left(\frac{6}{1+5x}\right)^{3/5},\ \ \ \ 1/2\le x\le 2$$
You can go up to $x=e$ with $\ln(x)=\ln(\sqrt{x})+\ln(\sqrt{x})$.
A: Here are two approximations from my notes, which unfortunately do not preserve how I generated them. I do recall puzzling around, starting out from $$\ln x \approx 2\frac{x-1}{x+1}$$
I was looking for approximations requiring a very small number of elementary mathematical operations, and in particular also taking advantage of fused multiply-add. The first approximation is $$ f_{1}(x) := 1.84195 - \frac{5.625}{2x+1} $$ which has a maximal absolute error $|f_{1}(x) - \ln x| < 0.03305$ on $[1, e]$. The second approximation is $$ f_{2}(x) := \frac{5x+3\sqrt{e}}{2(x+\sqrt{e})}$$ with $|f_{2}(x) - \ln x| < 0.01017$ on $[1, e].$ In practical terms, $\sqrt{e}$ and $3\sqrt{e}$ can be precomputed, making $f_{2}$ minimally more computationally intensive than $f_{1}$. A close to minimax rational approximation is $$f_{3}(x) := \frac{324x-323}{128x+211}$$ with $|f_{3}(x) - \ln x| < 0.00296$ on $[1,e]$.
