`int(x^2+1+1/(x^2+1))dx`

apply the sum rule,

`=intx^2dx+int1dx+int1/(x^2+1)dx`

To evaluate the above integrals, we know that,

`intx^ndx=x^(n+1)/(n+1)` and `int1/(x^2+1)dx=arctan(x)`

using above,

`=x^3/3+x+arctan(x)+C` where C is constant

`int(x^2+1+1/(x^2+1))dx`

apply the sum rule,

`=intx^2dx+int1dx+int1/(x^2+1)dx`

To evaluate the above integrals, we know that,

`intx^ndx=x^(n+1)/(n+1)` and `int1/(x^2+1)dx=arctan(x)`

using above,

`=x^3/3+x+arctan(x)+C` where C is constant