Evaluating $\int\frac{x^b}{1+x^a}~dx$ for $a,b\in\Bbb N$ 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)$$
where
$$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
$$\int\frac{bx^{b-1}}{1+x^a}~dx$$
Thus, the given integral in question is really
$$\int\frac{x^b}{1+x^a}~dx$$
By expanding with the geometric series and termwise integration, one can see that
$$\int_0^p\frac{x^b}{1+x^a}~dx=\sum_{k=0}^\infty\frac{(-1)^kp^{ak+b+1}}{ak+b+1}=\frac{p^{b+1}}a\Phi\left(-p^a,1,\frac{b+1}a\right)$$
where $\Phi$ is the Lerch transcendent.
A few particular cases that arise may be found:
\begin{align}\int\frac1{1+x^{1/n}}~dx&=C+(-1)^{n+1}n\left[\ln(1+x^{1/n})+\sum_{k=1}^{n-1}\frac{(-x^{1/n})^k}k\right],&a=1\\\int\frac1{1+x^{2/n}}~dx&=C+(-1)^nn\left[\arctan(x^{1/n})+\frac1{x^{1/n}}\sum_{k=1}^{(n-1)/2}\frac{(-x^{2/n})^k}{2k-1}\right],&a=2,n\ne2b\end{align}
Or, more generally, with $x=t^{an+1}$,
$$\int\frac1{1+x^{a/(an+1)}}~dx=(-1)^{n+a}(an+1)\left[\int\frac1{1+t^a}~dt+\frac1{x^{(a-1)/(an+1)}}\sum_{k=1}^{(n-1)/a}\frac{(-x^{a/(an+1)})^k}{a(k-1)+1}\right]$$
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,
$$\int\frac1{1+x^{3/2}}~dx=C+\frac16\left[\log(1-x^{1/2}+x)-2\log(1+x^{1/2})+2\sqrt3\arctan\left(\frac{2x^{1/2}-1}{\sqrt3}\right)\right]$$
 A: 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 ...
A: 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)
$$
