So, use the midpoint definition of the integral approximation:
sum of i = 1 to n of (sqrt(2)-1)/n * f(1 + i*(sqrt(2)-1)/n - (sqrt(2)-1)/(2n)) where f is the integrand.
error is the difference of sum from different ns with the integral. (which is tan-1(x))