I was trying to integrate $ \int \frac{\sqrt{9-x^2}}{x^2} dx $.
If I substitute $ x=3\sin{\theta} $ the result will be $ -\frac{\sqrt{9-x^2}}{x}-\sin^{-1}{(\frac{x}{3})} +C$, which is the correct result.
My question is: why can't I substitute $ x=3\cos\theta $ instead of $ x=3\sin\theta $? The square root will be canceled the same way.
The result is $ -\frac{\sqrt{9-x^2}}{x}+\cos^{-1}{(\frac{x}{3})} +C$, which doesn't match.
Thanks in advance.
Hint: for any $x\in[-1,1]$, $$ \arcsin x+\arccos x=\frac{\pi}{2} $$