<s>[INST] Evaluating a common integral for $\arcsin(x)$ using a different method 
The common method of evaluating the integral below is by using the substitution $x = a \sin u$ which gives: 
  $$\int\frac{dx}{\sqrt{a^2-x^2}}= \arcsin\Bigl(\frac xa\Bigr) + C.$$
  But, using this substitution led me down a path that seems to give a different answer (or, at least, a different form). Did I make a mistake, or are the two forms somehow equivalent?

$$x = ai\tan u $$
$$x^2=-a^2\tan^2(u)du$$
$$dx = ai\sec^2(u)du$$
$$1+\tan^2(u)=\sec^2(u)$$
\begin{align}
\int\frac{dx}{\sqrt{a^2-x^2}} & = \int\frac{1}{\sqrt{a^2+a^2\tan^2(u)}}\cdot ai\sec^2(u)du \\
 & = ai\int \frac{\sec^2(u)}{\sqrt{a^2(1+\tan^2(u))}}du \\ 
 & = \frac{ai}{a} \int \frac {\sec^2(u)}{\sec(u)}du \\
 & = i \int \sec(u)du \\ 
 & =i \ln \lvert \sec(u)+\tan(u)\rvert + C \\
& = i \ln \bigl| \frac {\sqrt{x^2-a^2}}{ai} + \frac {x}{ai}  \bigr| + C \\
& = i \ln \bigl| \frac {-i\sqrt{x^2-a^2}}{a} - \frac {ix}{a}  \bigr| + C \\
& = i \ln \bigl| -i\frac {\sqrt{x^2-a^2}+x}{a} \bigr| + C\\
& = i \Big[ \ln \lvert -i \rvert + \ln \bigl|\frac {\sqrt{x^2-a^2}+x}{a} \bigr| \Big] + C\\
& = i \ln \bigl|\frac {\sqrt{x^2-a^2}+x}{a} \bigr| + C
\end{align}
 [/INST] Hint:
Note that $$y = \sin(x) = \frac{e^{ix}-e^{-ix}}{2} = \frac{e^{i2x}-1}{2e^{ix}}.$$
Consequently, $$(e^{ix})^2+2y\cdot e^{ix}-1=0 \implies e^{ix} = -y\pm\sqrt{y^2+1} \implies x = ?$$
</s>