In this previous answer, MV showed that for $n\in\Bbb N$,

$$\int\frac1{1+x^n}~dx=C-\frac1n\sum_{k=1}^n\left(\frac12 x_{kr}\log(x^2-2x_{kr}x+1)-x_{ki}\arctan\left(\frac{x-x_{kr}}{x_{ki}}\right)\right)$$


$$x_{kr}=\cos \left(\frac{(2k-1)\pi}{n}\right)$$

$$x_{ki}=\sin \left(\frac{(2k-1)\pi}{n}\right)$$

I am now interested in the case of $n=\frac ab\in\Bbb Q^+$. By substituting $x\mapsto x^b$, we get


Thus, the given integral in question is really


By expanding with the geometric series and termwise integration, one can see that


where $\Phi$ is the Lerch transcendent.

A few particular cases that arise may be found:


Or, more generally, with $x=t^{an+1}$,


which reduces down to the previously solved problem.

But what of the cases when $n=a/b$ with $(b\bmod a)\ne0,1$?

For example,


  • $\begingroup$ From wolfram and the previous answer, the only approach I could think of would be seeing if the hypergeometric function form reduces in the case where a/b is rational. $\endgroup$
    – Tyberius
    Sep 1, 2017 at 18:41
  • $\begingroup$ @Tyberius :-P In terms of complexity, I place Lerch transcendents below hypergeometric functions, but yes, it can also be written in terms of hypergeometric functions. $\endgroup$ Sep 1, 2017 at 20:47

2 Answers 2


Let $\gamma=\exp(2\pi i/a)$. The polynomial $Q(x)=x^a+1$ has $a$ simple roots $z_k=\gamma^{k+1/2}$, $0\leq k<a$. Since $z_k^a=-1$, we have $Q'(z_k)=a z_k^{a-1}=-a z_k^{-1}$, so $$ \frac{1}{Q(x)} = \sum_{k=0}^{a-1} \frac{1}{Q'(z_k)} \frac{1}{x-z_k} = -\frac{1}{a} \sum_{k=0}^{a-1} \frac{z_k}{x-z_k} $$

For the numerator we first make a reduction in the degree (when $b\geq a$).

Let $p= b \mod a \in \{0,1,...,a-1\}$ and $m=(b-p)/a$. Then $$ \frac{x^b - (-1)^m x^p}{x^a + 1} = \sum_{j=1}^m (-1)^j x^{b-ja} $$ We deduce that $$ \frac{x^b}{x^a+1} - \sum_{j=1}^m (-1)^j x^{b-ja} = \frac{(-1)^mx^p}{x^a+1} = - \frac{(-1)^m}{a} \sum_{k=0}^{a-1} z_k \frac{x^p}{x-z_k}= - \frac{(-1)^m}{a} \sum_{k=0}^{a-1} \frac{z_k^{p+1}}{x-z_k} $$ The last equality follows from the fact that the difference is a polynomial which must vanish since $p<a$. So a part from the trivial part on the LHS (which I leave aside), the problem is reduced to integrating the RHS. We have

$$ - \int \frac{(-1)^m}{a} \sum_{k=0}^{a-1} \frac{z_k^{p+1}}{x-z_k}dx = - \frac{(-1)^m}{a} \sum_{k=0}^{a-1} z_k^{p+1} \ln (x-z_k) $$ To avoid complex log and too long formulas, let us write
$$ u_{k,p} = \cos \left( \frac{2\pi (k+1/2)(p+1)}{a}\right) , \; \; v_{k,p} = \sin \left( \frac{2\pi (k+1/2)(p+1)}{a}\right) , \; \; $$ Using $\overline{z_{a-1-k}} = z_{k} = u_{k,0}+i v_{k,0}$ we obtain for $a$ even: $$ - \frac{(-1)^m}{2a} \sum_{k=0}^{\lfloor a/2 \rfloor} \left[ u_{k,p} \ln \left(x^2- 2 u_{k,0} x+1\right) + v_{k,p} \arctan \frac{x-u_{k,0}}{v_{k,0}} \right] $$ For $a$ odd you should add to this expression the "middle term" (which has no arctan part) $$ \frac{(-1)^{m+p}}{a} \ln(x+1) $$ No guarantee for the above being free of errors ...


One can use this answer for evaluating $\dfrac1{1+x^a}$ in the following form $$\frac1{1+x^a}=\sum_{k=1}^aa_k(x-x_k)^{-1} \tag {2}$$ where $a_k=\frac{-x_k}{n}$ and $x_k=e^{i(2k-1)\pi/n}$, $k=1, \cdots,n$

After that this integral can be evaluate

$$\int\frac{x^b}{1+x^a}~dx=\int\sum_{k=1}^aa_k(x-x_k)^{-1} (x-x_k+x_k)^b= \int\sum_{k=1}^aa_k(x-x_k)^{-1} \sum_{l=0}^b C_b^l(x-x_k)^l x_k^{b-l} $$ $$ =-\sum_{k=1}^a\Big(\sum_{l=1}^b\frac{C_b^l}{ln}(x-x_k)^l x_k^{b-l+1}+x_k^{b+1}\log(x-x_k)\Big) $$

  • $\begingroup$ Would prefer the solution to only involve real numbers, but will see where this leads. You also appear to have a typo on the last line. $\endgroup$ Sep 2, 2017 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.