Why $- \int \frac{du}{1-u^2}$ is not $-\frac{1}{2}\ln|1-u^2|$ ?
The context of this question is the integral of the csc
$$u = \cos x$$
Why the above integral is not true and instead we have to use:
$$\frac{1}{1-u^2} = \frac{1}{2}\left(\frac{1}{1+u} +\frac{1}{1-u}\right)$$
Key Point: $$\int f(\color{blue}{a}x+b) dx=\frac{1}{\color{blue}{a}}F(\color{blue}{a}x+b)+c$$ Where, $F(x)$ is antiderivative of $f(x)$ and $c$ is an arbitrary constant.
For instance, $$- \int \frac{du}{1-\color{green}{2}u}=-\frac{1}{\color{green}{2}}\ln|1-\color{green}{2}u|+c_1$$
In your question, $$\int \frac{du}{1-u^\color{green}{2}}$$ $2$ is power of $u$, not coefficient. So, $$\int \frac{du}{1-u^\color{green}{2}}\ne-\frac{1}{2}\ln|1-u^2|+c_2$$
You can do that answer in case of, $$\int \frac{udu}{1-u^2}{=\frac{1}2\int \frac{2udu}{1-u^2}\\ =\frac{1}2\int \frac{d(u^2)}{1-u^2}\\=-\frac{1}{2}\ln|1-u^2|+c_3}$$