How can you show the results from substituting $x=a\cos{\theta}$ and $x=a\sin{\theta}$ are the same when finding $\int{\frac{16}{\sqrt{9-x^2}}}$?
I am learning trig substitution right now. I know from seeing this problem I should substitute x for $a\sin{\theta}$. After working this out:
$$\int{\frac{16}{\sqrt{9-x^2}}}$$ $$x=3\sin{\theta}$$ $$dx=3\cos{\theta}d\theta$$ $$=\int{\frac{16}{\sqrt{9-x^2}}}=\int{\frac{48\cos{\theta}d\theta}{\sqrt{9-9\sin^2}{\theta}}}$$ $$=\int{\frac{48\cos{\theta}d\theta}{3\sqrt{1-\sin^2}{\theta}}}$$$$=16\int{\frac{\cos{\theta}d\theta}{\sqrt{\cos^2}{\theta}}}$$ $$=16\int{\frac{\cos{\theta}d\theta}{\cos{\theta}}}=16\int{d\theta}$$ $$=16\theta=16\sin^{-1}\left({\frac{x}{3}}\right)+C_1$$
However, substituting $x=a\cos{\theta}$ yields a different result.
$$\int{\frac{16}{\sqrt{9-x^2}}}$$ $$x=3\cos{\theta}$$ $$dx=-3\sin{\theta}d\theta$$ $$=\int{\frac{16}{\sqrt{9-x^2}}}=\int{\frac{-48\sin{\theta}d\theta}{\sqrt{9-9\cos^2}{\theta}}}$$ $$=\int{\frac{-48\sin{\theta}d\theta}{3\sqrt{1-\cos^2}{\theta}}}$$$$=-16\int{\frac{\sin{\theta}d\theta}{\sqrt{\sin^2}{\theta}}}$$ $$=-16\int{\frac{\sin{\theta}d\theta}{\sin{\theta}}}=-16\int{d\theta}$$ $$=-16\theta=-16\cos^{-1}\left({\frac{x}{3}}\right)+C_2$$
$$\implies\quad{-16\cos^{-1}\left({\frac{x}{3}}\right)}+C_2={16\sin^{-1}\left({\frac{x}{3}}\right)}+C_1$$
Unless I did something incorrectly or there is something that prohibits different types of substitutions, how can this be true? I have tried to think it over how $-\cos^{-1}{x}$ can equal $\sin^{-1}{x}$.
I thought about it being a negative angle, perhaps making the opposite leg of the triangle negative. This however leads to a contradiction that says $-\cos^{-1}{x}=\sin^{-1}{x}$ but $\cos^{-1}{x}\neq-\sin^{-1}{x}$.
Any thoughts, answers, or corrections are appreciated.