Consider the function $$f=f(a,b,x)=\sum_{n=0}^\infty\frac{x^n}{an+b}=\frac 1 a\sum_{n=0}^\infty\frac{x^n}{n+\frac b a}$$ Where $a,b$ are coprime integers. This function is interesting because of the BBP formula: $$\pi=4f\left(8,1,\frac 1{16}\right)-\frac12f\left(2,1,\frac 1{16}\right)-f\left(8,5,\frac 1{16}\right)-\frac12f\left(4,3,\frac 1{16}\right)$$ $$\left(fx^\frac b a\right)' =\frac 1 a \sum_{n=0}^\infty x^{n+\frac b a -1}=\frac{x^{\frac b a -1}}{a(1-x)}$$ $$f=\frac 1 a x^{-\frac b a}\int\frac{x^{\frac {b-a} a}}{1-x}dx$$
Let $x=y^a$
$$\int\frac{x^{\frac {b-a} a}}{1-x}dx=a\int \frac{y^{b-1}}{1-y^a}dy$$
Let $\omega$ be the primitive $a$-th root of unity. Then the partial fraction decomposition of the integrand is
$$\frac{y^{b-1}}{1-y^a}=\frac{y^{b-1}}{a}\sum_{h=0}^{a-1}\frac{\omega^h}{\omega^h-y}$$
And the rest is boring computation to find that
$$\int\frac{x^{\frac {b-a} a}}{1-x}dx=\sum_{h=0}^{a-1}\left(\omega^{bh}\ln\left(1-x^\frac 1 a \omega ^{-h}\right)+\sum_{n=1}^{b-1}\frac{x^\frac n a \omega^{(b-n)h}} n \right)$$ Where the principal branch of the logarithm is taken. Which means $$f=\frac 1 a x^{-\frac b a}\sum_{h=0}^{a-1}\left(\omega^{bh}\ln\left(1-x^\frac 1 a \omega ^{-h}\right)+\sum_{n=1}^{b-1}\frac{x^\frac n a \omega^{(b-n)h}} n \right)$$ This is pretty inelegant. Is there a way to simplify this expression, preferably without using complex logarithms?