When using the substitution \(x=\sin(\theta) \) where \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{,}\) we are regarding \(x \) as a function of \(\theta \text{.}\) The goal is to change the integrand to contain trigonometric functions so that the Pythagorean Identity can be used. To do this, the integral will be changed to be in terms of the variable \(\theta\text{.}\) With this in mind, both \(x \) and \(dx \) will need to be changed. Starting from \(x=\sin(\theta) \text{,}\) take the derivative with respect to \(\theta \) to find that
\begin{equation*}
\frac{dx}{d\theta}=\cos(\theta) .
\end{equation*}
In other words, \(dx=\cos(\theta) \, d\theta \text{.}\) Now, change the original integral to be in terms of the variable \(\theta \text{:}\)
\begin{equation*}
\int\frac{1}{\sqrt{1-x^2}}\, dx=\int \frac{\cos(\theta)}{\sqrt{1-\sin^2(\theta)}} \, d\theta
\end{equation*}
Use the Pythagorean Identity, \(1-\sin^2(\theta)=\cos^2(\theta)\) to simplify the denominator of the integrand:
\begin{equation*}
\int \frac{\cos(\theta)}{\sqrt{1-\sin^2(\theta)}} \, d\theta = \int\frac{\cos(\theta)}{\sqrt{\cos^2(\theta)}} \, d \theta.
\end{equation*}
Now we need to use the assumption that \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}\text{.}\) In general, \(\sqrt{\cos^2(\theta)}=|\cos(\theta)|\text{,}\) but \(\cos(\theta)\geq 0\) on the interval \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}\text{.}\) Thus, \(|\cos(\theta)|=\cos(\theta)\) if \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{.}\) The denominator can now be further simplified, and the remaining steps lead to a familar integral:
\begin{align*}
\int\frac{\cos(\theta)}{\sqrt{\cos^2(\theta)}} \, d\theta \amp = \int\frac{\cos(\theta)}{|\cos(\theta)|} \, d\theta \\
\amp =\int\frac{\cos(\theta)}{\cos(\theta)} \, d\theta \\
\amp =\int 1 \, d\theta \\
\amp =\theta + C
\end{align*}
While we have computed an antiderivative successfully, we aren’t quite done yet because the answer is not written in terms of the original variable \(x \text{.}\) Rearrange the substitution equation \(x=\sin(\theta) \) to find that \(\theta=\arcsin(x) \) and use this to turn \(\theta\) back into a function of \(x \text{.}\) Therefore,
\begin{equation*}
\int\frac{1}{\sqrt{1-x^2}} \, dx= \arcsin(x) + C
\end{equation*}