What is $\int \frac{ \sqrt{(a^2 - x^2)}}{x^2}$? I tried the following trig substitution:
$x = a\sin \theta$
$$ \int \frac{ \sqrt{(a^2 - x^2)}}{x^2} = \int \frac{\sqrt{a^2 - a^2 \sin^2 \theta}}{a^2 \sin^2 \theta} = \int \frac{a \cos \theta}{a^2 \sin^2}$$
Setting  $u = \sin x$ yields:
$$\frac{1}{a} * \int u^{-2} = - \frac{1}{a \sin \theta}$$
However my textbook states that the answer should really be:
$$ -\frac{\sqrt{a^2 - x^2}+x\tan^{-1}(\frac{x}{\sqrt{a^2-x^2}})}{x}$$
Where did I mess up?

To arrive to the textbook formula you need to substitute $v=\dfrac{x}{\sqrt{a^2-x^2}}$ but this is a bit difficult to guess.
In fact proceed to $x=a\tanh(u)$ to exploit $[1-\tanh^2]$.
Then $\displaystyle I=\int \dfrac{\sqrt{a^2-x^2}}{x^2}\mathop{dx}=\int\dfrac {\mathop{du}}{\cosh(u)\sinh(u)^2}$
Now substitute $v=\sinh(u)$ 
Notice that $v=\sinh(\tanh^{-1}(\frac xa))=\dfrac{\frac xa}{\sqrt{1-(\frac xa)^2}}$ is equal to the change proposed at the start.
$$\begin{align} I &=\int\dfrac{\mathop{dv}}{v^2(1+v^2)}=\int\left(\dfrac 1{v^2}-\dfrac 1{1+v^2}\right)\mathop{dv}=-\dfrac 1v-\arctan(v)+C\\\\&=-\dfrac{\sqrt{a^2-x^2}}x-\arctan\left(\dfrac{x}{\sqrt{a^2-x^2}}\right)+C\end{align}$$

Remark: you can also arrive to the same result with $x=a\sin(u)$ and $v=\tan(u)$.
