# Elementary solution to $\int \frac{1}{x^5+1} \, dx$ [duplicate]

Since the original question is heavily downvoted, I'm not sure if the moderators will delete it before I can post my answer.

Here's my attempt:

Following JG's remarks, we have

$$x^5 + 1 = \frac14(x+1)(2x^2 + x(\sqrt5 - 1) + 2)(2x^2 - x(\sqrt5 - 1) + 2)$$

Then by partial fractions, we have $$\dfrac1{x^5 + 1} = \dfrac4{(x+1)(2x^2 + x(\sqrt5 - 1) + 2)(2x^2 - x(\sqrt5 - 1) + 2)}$$ is equal to $$\dfrac2{5+\sqrt5} \cdot \dfrac1{x+1} -\dfrac{4\sqrt5}{(\sqrt5 - 1)(5+\sqrt5)} \cdot \dfrac x{2x^2 - x(\sqrt5 - 1) + 2} + \dfrac4{(\sqrt5-1)(5+\sqrt5)} \cdot \dfrac{x + \sqrt5 + 1}{2x^2 + x(\sqrt5 - 1) + 2}$$

What's left is to apply $$\int \dfrac1{x^2+a^2} \, dx = \frac1a \tan^{-1} (\frac xa) + C$$ and $$\int \dfrac{1}{x^2-a^2}\, dx = -\frac 1a \tanh^{-1} (\frac xa) + C$$.

Obviously all the calculations above are fairly tedious. Is there a(another) way to evaluate this indefinite integral?

To clarify, I'm not interested to see ANY roots of unity ($$\omega$$) in the final result.

Naturally, I'm also interested if there's other approach is applicable for the indefinite integral of $$\frac1{x^n + 1}$$ for all positive integers $$n$$.

• Well the answer can be seen: wolframalpha.com/input/?i=integrate+1%2F%28x%5E5%2B1%29 The point is: it IS complex and therefore the calculations ARE tedious. So you'll have to do the work which you already started. It's going to get even worse for larger $n$ ... – Andreas Sep 18 '20 at 12:00
• If you don't mind infinite series, $1/(x^5+1)=1-x^5+x^{10}+x^{15}-\cdots$ and you can integrate term-by-term. – Gerry Myerson Sep 18 '20 at 13:12
• In THIS ANSWER, I developed a closed form solution to the indefinite integral $\int \frac1{1+x^n}\,dx$ for $n\in \mathbb{Z}$. In that answer, I referenced my answer posted HERE, which was relevant for $n\in \mathbb{N}$. – Mark Viola Sep 18 '20 at 15:20
• Thank you Mark and Arctic! They certainly helped! – GohP.iHan Sep 18 '20 at 16:57

With $$\phi_{\pm} = \frac{1\pm\sqrt5}{4}$$

$$x^5+1= (1+x)(x^2-2\phi_+x+1)(x^2-2\phi_-x+1)$$ and

$$\frac{5}{1+x^5}=\frac1{x+1}- \frac{2\phi_+x-2}{x^2-2\phi_+x+1} - \frac{2\phi_-x-2}{x^2-2\phi_-x+1}$$

The integral for the first term is just $$\ln(x+1)$$, and for the second and third terms

\begin{align} I(x,\phi) &= \int \frac{2\phi x-2}{x^2-2\phi x+1}dx =\int \frac{\phi d[(x-\phi)^2] -2(1-\phi^2)dx}{(x-\phi)^2 +(1-\phi^2)} \\ &=\phi\ln\left(x^2-2\phi x+1\right) -2\sqrt{1-\phi^2} \tan^{-1}\frac{x-\phi}{\sqrt{1-\phi^2}} \end{align}

Thus

$$\int \frac{1}{1+x^5}dx=\frac15\left[\ln(x+1)-I(x,\phi_+)-I(x,\phi_-)\right] + C$$