Solving of an integral $$\int \left(\frac{x^2 + \arctan(x)}{1 + x^2}\right) dx$$
Could anyone help me calculate this integral? Thanks in advance.

Break the integral in two : 
$$ \int \frac{ x^2 }{x^2 + 1} dx + \int  \frac{ \arctan x }{1 + x^2} dx $$
To solve the second one : Notice $d( \arctan x ) = \frac{ dx}{1 + x^2} $ So
$$ \int \frac{ \arctan x }{1 + x^2} dx = \int \arctan x\, d(\arctan x ) = (\arctan x)^2/2 + K$$
As for the first integral, notice
$$ \int \frac{ x^2}{1 + x^2} = \int \frac{ x^2 + 1 - 1 }{1+x^2} dx = \int dx - \int \frac{ 1}{1 + x^2 } dx = x - \arctan x  $$
