Whats wrong in this approach to evaluate $$I=\int_{0}^{\frac{\pi}{2}} \frac{\sin x\cos xdx}{\sin x+\cos x}$$
Since $f\left(\frac{\pi}{2}-x\right)=f(x)$ we have
$$I=2\int_{0}^{\frac{\pi}{4}} \frac{\sin x\cos xdx}{\sin x+\cos x}$$
Now applying $\int_{a}^{b}f(x)dx=\int_{a}^{b}f(a+b-x)dx$ we get
$$I=\sqrt{2}\int_{0}^{\frac{\pi}{4}}\frac{(\sin x-\cos x)(\sin x+\cos x)dx }{\sin x-\cos x+\cos x+\sin x}$$ $\implies$
$$I=\sqrt{2}\int_{0}^{\frac{\pi}{4}}\frac{2\sin^2 x-1}{\sin x}$$
But second integral viz $$\int_{0}^{\frac{\pi}{4}} \csc xdx $$ is not defined when we substitute lower limit?