Assume we evaluate $\int \sqrt{4-x^2}\,dx $ by using the substitution $x=2 \sin(t)$ from which it follows that $4-x^2 = 4\cos^2 (t) $ so that $\int \sqrt{4-x^2}\,dx =4\int \sqrt{\cos^2 (t)} \cos(t)\,dt $.
In order to get $\int \sqrt{4-x^2}\,dx = 2\arcsin(x/2)+\frac{x\sqrt{4-x^2}}{2}+C$, we need to write $\sqrt{\cos^2 (t)} = \cos(t)$ .
My question is -
what are the arguments that allows us to assume that $\cos(t)\geq 0 $ so that $\sqrt{\cos^2 (t)} = \cos(t)$?
(taking $\sqrt{\cos^2 (t)} = -\cos(t)$ for example yields a wrong result)