While answering a CodeReview question (Approximating constant $\pi^2$ to within error), I noticed that when calculating the sum $$8 + \dfrac{8}{3^2} + \dfrac{8}{5^2} + \dfrac{8}{7^2} + \dfrac{8}{9^2} + \cdots $$
and stopping at the smallest term larger than $\varepsilon$, the difference to $\pi^2$ seems very close to $\sqrt{2\varepsilon}$.
With $$n = \left\lfloor\frac{\sqrt{\frac{8}{\varepsilon}} - 1}{2} \right\rfloor,$$
it looks like:
$$\sum_{i=0}^n \frac{8}{(2i+1)^2} \approx \pi^2 - \sqrt{2\varepsilon}.$$
For example, with $\varepsilon = 10^{-10}$:
$n = 141421$
$\sum = 9.86959025 \dots$
$\pi^2 - \sum \approx 1.4142170*10^{-5}$
$(\pi^2 - \sum)^2 \approx 2.0000099*10^{-10} \approx 2\varepsilon$
I don't think it's a coincidence, but I don't know where to begin to link
$$\sum_{i=n+1}^\infty \frac{8}{(2i+1)^2}$$ to $\sqrt{2\varepsilon}$.
Wolfram Alpha expresses this sum in terms of a polygamma function but I don't know anything about it.
Is the approximation correct? Is there any simple way to prove it?
One has $${2\over (2k+1)^2}<{1\over 2k}-{1\over 2k+2}\ ,$$ and therefore (teleskoping sum!) $$0<\sum_{k=n}^\infty{2\over(2k+1)^2}<{1\over 2n}\ ,$$ or $$0<\sum_{k=n}^\infty{8\over(2k+1)^2}<{2\over n}\ .$$ Maybe this will bring you over the top.