# Simple closed forms for sums such as $\sum_{k=1}^\infty \frac{(-1)^{k+1}}{qk - p}$ and related integrals

My goal here is to get a simple expression for $$\zeta(3)$$. This is a follow up to my previous question posted here. Any Taylor-like expansion from everything I tried won't make it. So this is my last trick hoping I get something interesting.

By simple, I mean a finite sum involving only logarithms and trigonometric functions. Here $$p, q$$ are integers with $$q>0$$ and $$p. Let us define $$G_1(p,q)=\sum_{k=1}^\infty \frac{(-1)^{k+1} q}{qk-p}=\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k-\frac{p}{q}}$$ $$G_2(p,q)=\sum_{k=1}^\infty \frac{(-1)^{k+1} q^2k}{(qk)^2-p^2} =\sum_{k=1}^\infty \frac{(-1)^{k+1} k}{k^2-\Big(\frac{p}{q}\Big)^2}$$

$$G_3(p,q)= \frac{G_2(p,q)-\log 2}{p^2/q^2} = \sum_{k=1}^\infty \frac{(-1)^{k+1} }{k\Big[k^2-\Big(\frac{p}{q}\Big)^2\Big]}$$ It is easy to establish the following: $$G_1(p,q) = \int_0^\infty \frac{\exp{\Big(\frac{p}{q}\cdot x\Big)}}{1+\exp x}dx$$ $$G_2(p,q)=\int_0^\infty \frac{\cosh{\Big(\frac{p}{q}\cdot x\Big)}}{1+\exp x}dx.$$ $$\lim_{q\rightarrow\infty} G_3(1,q) =\frac{3\zeta(3)}{4}$$ Interestingly (see Mathematica computation here), we have: $$\sum_{k=1}^\infty \frac{(-1)^k }{k^2-\Big(\frac{p}{q}\Big)^2} =\frac{3}{2}\Big(\frac{p}{q}\Big)^2 +\frac{\pi}{2}\Big(\frac{p}{q}\Big)^{-1}\csc\Big(\pi\cdot \frac{p}{q}\Big).$$

Unfortunately, I could not find such formulas for $$G_1$$ or $$G_2$$. The last formula is especially appealing in the following sense. Assume $$p,q\rightarrow\infty$$ in such a way that $$\frac{p}{q}\rightarrow\alpha$$ where $$\alpha$$ is an irrational number. Then we have a simple closed form for the sum even if $$\frac{p}{q}$$ is replaced by an irrational number.

My question

Is it possible to obtain such a simple expressions for $$G_1$$ and $$G_2$$, maybe a sum involving $$q+1$$ terms? Both integrals can be computed in closed form, even the indefinite integrals, when $$p,q$$ are integers with $$p and $$q>0$$. I obtained a closed form for $$G_2$$ (see next section) and my guess is that $$G_1$$, even though a bit trickier, has also a simple closed form, see here or picture below for the case $$q=16, p=1$$. The next section provides hints about how to solve this problem.

The last section is about my second question: there is something that looks very mysterious to me, and maybe someone can provide some insights about that mystery.

Towards a solution

For $$G_1$$, we have, using integral-calculator.com (based on the Maxima symbolic math solver): $$\int \frac{\exp(px/q)}{1+e^x}dx=\sum_{\left\{w:\>w^q+1=0\right\}} w^{p-q} \cdot\log\Big(\Big|e^{x/q}-w\Big|\Big)+C.$$

The sum is over all $$q$$ (mostly complex) roots of $$w^q+1=0$$. I don't know what the symbol $$|\cdot|$$ stands for in the complex logarithm function. A similar formula, albeit more intricate, also exists for $$G_2$$, and eventually (after considerable cleaning and assuming $$|\cdot|$$ is the absolute value) it leads to:

$$G_2(p,q)=\frac{q}{2p}+\frac{1}{2}\sum_{j=0}^{q-1}\cos\Big[(2j+1)\frac{p\pi}{q}\Big]\log\Big(1-\cos\Big[(2j+1)\frac{\pi}{q}\Big] \Big).$$

Below is a bar chart showing the values of the $$q$$ terms in the summation, from $$j=0$$ on the far left to $$j=q-1$$ on the far right on the X-axis. Here $$q=1103$$ and $$p=799$$.

Note that I did not really prove the result. All I did was to use a symbolic math calculator for the indefinite integrals and for the few definite integrals that it was able to solve exactly (small values of $$p$$ and $$q$$). I found a pattern in the indefinite integrals when $$q$$ is a power of 2, turned to the definite integrals, plugged in the unitary complex roots in the formula, did a lot of cleaning, and tested my formula for various $$p,q$$ against values that were obtained numerically. It worked, and it even worked when $$q$$ is not a power of 2. Below is the code to compute $$G_2(p,q)$$. It is trivial, and the only reason I provide it is in case my formula has a typo: the code below is correct for sure.

