Approximating a summation by partial summation+integral

263 Views Asked by At

Say, for example, you want to approximate the sum:

$$\sum^{\infty}_{n=1}\frac{1}{n^2}=\frac{\pi^2}{6}$$

The most intuitive first step would be to truncate the summation at $N$

$$\sum^{N}_{n=1}\frac{1}{n^2}\approx\sum^{\infty}_{n=1}\frac{1}{n^2}$$

The next step would be to approximate the rest of the series with an integral.

$$\sum^{N}_{n=1}\frac{1}{n^2}+\int^{\infty}_{N}\frac{1}{x^2}dx\approx\sum^{\infty}_{n=1}\frac{1}{n^2}$$

Next step would be to integrate from $N+\frac{1}{2}$ instead of $N$

$$\sum^{N}_{n=1}\frac{1}{n^2}+\int^{\infty}_{N+\frac12}\frac{1}{x^2}dx\approx\sum^{\infty}_{n=1}\frac{1}{n^2}$$

This expression has an error term of the order $N^{-3}$. This is where my intuition ends. What is the next logical step in this process? There are several ways of turning summations into integrals exactly, but I want to get a continuation of the same intuitive logic for approximating the summation.

I have a sense that it will eventually be of the form

$$\sum^{N}_{n=1}\frac{1}{n^2}+\sum^{\infty}_{m=\text{odd}}a_{m}\frac{1}{(N+\frac12)^{m}}=\sum^{\infty}_{n=1}\frac{1}{n^2}$$

Where $a_1=1$ and $a_3=-\frac{1}{12}$ and so on. What am I really doing by approximating this way? The first term in the second summation is the integral approximation of the tail of the summation, this makes a lot of sense. However, I lose any intuitive sense of what on earth $(N+\frac12)^3$ etc. could be representing.

edit: In fact, the coefficients of the series seems to be given here https://oeis.org/A001896. Seeing the bernouli numbers here make it likely that it is related to https://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula. But I am specifically interested in casting this entire problem in the same kind of geometric approach of approximating a summation as the area under a curve, if possible.

1

There are 1 best solutions below

0
On

$$\sum^{N}_{n=1}\frac{1}{n^2}+\int^{\infty}_{N+\frac12}\frac{1}{x^2}dx\approx\sum^{\infty}_{n=1}\frac{1}{n^2}$$

This approximation relies on:

$$\int^{n+\frac12}_{n-\frac12}\frac{1}{x^2}dx=\frac{1}{n^2-\frac14}\approx\frac1{n^2}$$

Basically, we are approximating a bunch of rectangles described by $\frac{1}{n^2}$ using a smooth function described by $\frac{1}{x^2}$ where the smooth function splits the top edge of each rectangle in half. And instead of summing the areas of these rectangles, we integrate the smooth function. However, there is an imbalance in the way the smooth function approximates the area of each rectangle. The following image illustrates this idea (even though the illustrated function is not $\frac{1}{x^2}$)

image from https://www.dummies.com/education/math/calculus/how-to-approximate-area-with-midpoint-rectangles/

Here the two areas are labeled "roughly equal". Well, we can modify the approximating smooth function $\frac{1}{x^2}$ such that those two areas get more and more close to being equal - and in the limiting case, exactly equal. The way we can determine how to modify the approximating function is by finding the error term.

$$\int^{n+\frac12}_{n-\frac12}(\frac{1}{x^2}+f(x))dx=\frac1{n^2}$$

Differentiate both sides by n:

$$\frac{1}{(n+\frac12)^2}-\frac{1}{(n-\frac12)^2}+f(n+\frac12)-f(n-\frac12)=-\frac{2}{n^3}$$

$$f(n+\frac12)-f(n-\frac12)=\frac{16 n^2-2}{16 n^7-8 n^5+n^3}$$

Notice that the left side of the equation is approximately the limit definition of derivative for $f(n)$. And for large n, the right side of the equation will be approximately the ratio of the leading terms.

$$f'(n)\approx\frac{1}{x^5}$$

$$f(n)\approx-\frac{1}{4x^4}$$

If you go back to the original approximation and modify the integral, you will get a much faster converging approximation. You can iteratively calculate the next term in this series using this method.

$$\sum^{N}_{n=1}\frac{1}{n^2}+\int^{\infty}_{N+\frac12}\frac{1}{x^2}dx+\int^{\infty}_{N+\frac12}-\frac{1}{4x^4}dx\approx\sum^{\infty}_{n=1}\frac{1}{n^2}$$