I'm curious how my textbook got:

$$\int \frac{du}{\sqrt{(1-u^2)}}$$ 

to

$$\sin^{-1}(u)+ c$$

This considering that "$u$" could be simplified into $u = \sin(x)$

Thus we get:

$$\int \frac{du}{\sqrt{(1-\sin^2(u))}}$$

Which is further simplified into:

$$\int \frac{du}{\sqrt{(\cos^2(u))}}$$ 

Since: $$\cos^2(u) =\sqrt{(1-\sin^2(u)}$$

Meaning that we get:

$$\int \frac{du}{\cos(u)}$$ 

Which is not *$\sin^{-1}(u)+ c$* when integrated.

What am I doing wrong?