$$pi=3.141592653589793238462643383279;$$q=11;
$p=7; $$sum=0; for ($$j=0; $$j<$$q; $$j++) { theta=((2*j+1)*pi)*(p/q); theta2=((2*j+1)*pi)/q; sum+=(cos(theta)*log(1-cos(theta2)))/2; }$$sum+=($$q/(2*$$p)); print "($$p/$$q):$sum\n";


My second question

If you look at my formula for $$G_2(p,q)$$ in the previous section, it does not seem to be a function of $$\frac{p}{q}$$. Yet I know it must be one. How can I write $$G_2(p,q)$$ explicitly as a function of $$\frac{p}{q}$$ only, say $$G_2(\frac{p}{q})$$? I am also interested in some expansion of $$G_2$$ when $$p,q\rightarrow\infty$$ and $$\frac{p}{q}\rightarrow\alpha$$.

Note that $$2\sum_{k=1}^{2n}\frac{(-1)^{k-1}}{k-a} =2\sum_{j=1}^n\Big(\frac1{2j-1-a}-\frac1{2j-a}\Big) =\sum_{j=1}^n\Big(\frac1{j-(1+a)/2}-\frac1{j-a/2}\Big).$$ Also, $$\sum_{j=1}^n\frac1{j+b}=\ln n-\psi(1+b)+o(1)$$ (as $$n\to\infty$$), where $$\psi$$ is the digamma function. So, your $$G_1$$ is $$g_1(a):=\tfrac12\,[\psi(1-a/2)-\psi(1/2-a/2)],$$ where $$a:=p/q$$.

$$G_2$$ can be handled similarly, by first using the partial fraction decomposition $$2\frac k{k^2-a^2}=\frac1{k-a}+\frac1{k+a}.$$ So, your $$G_2$$ is $$\tfrac12\,[g_1(a)+g_1(-a)]=\tfrac14\,[\psi(1-a/2)-\psi(1/2-a/2)+\psi(1+a/2)-\psi(1/2+a/2)],$$ where again $$a=p/q$$.

Now, to rewrite these expressions for $$G_1$$ and $$G_2$$ in terms of the logarithmic and trigonometric functions, use the trivial identity $$\psi(z+1)=\psi(z)+1/z$$ and the Gauss digamma theorem.

In particular, we get $$G_1=\frac12\,\ln\frac{q-p}{2q-p} \\ +\frac\pi4\,\cot\frac{(q-p)\pi}{2q}-\frac\pi4\,\cot\frac{(2q-p)\pi}{2q}\\ +\sum_{n=1}^{q-1}\Big(\cos\frac{(2q-p)\pi n}q-\cos\frac{(q-p)\pi n}q\Big) \ln\sin\frac{\pi n}{2q} \\ =\frac12\,\ln\frac{q-p}{2q-p} \\ +\frac\pi4\,\tan\frac{p\pi}{2q}+\frac\pi4\,\cot\frac{p\pi}{2q} \\ +\sum_{n=1}^{q-1}[1-(-1)^n]\cos\frac{p\pi n}q\, \ln\sin\frac{\pi n}{2q},$$ as desired. Similarly, for $$G_2$$, using the identity $$\psi(1+a/2)=\psi(a/2)+2/a$$.

• @ Iosif: thanks for your insights. I know these sums can be expressed in terms of digamma functions or their derivatives. But I want a formula based on simpler functions - log or trigonometric functions. Essentially, my goal is to get an exact original formula for $\zeta(3)$, as per my last post (see dsc.news/3i9P1kh). Sep 8, 2020 at 8:52
• Thanks for the link to the Gauss digamma theorem. Sep 8, 2020 at 10:27
• There are numerical algorithms for determining whether given constants, like $\zeta(3)$, have expressions in terms of simple functions. Might be worth looking at the work of David Bailey, Jonathan Borwein and the like. Sep 8, 2020 at 10:41
• @VincentGranville : I have now written out the expression of for $G_1$ in terms of the logarithmic and trigonometric functions, as you apparently desired. The case of $G_2$ is quite similar, since $\psi(1+a/2)=\psi(a/2)+2/a$. Sep 8, 2020 at 12:31
• @VincentGranville : I have now simplified the expression for $G_1$, using expressions for $f(t+k\pi/2)$, where $f$ is a trigonometric function function and $k$ is an integer. Sep 8, 2020 at 20:42