Approximating $\frac{(n+1)H_n -n}{n^2}$

75 Views Asked by At

I have the following value

$$\frac{(n+1)H_n -n}{n^2}$$

But it is complicated to write, so I want to write a simple approximation to use it. I guess I can just write

$$\frac{(n+1)H_n -n}{n^2}\approx \frac{H_n-1}{n} \approx \frac{H_n}{n} \approx \frac{\ln n}{n}$$

Is this a good approximation, or is there a clearly better one? Thanks.

2

There are 2 best solutions below

2
On BEST ANSWER

Because $\gamma > 0.5$, the approximation $$\frac{\log n}{n}$$ is superior to $$\frac{\gamma + \log n}{n}$$ despite $$\gamma = \lim_{n \to \infty} H_n - \log n.$$ This is because you write $$\frac{H_n - 1}{n} \approx \frac{H_n}{n},$$ which means you are introducing an error on the order of $O(1/n)$ with that step. If you write instead $$\frac{-1 + \gamma + \log n}{n},$$ you get an approximation that is asymptotically better than $\log n/n$ for large $n$. This in turn is due to the fact that in your first step, you introduce an error of order $O(n^{-2})$ by changing $(n+1)/n^2$ into $1/n$.

If you perform a series expansion about infinity for $$f(n) = \frac{(n+1)H_n - n}{n^2},$$ you get $$\frac{-1 + \gamma + \log n}{n} + \frac{1 + 2\gamma + 2 \log n}{2n^2} + \frac{5}{12n^3} - \frac{1}{12n^4} + \frac{1}{120n^5} + \frac{1}{120n^6} + O(n^{-7}).$$ The first term of the expansion is the approximation we described above that outperforms yours. Adding the second term in increases the complexity of the expression substantially but improves the approximation to within $O(n^{-3})$. We can try the order $(1,1)$ Padé approximant $$\frac{2 (\gamma -1)^2}{2 \gamma (n-1)-2 n-1}+\frac{\log n}{n-1}$$ which does even better than the second order series expansion.

0
On

Very similar to @heropup answer and solution, we could use for $$f(n) = \frac{(n+1)H_n - n}{n^2}$$ $$\frac{-1 + \gamma + \log n}{n} + \frac{1 + 2\gamma + 2 \log n}{2n^2} + \frac{5}{12n^3}\left(1-\frac{2310 n+559 } {50 \left(231 n^2+79 n+31\right) } \right) $$ which is equivalent to an $O\left(\frac{1}{n^8}\right)$ expansion.

For $n=10$, the relative error is $1.71\times 10^{-8}$%.