Integrate it in step by step applying integration by partial fraction.

∫(x^3)/(x^2+1)dx

First, do a long division

x^3/(x^2+1) = x - x/(x^2+1)

for the 2nd term, let u=x^2+1