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

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

do one step of a long division to get

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

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

= ∫( 1 - 1/(x^2+1))dx
= x - tan^-1 (x) + c ,

the last part should be part of your repertoire of integrals