Where does this trigonometric substitution go wrong?

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$.


minus arccosine and sine of x for x in -5 to 5 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.


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