How can $\int \frac{1}{\sqrt{1-x^2}}dx$ evaluate to 2 different inverse trigonometric functions? I am going over a list of standard integrals to memorize and the derivative of both $\sin^{-1}(x)$ and $\cos^{-1}(x)$ only differ by a sign. Likewise with inverses of $\tan(x)$, $\cot(x)$ and $\sec(x)$, $\csc(x)$. What I don't understand is how this is accounted for during integration. Take
$$\int \frac{1}{\sqrt{1-x^2}}dx$$
My book (NCERT Mathematics Class 12) tells me that it can evaluate to either
$$\sin^{-1}(x)+C$$
or
$$-\cos^{-1}(x)+C$$
But a desmos graph shows me that those 2 functions are not the same:

Perhaps it's something to do with the constant of integration but I can't put my finger on it and I couldn't find a note on this on Wikipedia's list of integrals.

How do we tell which inverse trig function (of the pairs mentioned) is the correct evaluation in the integrals of their derivatives, when all that changes is a sign?

 A: This all boils down to what it means for a function to have an antiderivative.  If we have a function $F(x)$ so that $F'(x) = f(x)$, then we say that $F$ is an antiderivative of $f$.  That said, differentiating $F(x) + C$ for any constant $C$ also yields $f(x)$, because $$\frac{d}{dx}(F(x)+C) = \frac{d}{dx}F(x) + \frac{d}{dx}C = F'(x) = f(x).$$  So, when we want to express the general antiderivative of $f$ we write $$\int f(x)\,dx = F(x) + C.$$  The thing to note here is that we can replace $F(x)$ with any function whose derivative is $f(x)$ and the statement is still true.  In your example, because
\begin{align*}
\frac{d}{dx} \sin^{-1}(x) &= \frac{1}{\sqrt{1-x^2}}\\
\frac{d}{dx}\left(-\cos^{-1}(x)\right) &= \frac{1}{\sqrt{1-x^2}}
\end{align*} then we can conclude that both $\sin^{-1}(x)$ and $-\cos^{-1}(x)$ are antiderivatives of $\frac{1}{\sqrt{1-x^2}}.$  So, we can express this relationship as either of
\begin{align*}
\int \frac{1}{\sqrt{1-x^2}}\,dx &= \sin^{-1}(x) + C\\
\int\frac{1}{\sqrt{1-x^2}}\,dx &= -\cos^{-1}(x)+C
\end{align*}
