In this problem, we compute the integral arctan(1/x). Integration by parts is useful here, because we can let u=arctan(1/x) and we know the derivative of u is a nice algebraic function, because the derivative of the inverse tangent is 1/(1+x^2). In this case, we combine inverse tangent with the chain rule to obtain the differential of u, and dv=dx, so v=x.
We apply integration by parts and arrive at an integral that is easy to put in a guessable form: 1/(x^2+1) with an x in the numerator. Supplying a 2 to the numerator (and putting a 1/2 out in front), we obtain a guessable integral giving the natural log function.
Finally, we tack on a +C to obtain the general antiderivative, and we're done!