# Transfer between integrals and infinite sums

So I was watching a video on YouTube about how $$\sum_{i=1}^\infty \frac{\chi(i)}{i} = \frac{\pi}{4}$$ (note that $$\chi(i) = 0$$ for even numbers $$i$$, $$1$$ for $$\text{mod}(i, 4) = 1$$, and $$-1$$ for $$\text{mod}(i,4) = 3$$) and one of the proofs shown involved stating that $$\sum_{i=1}^\infty \frac{\chi(i)}{i} = \int_{0}^{1} \sum_{i=0}^{\infty}\chi(i+1)x^{i}dx\,.$$ My question is 1.) how is this done and 2.) how can this be replicated with different infinite sums. Thanks in advance!

## 2 Answers

Note that, for all $$i\geq 1$$, $$\frac{1}{i} = \int_0^1 x^{i-1} dx$$ (this is a "trick" worth knowing), and therefore $$\sum_{i=1}^\infty \frac{\chi(i)}{i} = \sum_{i=1}^\infty \chi(i)\int_0^1 x^{i-1} dx = \int_0^1\sum_{i=1}^\infty \chi(i)x^{i-1} dx = \int_0^1\sum_{k=0}^\infty \chi(k+1)x^{k} dx$$ where the only part which would require justification is when we swap $$\int_0^1$$ and $$\sum_{i=1}^\infty$$: this is Tonelli-Fubini.

If you have a power series $$f(x):=\sum_{k=0}^\infty\,a_kx^k$$ with radius of convergence $$r\geq 1$$ ($$a_0,a_1,a_2,\ldots\in\mathbb{C}$$), then $$f_n|_{[0,1)}\to f|_{[0,1)}$$ uniformly on compact sets as $$n\to\infty$$, where $$f_n(x):=\sum_{k=0}^n\,a_kx^k\text{ for each }x\in\mathbb{C}\text{ and }n\in\mathbb{Z}_{>0}\,.$$ This provides a justification for swapping the infinite sum and the integral, that is, $$\int_0^1\,f(x)\,\text{d}x=\int_0^1\,\sum_{k=0}^\infty\,a_kx^k\,\text{d}x=\sum_{k=0}^\infty\,\int_0^1\,a_kx^k\,\text{d}x=\sum_{k=0}^\infty\,\frac{a_{k}}{k+1}\,.$$

In particular, the power series $$g(x):=\sum_{k=0}^\infty\,\chi(k+1)\,x^k$$ has radius of convergence $$\dfrac{1}{\limsup\limits_{k\to\infty}\,\sqrt[k]{\big|\chi(k+1)\big|}}=1$$. Therefore, you can swap the integral and the infinite sum to obtain $$\int_0^1\,g(x)\,\text{d}x=\int_0^1\,\sum_{k=0}^\infty\,\chi(k+1)\,x^k\,\text{d}x=\sum_{k=0}^\infty\,\frac{\chi(k+1)}{k+1}=\sum_{k=1}^\infty\,\frac{\chi(k)}{k}\,.$$

Note that $$x^4\,g(x)=g(x)-1+x^2$$, so $$g(x)=\frac{1-x^2}{1-x^4}=\frac{1}{1+x^2}\text{ for all }x\in\mathbb{C}\text{ such that }|x|<1\,.$$ That is, $$\sum_{k=1}^\infty\,\frac{\chi(k)}{k}=\int_0^1\,\frac{1}{1+x^2}\,\text{d}x=\arctan(x)\big|_{x=0}^{x=1}=\frac{\pi}{4}\,.$$

Alternatively, note that $$\chi(k)=\frac{\text{i}^k-(-\text{i})^k}{2\text{i}}\text{ for each }k=0,1,2,\ldots\,,$$ where $$\text{i}$$ is the imaginary unit $$\sqrt{-1}$$. From the Taylor series of the principal branch of the natural logarithm function $$\ln(1+z)=\sum_{k=1}^\infty\,\frac{(-1)^{k-1}}{k}\,z^k\,,$$ we note that the series above converges for $$z=\pm \text{i}$$, yielding $$\frac{1}{2}\,\ln(2)+\text{i}\frac{\pi}{4}=\ln(1+\text{i})=-\sum_{k=1}^\infty\,\frac{(-\text{i})^k}{k}$$ and $$\frac{1}{2}\,\ln(2)-\text{i}\frac{\pi}{4}=\ln(1-\text{i})=-\sum_{k=1}^\infty\,\frac{\text{i}^k}{k}\,.$$ Subtracting the two equations above and dividing the result by $$2\text{i}$$ yields $$\frac{\pi}{4}=\sum_{k=1}^\infty\,\frac{\text{i}^k-(-\text{i})^k}{2\text{i}\,k}=\sum_{k=1}^\infty\,\frac{\chi(k)}{k}\,.$$

• For all this to work, you need to show that $g(1)$ converges and that seems to be the crux of the matter. – Matematleta Nov 21 '18 at 0:44
• @Matematleta No, I don't need to know that. The integral can be viewed as the integral on the interval $[0,1)$. The important thing is that $g(x)$ converges absolutely for $x\in[0,1)$, and that the partial sums of $g(x)$ converge to $g(x)$ uniformly on compact sets. And in fact, $g(1)$ diverges. – Batominovski Nov 21 '18 at 0:48
• Right. So, as it stands, $\int_0^1\,g(x)\,\text{d}x$ does not make sense. If you want to use the DCT, what is your dominating function? – Matematleta Nov 21 '18 at 0:54
• @Matematleta I wasn't using the Dominated Convergence Theorem. It is a well known result that if $f_n\to f$ uniformly on compact sets (i.e., $f_n$ compactly converges to $f$) and $E\subset \mathbb{R}$ is a measurable set of finite measure, then $\int_E\,f_n\to \int_E\,f$. But sure, if you want to use that theorem, then you can take the dominating function to be $1$. For all $x\in[0,1)$, $\big|g(x)\big|\leq 1$. – Batominovski Nov 21 '18 at 0:59
• Got it! Thanks. I did not use the correct def of $\chi.$ As for the well-known result, yes I know it, and my question is how does it apply since the partial sums of $g$ do not even converge pointwise on the compact set $[0,1]$,never mind uniformly. (Convergence fails at $x=1.$) – Matematleta Nov 21 '18 at 1:18