What we are trying to find is:
\[ \int \arctan(x) \ dx \]
We are going to use integration by parts:
\[ \int u \ dv = uv - \int v \ du\]
Let's define \(u\) and \(v\):
\[\begin{gathered} u = \arctan(x), du= \frac{dx}{x^2 +1} \\ v = x , dv = dx \end{gathered}\]
This means:
\[ \int \arctan(x) \ dx = x(\arctan(x)) - \int \frac{x}{x^2 +1} \ dx\]
The derivative of \(\ln(x^2 +1)\) is \(\frac{1}{x^2 +1} *2x\), this means:
\[ \int \arctan(x) \ dx = x(\arctan(x)) - \left( \frac{1}{2} \ln(x^2 +1) \right) + C\]