Primitive of Function of Arctangent

Theorem

 * $\displaystyle \int F \left({\arctan \frac x a}\right) \ \mathrm d x = a \int F \left({u}\right) \sec^2 u \ \mathrm d u$

where $u = \arctan \dfrac x a$.

Proof
First note that:

Then: