# Why is 1/log(1+1/k) ≈ k + 1/2 ?

This is just a minor extension of my last post.
Why is $$1/\log(1+1/k) \approx k + 1/2\ ?$$
At first, I was surprised that $$1/\log(1+1/237) \approx 237,$$ but then I realize that $$\log(1+x) \approx x$$ if $|x|$ is small, so
$$1/\log(1+x) \approx 1/x,\mathrm{\ thus}$$
$$1/\log(1+1/k) \approx k.$$
Where does the 1/2 come from? Well, you’ve got to get a better approximation of $\log(1 +x)$ to find the 1/2. You can do this with calculus.  If $|x| <$1 and $|y| < 1$, then $$(1-x)\cdot( 1+ x + x^2 + x^3 + \ldots) = 1$$
$$1/(1-x) = 1+ x + x^2 + x^3 + \ldots$$
$$\int_0^y 1/(1-x) \;dy = y + y^2/2 + y^3/3 + \ldots$$
$$-\log(1-y) = y + y^2/2 + y^3/3 + \ldots,\mathrm{\, so}$$
$$\log(1+x) = x – x^2/2 + O(x^3)$$ using big O notation.  (Aside: $-\log( 1 – .001) = 0.0010005003335835335…$)
Now,
\begin{aligned} 1/\log(1+x) &= 1/(x – x^2/2 + O(x^3)) \\ &= 1/x \cdot 1/(1 – x/2 + O(x^2)) \\ &= 1/x \cdot [ 1 + ( x/2 + O(x^2)) + O( ( x/2 + O(x^2))^2) ] \\ &= 1/x \cdot ( 1 + x/2 + O(x^2) + O( x^2) ) \\ &= 1/x \cdot ( 1 + x/2 + O( x^2) ) \\ &= 1/x + 1/2 + O(x). \end{aligned}Replacing $x$ with $1/k$ gives$$1/\log(1+1/k) = k + 1/2 + O(1/k).$$

It is more work to prove sharper bounds.