- Let
I=∫π/43π/41+sinxxdx.
We use the property
∫abf(x)dx=∫abf(a+b−x)dx.
Here, a=π/4, b=3π/4, so a+b=π.
Thus,
I=∫π/43π/41+sin(π−x)π−xdx.
Since sin(π−x)=sinx, this becomes
I=∫π/43π/41+sinxπ−xdx.
- Add the two expressions for I:
=\pi\int_{\pi/4}^{3\pi/4}\frac{dx}{1+\sin x}.$$
So,
$$I=\frac{\pi}{2}\int_{\pi/4}^{3\pi/4}\frac{dx}{1+\sin x}.$$
3. Simplify the integrand:
$$\frac{1}{1+\sin x}=\frac{1-\sin x}{1-\sin^2 x}=\frac{1-\sin x}{\cos^2 x}
=\sec^2 x-\sec x\tan x.$$
Hence,
$$\int \frac{dx}{1+\sin x}=\int (\sec^2 x-\sec x\tan x)\,dx
=\tan x-\sec x.$$
4. Evaluate from $\pi/4$ to $3\pi/4$:
$$\int_{\pi/4}^{3\pi/4}\frac{dx}{1+\sin x}
=\Big[\tan x-\sec x\Big]_{\pi/4}^{3\pi/4}.$$
Now,
$$\tan\frac{3\pi}{4}=-1,\qquad \sec\frac{3\pi}{4}=-\sqrt2,$$
so
$$\tan\frac{3\pi}{4}-\sec\frac{3\pi}{4}=-1-(-\sqrt2)=\sqrt2-1.$$
Also,
$$\tan\frac{\pi}{4}=1,\qquad \sec\frac{\pi}{4}=\sqrt2,$$
so
$$\tan\frac{\pi}{4}-\sec\frac{\pi}{4}=1-\sqrt2.$$
Therefore,
$$\int_{\pi/4}^{3\pi/4}\frac{dx}{1+\sin x}=(\sqrt2-1)-(1-\sqrt2)=2(\sqrt2-1).$$
5. Hence,
$$I=\frac{\pi}{2}\cdot 2(\sqrt2-1)=\pi(\sqrt2-1).$$
So the correct option is
$$\boxed{\text{B }\; \pi(\sqrt2-1)}.$$