*My goal here is to get a simple expression for $\zeta(3)$. This is a follow up to my previous question posted [here][1]. 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<q$. 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][2]), 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<q$ 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][3] 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.

[![enter image description here][4]][4]

**Towards a solution**

For $G_1$, we have, using  [integral-calculator.com][5] (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$.

[![enter image description here][6]][6]

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$.


  [1]: https://dsc.news/3i9P1kh
  [2]: https://www.wolframalpha.com/input/?i=sum%20%28-1%29%5E%28k%2B1%29%2F%28%28qk%29%5E2-p%5E2%29%2C%20k%3D0..infinity
  [3]: https://www.wolframalpha.com/input/?i=sum%20%28-1%29%5E%28k%2B1%29%2F%2816%20k-1%29%2C%20k%3D1..infinity
  [4]: https://i.sstatic.net/wlXgB.png
  [5]: https://www.integral-calculator.com/
  [6]: https://i.sstatic.net/UFhSO.png