How do I get a closed form of $$\int\frac{x^n}{1+x^m}dx$$
Background: There were many times that, when I put an integral of the form: $$\int_{-\infty}^\infty\frac{x^n}{1+x^m}dx$$in Wolfram Alpha, it gives the indefinite integral too. So I wonder if there is a closed form expression for this indefinite integral.
I know that when $n=m-1$ we easily obtain $\frac{1}{m}\ln(1+x^m)+C$, but other than that I don't know how to obtain the general form. Integration by parts would be too tedious.