<s>[INST] Long division in integration by partial fractions I am trying to figure out what my book did, I can't make sense of the example.
"Since the degree of the numberator is greater than the degree of the denominator, we first perform the long division. This enables us to write
$$\int \frac{x^3 + x}{x -1} dx = \int \left(x^2 + x + 2 + \frac{2}{x-1}\right)dx = \frac{x^3}{3} + \frac{x^2}{2} + 2x + 2\ln|x-1| + C$$
I am mostly concerned with the transformation of the problem by long division I think.
I attempt to do this on my own.
$(x+1)$ and $(x^3 + x)$ inside the long division bracket
I am left with $x^2 - 1$ on top and a leftover -1
This is not in their answer, I do not know how they did that.
 [/INST] Your first term is indeed $x^2$. Then $$x^3+x-x^2(x-1)=x^3+x-(x^3-x^2)=x^2+x,$$ and so your next term is $x$. Then $$x^2+x-x(x-1)=x^2+x-(x^2-x)=2x,$$ so your next term is $2$. Finally, $2x-2(x-1)=2$, so your remainder is $2$. I suspect you simply made an arithmetic error. It always helps to check your answer, and indeed, $$(x^2-1)(x-1)+-1=x^3-x^2-x+1-1=x^3-x^2-x\not\equiv x^3+x.$$
</s>