# Writing sums as integrals

There are many proofs of the Basel problem (see this wonderful thread Different ways to prove $\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}$ (the Basel problem)), many of which require a step writing either $$\log (1-x)$$ or $$1/(1-x)$$ as their power series to go from the sum $$\sum 1/n^2$$ to an integral.

Is there a way to go from the sum to an integral without using these power series representations, but rather writing the sum directly as an integral? By "writing a sum as integral" I mean calculus-first-course-style things like $$\lim _{N\rightarrow \infty }\frac {1}{N}\sum _{n=1}^N\frac {1}{1+n/N}=\int _0^1\frac {dx}{1+x}.$$

• Are you specifically asking about trying to recognize the Basel problem as a Riemann sum? Commented May 7 at 22:20
• ye... is it for some reason clearly not possible or a non-sensible request? Commented May 7 at 23:04
• If it were possible, Euler would have discovered it. More seriously, there may be a positive answer to your question but I'm pretty sure it would be quite complicated, more than the answers you linked to. Commented May 8 at 18:21
• ye sure i'd not expect it to be any simpler because it would already been written down, but i thought i'd check if there isn't something not too much more complicated than the power series stuff Commented May 8 at 22:05
• \begin{align}\lim _{N\rightarrow \infty }\frac {1}{N}\sum _{n=1}^{N-1}\frac {\ln\left(\frac{n}{N}\right)}{n/N-1}=\int _0^1\frac {\ln xdx}{x-1}=\zeta(2)\end{align}
– FDP
Commented May 9 at 10:19

If you are looking for a Riemann sum take in account: $$I=\int_{0}^{\pi/2}\left(\frac{1}{x^2}-\frac{1}{\sin^2{x}} \right)dx=-\frac{2}{\pi}\tag{1}.$$ Consider the partition: $$P_{n}=\frac{\pi k}{2n}$$ then $$I$$ can be rewritten as: $$\lim_{n}\left(\pi\sum_{k=1}^{n}\frac{1}{n(\cos{(\frac{\pi k}{n}})-1)}+\frac{2n}{\pi}\sum_{k=1}^{n}\frac{1}{k^2}\right)=-\frac{2}{\pi}\tag{2}.$$ Or which is the same: $$\frac{\pi^2}{2}\sum_{k=1}^{n}\frac{1}{n^2(1-\cos{(\frac{\pi k}{n}}))} \sim \sum_{k=1}^{n}\frac{1}{k^2} \tag{3}.$$ So to solve the Basel problem is enough to show that. $$\lim_{n}\frac{1}{n^2}\sum_{k=1}^{n}\frac{1}{(1-\cos(\frac{\pi k}{n}))}=\frac{1}{3}\tag{4}.$$ This can be solved following Spivak's calculus book.

Updated

It can be proven by induction that (check it): $$\sum_{k=1}^{n}\frac{1}{(1-\cos(\frac{\pi k}{n}))}=\frac{2n^2+1}{6}\tag{5},$$ then using $$(5)$$ we can conclude $$(4)$$ and $$(3)$$ which is the Basel problem.

• which part of spivak? (i'll read your answer more carefully in a moment...) Commented May 10 at 10:24
• @tomos I don't remember well but if you search on the Basel problem Spivak evaluates a limit like $(4)$ and proves the famous identity.
– User
Commented May 10 at 19:16
• @tomos I've updated it.
– User
Commented May 18 at 12:40
• ah sorry for not getting back to you... thanks for this answer! Commented May 22 at 14:08

One of the things you can do sometimes is: $$\sum_{k=a}^b f(k)=\sum_{k=a}^b\int_{\sigma_1}^{\sigma_2}\bar f(x,k) dx=\int_{\sigma_1}^{\sigma_2}\sum_{k=a}^b \bar f(x,k) dx$$ Which doesn't say much at first sight, but an example:
One of the definitions of harmonic numbers: $$H_n= \sum_{k=1}^n \frac{1}{k}= \sum_{k=1}^n \int_0^1 x^{k-1} dx=\int_0^1 \sum_{k=1}^n x^{k-1}dx=\int_0^1 \sum_{k=0}^{n-1} x^{k}dx=\int_0^1\frac{1-x^n}{1-x}dx\\\forall n\ge1$$

• i think this is using the geometric series, which is what i want to avoid Commented May 22 at 14:08