A tricky Definite Integral What is the value of $$\int_{\pi/4}^{3\pi/4}\frac{1}{1+\sin x}\operatorname{d}x\quad ?$$
The book from which I have seen this has treated it as a problem of indefinite integral and then directly put the values of the limits. I am not sure that this is the correct way.
Kindly help. 

Any integral involving rational functions of trig functions can be evaluated using the Weierstrass substitution
  $u=\tan(x/2)$, the resulting integral is 
$$
\int_{\tan(\pi/8)}^{\tan(3\pi/8)} \frac{2\mathrm{d}u}{1+u^2+2u} = 2\int_{\sqrt{2}-1}^{\sqrt{2}+1} \frac{\mathrm{d}u}{{(1+u)^2}} 
$$
which is of course
$$
\left[-\frac{2}{1+u}\right]_{\sqrt{2}-1}^{\sqrt{2}+1} = -\frac{2}{2+\sqrt{2}} + \frac{2}{\sqrt{2}} = \frac{2\sqrt{2}}{2+\sqrt{2}} = 2\sqrt{2}-2.
$$
