Which of the two sums gives a better approximation to $\pi^2/6$?

81 Views Asked by At

Which of the following two sums $$\sum_{n=1}^{1000000}\frac1{n^2} \quad \text{or} \quad 1+\sum_{n=1}^{1000}\frac1{n^2(n+1)}$$ gives a better approximation to $\pi^2/6?$

I tested this on MATLAB and surprisingly obtained as a result the second sum. However, I do not know how to prove this rigorously.

2

There are 2 best solutions below

0
On

Let: $$G_{10^6}=\sum_{n=1}^{1000000}\frac1{n^2} \quad \text{and} \quad H_{10^3}+1=\sum_{n=1}^{1000}\frac1{n^2(n+1)}+1.$$ We can now compare the remainders of the two and see which is the smallest: $$\begin{aligned} &1) \int_{10^6+1}^\infty\frac1{x^2}dx\le\underbrace{\frac{\pi^2}6-G_{10^6}}_{\text{$R_G$}}\le\int_{10^6}^\infty\frac1{x^2}\,dx.\\ &2) \int_{10^3+1}^\infty\frac1{x^2(x+1)}dx\le\underbrace{\frac{\pi^2}6-1-H_{10^3}}_{\text{$R_H$}}\le\int_{10^3}^\infty\frac1{x^2(x+1)}\,dx.\end{aligned}$$ We can evaluate the improper integrals: $$\begin{aligned}&1)\ \lim_{C\to\infty}\int_N^C\frac1{x^2}dx=\lim_{C\to\infty}\left[-\frac1x\right]^C_N=\frac1N.\\ &2)\ \lim_{S\to\infty}\int_K^S\frac1{x^2(x+1)}dx=\lim_{S\to\infty}\int_K^S\left(\frac1{x^2}-\frac1x+\frac1{x+1}\right)dx=\lim_{S\to\infty}\left[\ln\left(\frac{x+1}x\right)-\frac1x\right]^S_K=\frac1K-\ln\left(\frac{K+1}K\right).\end{aligned}$$ Thus: $$\begin{aligned}&1)\ \frac1{10^6+1}\le R_G\le\frac1{10^6}\Leftrightarrow 9.\overline{9}\cdot10^{-7}\le R_G\le 10^{-6}.\\ &2)\ \frac1{10^3+1}-\ln\left(\frac{10^3+2}{10^3+1}\right)\le R_H\le \frac1{10^3}-\ln\left(\frac{10^3+1}{10^3}\right)\end{aligned}$$ $$\approx4.98\cdot10^{-7}\le R_H \le4.99\cdot10^{-7}.$$ We can clearly see that $R_G>R_H$, therefore $$1+\sum_{n=1}^{1000}\frac1{n^2(n+1)}$$ gives a better approximation to $\pi^2/6$.

1
On

$$\eqalign{\sum_{k+1}^\infty\frac{1}{n^2(n+1)}&<\sum_{k+1}^\infty\frac{1}{(n-1)n(n+1)}\cr &=\frac12\sum_{k+1}^\infty\left(\frac{1}{(n-1)n}-\frac{1}{n(n+1)}\right)\cr &=\frac{1}{2k(k+1)}}$$ $$\eqalign{\sum_{k^2+1}^\infty\frac{1}{n^2}&>\sum_{k^2+1}^\infty\frac{1}{n(n+1)}\cr &=\sum_{k^2+1}^\infty\left(\frac{1}{n}-\frac{1}{n+1}\right)\cr &=\frac{1}{k^2+1}}$$ So, clearly the error in the second is smaller than half the error in the first, that is $$\frac{\pi^2}{6}-\left(1+\sum_{n=1}^k\frac{1}{n^2(n+1)}\right)<\frac{1}{2}\left(\frac{\pi^2}{6}-\sum_{n=1}^{k^2}\frac{1}{n^2}\right)$$ The problem corresponds to $k=1000$.