You're correct. If you want to see a way to find the antiderivative without having known in advance, let $x=\tan(\theta), dx = \sec^2(\theta)$. Then the integral becomes $$\int \frac{1}{1+x^2} dx = \int \frac{1}{1+\tan^2(\theta)}\sec^2(\theta)d\theta = \int \frac{1}{\sec^2(\theta)}\sec^2(\theta) d\theta$$ $$= \int d\theta =\theta+C = \tan^{-1}(x)+C$$