Error estimation for the Wallis product From the Wallis product we know $$\prod_{k=1}^{\infty} \left(\frac{2k}{2k-1} \cdot \frac{2k}{2k+1}\right) = \frac{2}{1} \cdot \frac{2}{3} \cdot \frac{4}{3} \cdot \frac{4}{5} \cdot \frac{6}{5} \cdot \frac{6}{7} \cdot \frac{8}{7} \cdot \frac{8}{9} \cdots = \frac{\pi}{2}$$
Let $a_n = \prod_{k=1}^{n} \left(\frac{2k}{2k-1} \cdot \frac{2k}{2k+1}\right)$ the n-th partial product. Is there an error estimate known for the relative error $\frac{a_n}{\pi/2}$?
 A: We have
$$\frac{a_n}{\pi/2} = \prod_{k = n+1}^\infty \frac{(2k-1)(2k+1)}{(2k)^2} = \prod_{k = n+1}^\infty \biggl(1 - \frac{1}{4k^2}\biggr).$$
To estimate products, it is often convenient to take logarithms. Here we can get the easy upper bound
$$\log \prod_{k = n+1}^\infty \biggl(1 - \frac{1}{4k^2}\biggr) = \sum_{k = n+1}^\infty \log \biggl( 1 - \frac{1}{4k^2}\biggr) < - \frac{1}{4}\sum_{k = n+1}^\infty \frac{1}{k^2} < -\frac{1}{4(n+1)}$$
and the lower bound
\begin{align}
\log \prod_{k = n+1}^\infty \biggl(1 - \frac{1}{4k^2}\biggr) &= - \log \prod_{k = n+1}^\infty \biggl(1 + \frac{1}{4k^2-1}\biggr)\\
&= - \sum_{k = n+1}^\infty \log \biggl(1 + \frac{1}{4k^2-1}\biggr)\\
&>-\sum_{k = n+1}^\infty \frac{1}{4k^2-1}\\
&= - \frac{1}{2}\sum_{k = n+1}^\infty \biggl( \frac{1}{2k-1} - \frac{1}{2k+1}\biggr)\\
&= -\frac{1}{4n+2}.
\end{align}
Thus
$$\exp \biggl(-\frac{1}{4n+2}\biggr) < \frac{a_n}{\pi/2} < \exp \biggl(-\frac{1}{4n+4}\biggr).$$
For the little work needed, these bounds are already decent. For better bounds, you can use better approximations of the logarithms.
