Where does this trigonometric substitution go wrong? $$I =\int\frac{1}{\sqrt{25-x^2}}dx$$

($\theta$ on left corner)
$$\tag 1 5\cos(\theta)=x$$
$$\tag 2 5\sin(\theta)=\sqrt{25-x^2}$$
$$\tag 1 -5\sin(\theta)\,d\theta=dx$$
$$I=\int\frac{1}{5\sin(\theta)} \cdot (-5) \sin(\theta) \, d\theta$$
$$I=\int-d\theta$$
$$\tag 1 \theta=\arccos(x/5)$$
$$I = -\arccos\left(\frac{x}{5}\right)+c$$
However, putting this integral into WA gives $\arcsin\left(\frac{x}{5}\right)+c$ and two are clearly not equivalent.
 A: 
It appears that $-\arccos \frac{x}{5} + C$ and $\arcsin \frac{x}{5} + C$ are the same collections of functions.  (Recall that an antiderivative is an infinite collection of functions differing only in vertical translation.  The "${}+C$" is to remind us that we have obtained a collection of functions.)
The plotted result is a consequence of the trigonometric reflection identity $\sin(\pi/2 - \theta) = \cos \theta$ in the form
$$  \sin(\theta - \pi/2) = -\cos \theta  $$so we see arcsine shifted $\pi/2$ units above minus arccosine.
A: It is actually the same, since in wolframalpha instead of substituting $x=5\cos\theta$ it used $x=5\sin\theta$, you can try or observe that the substitution gives you the same result
A: Note: $\cos(\frac \pi 2-x) = \sin x$
So if $\sin x = M$ whe $-\frac \pi 2 < x < \frac \pi 2$ then $x = \arcsin M$.
And if $\sin x = \cos(\frac \pi 2-x)=M$ then $0 < \frac \pi 2- x < \pi$ and $\frac \pi 2- x =\arccos M$ and $x = -\arccos M -\frac \pi 2$
So they ARE equivalent (perhaps not clearly so).
A: When you check your work with Wolfram Alpha, you can also use WA to find out if the form it gives is actually equivalent to yours.
Simply write your answer (without the constant), then subtract WA's answer (without the constant). If the result is a constant, the answers are equivalent.
In your example, WA says the difference is $-\frac\pi2,$ which tells you you did OK:
https://www.wolframalpha.com/input/?i=%28-arccos%28x%2F5%29%29+-+arcsin%28x%2F5%29
A: Your answer and WA's are equivalent. 
$\arccos \dfrac x5 + \arcsin \dfrac x5 = \dfrac {\pi}2$, so $\arcsin \dfrac x5 = \dfrac {\pi} 2 - \arccos \dfrac x5$,
so $\arcsin \dfrac x5 + C_1 = -\arccos \dfrac x5 + C_2$, where $C_1-C_2=\dfrac\pi2$.
A: Depends on how you differentiate $\dfrac{dy}{dx}(\cos^{-1}{\dfrac{x}{5}})$
$y=\cos^{-1}{\dfrac{x}{5}}$
$x=5\cos{y}$
$\dfrac{dx}{dy}=-5\sin{y}=-(\sqrt{25-25\cos^2{y}})=-(\sqrt{25-(5\cos{y})^2})=-(\sqrt{25-x^2})$
$\dfrac{dy}{dx}=\dfrac{1}{-\sqrt{25-x^2}}$
$=\dfrac{dy}{dx}=\dfrac{1}{\sqrt{25-x^2}} \text{I took out the negative sign in the beginning because I was getting confused}$
