Remainder Estimate for Integral Test

The question is to estimate the error for the series $$\sum_{n\to1}^\infty\frac{1}{n^2+1}$$ using the Remainder Estimate for the Integral Test: $$\int_{n+1}^\infty f(x)\,dx\le R_n\le\int_n^\infty f(x)\,dx$$ I did some hand calculations to determine that $n\ge 2000$ shows that the remainder $R_n\le0.0005$

I then tried:

s = Sum[1/(n^2 + 1), {n, 1, \[Infinity]}]
Assuming[n > 1,
Reduce[s - Sum[1/(1 + k^2), {k, 1, n}] < 0.0005, n, Integers]]


But that did not work. Does anyone have good suggestions how to use Mathematica to determine the remainder of this series?

• not sure I understand exactly what the question is, but you need ~2000 terms to have r<0.0005 ( I just did Table[s-Sum..{n}] ) Commented Feb 27, 2017 at 19:58
• Are you looking for an expression that bounds the tail for any n? The Euler Mclaurin summation formula is one cute way to do it. Commented Feb 27, 2017 at 20:12

The questions say to use the integral remainder estimate.

tailUpper[n_] := Integrate[1/(x^2 + 1), {x, n, ∞}]
Reduce[tailUpper[n] <= Rationalize[0.0005], n, Integers]
(*  n ∈ Integers && n >= 2000  *)


Now get bounds on the error estimate:

tailLower[n_] := Integrate[1/(x^2 + 1), {x, n + 1, ∞}]
{tailLower[2000], tailUpper[2000]} // N

(*  {0.00049975, 0.0005}  *)

• Nice answer. This will be quite easy for my students to understand. Much appreciated. Commented Feb 28, 2017 at 1:37