Integration by Substitution for $\int \left ( \frac{dx}{\sqrt[]{a^{2}-x^{2}}} \right )$ gives two results ? Which is correct and why?

In general, if $F(x)$ is an antiderivative of $f(x)$, then

$$\int f(x)\mathop{dx}=F(x)+c,$$

where $c$ is an arbitrary constant. You found:

$$\int \frac 1{\sqrt{a^2-x^2}}\mathop{dx}=\sin^{-1}\left(\frac xa\right)+c_1\quad\text{ and }\quad\int \frac 1{\sqrt{a^2-x^2}}\mathop{dx}=-\cos^{-1}\left(\frac xa\right)+c_2.$$


Indeed, $\sin^{-1}\left(x\right)=-\cos^{-1}\left(x\right)+\frac\pi2$. To see this, let $\theta=\sin^{-1}\left(x\right)$. Then $\sin\theta=x$. By the cofunction identity, we have $\cos(\pi/2-\theta)=x$. Hence, $\frac\pi2-\theta=\cos^{-1}x$. Thus, $\theta=\frac\pi2-\cos^{-1}x$. Since $\theta=\sin^{-1}x$, we have

$$\sin^{-1}x=\frac\pi2-\cos^{-1}x.$$

I did gloss over domain restrictions for $\theta$, but the identity still holds.


Hint

If $f(x)=g(x)+k, f'(x)=?$

But actually for $$I=\int\dfrac{dx}{\sqrt{a^2-x^2}}$$

set $\arcsin\dfrac xa=t\implies x=a\sin t$ and

$-\dfrac\pi2\le t\le\dfrac\pi2$ using https://en.m.wikipedia.org/wiki/Inverse_trigonometric_functions#Principal_values

$\implies \cos t\ge0$

$$I=\int\dfrac{a\cos t}{|a\cos t|}dt=\int\dfrac{a\cos t}{|a|\cos t}dt=\text{ sign}(a)\int dt=?$$