Why is this integration method not valid? Let $$I=\int \frac{\sin x}{\cos x + \sin x}\ dx \tag{1}$$
Now let $$u=\frac{\pi}{2} - x \tag{2}$$ so $$I=\int \frac{\sin (\frac{\pi}{2} - u)}{\cos (\frac{\pi}{2} - u)+\sin (\frac{\pi}{2} - u)}\ du \tag{3}$$
$$=\int\frac{-\cos u}{\sin u + \cos u} \ du \tag{4}$$
$$= \int\frac{-\cos  x}{\sin x + \cos x} \ dx \tag{5}$$
and hence $$2I=\int\frac{\sin x - \cos x}{\sin x + \cos x} \ dx \tag{6}$$
$$=-\ln\ |\sin x + \cos x| + c \tag{7}$$
$\implies I=-\frac{1}{2}\ln|\sin x + \cos x| + c \tag{8}$
But the actual answer is $$I= \frac{1}{2}x -\frac{1}{2}\ln|\sin x + \cos x| + c \tag{9}$$
according to Wolfram Alpha and supported by a different method.
Why does my method not yield the correct result?

$$\int_{a}^{b}\frac{\sin \ x}{\cos \ x + \sin \ x}dx\neq \int_{a}^{b}\frac{-\cos \ x}{\cos \ x + \sin \ x}dx$$
but
$$\int_{a}^{b}\frac{\sin \ x}{\cos \ x + \sin \ x}dx= \int_{\pi/2-a}^{\pi/2-b}\frac{-\cos \ x}{\cos \ x + \sin \ x}dx$$
