Closed form for $\int \frac{1}{x^7 -1} dx$?

I want to calculate:

$$\int \frac{1}{x^7 -1} dx$$

Since $\displaystyle \frac{1}{x^7 -1} = – \sum_{i=0}^\infty x^{7i} $, we have $\displaystyle(-x)\sum_{i=0}^\infty \frac{x^{7i}}{7i +1} $.

Is there another solution? That is, can this integral be written in terms of elementary functions?

Solutions Collecting From Web of "Closed form for $\int \frac{1}{x^7 -1} dx$?"

Factorise $x^{7}-1$ and use partial fractions – I do not expect your answer to be nice. You should get 3 unfactorable quadratics which will contribute $\tan^{-1}$ terms, and one factor $x-1$ which will give some multiple of $\ln(x-1)$.

To perform the actual factorisation, note that the roots of $x^{7}=1$ are $e^{\frac{2ni\pi}{7}}=\cos(2n\pi/7)+i\sin(2n\pi/7)$ for, say, $n\in\{-3,-2,-1,0,1,2,3\}$. Thus we can factorise as follows:
$$x^{7}-1=(x-e^{-6i\pi/7})(x-e^{-4i\pi/7})(x-e^{-2i\pi/7})(x-1)(x-e^{2i\pi/7})(x-e^{4i\pi/7})(x-e^{6i\pi/7})$$
Now note that $(x-e^{i\theta})(x-e^{-i\theta})=x^{2}-(e^{i\theta}+e^{-i\theta})x+1=x^{2}-2x\cos\theta+1$ is a real-valued quadratic, and hence if we group the linear complex factors into pairs like this, we can get 3 real quadratics as we wanted. The factorisation becomes
$$x^{7}-1=(x^{2}-2c_{1}x+1)(x^{2}-2c_{2}x+1)(x^{2}-2c_{3}x+1)(x-1)$$
where $c_{k}=\cos(2k\pi/7)$.
Now try partial fractions – you need to find constants $A_{1}\ldots A_{7}$ such that
$$\frac{1}{x^{7}-1}=\frac{A_{1}x+A_{2}}{x^{2}-2c_{1}x+1}+\frac{A_{3}x+A_{4}}{x^{2}-2c_{2}x+1}+\frac{A_{5}x+A_{6}}{x^{2}-2c_{3}x+1}+\frac{A_{7}}{x-1}$$
By multiplying by each factor, you can get a set of seven linear equations for your seven constants, which you can solve by any method you choose. This will be very unpleasant. Integrating the last term is trivial (simply $A_{7}\ln(x-1)$) and the quadratic terms are less so. Taking the first term as an example, note $$x^{2}-2c_{1}x+1=(x-c_{1})^{2}+(1-c_{1}^{2})=(1-c_{1}^{2})\left[\left(\frac{x-c_{1}}{\sqrt{1-c_{1}^{2}}}\right)^{2}+1\right]$$
So, making the substution $u=\frac{x-c_{1}}{\sqrt{1-c_{1}^{2}}}$ will give you some terms of the form $\frac{2au+b}{u^{2}+1}$ which trivially integrates to $a\ln(u^{2}+1)+b\tan^{-1}(u)$. The arithemtic of finding these constants is left as an exercise for you.

Allowing complex numbers, we can write
$$
\int \frac{dx}{x^7-1} = \frac{1}{7}\left(\log(x-1) + \sum_{k=1}^6 \exp(i 2\pi k/7) \log\big(x-\exp(i 2 \pi k/7)\big)\right) + C .
$$

Let u=x^2 and solve using u substitution.

=> 1/6 ln((x^6-1)/x^6)