`Let $I = \int_0^\pi {\frac{x}{{1 + \sin x}}} dx$ …….(i)`

and $I = \int_0^\pi {\frac{{\pi – x}}{{1 + \sin (\pi – x)}}} dx = \int_0^\pi {\frac{{\pi – x}}{{1 + \sin x}}} dx$ ………(ii)

On adding Equations (i) and (ii), we get

$2I = \pi \int_0^\pi {\frac{1}{{1 + \sin x}}} dx$

$ = \pi \int_0^\pi {\frac{{(1 – \sin x)dx}}{{(1 + \sin x)(1 – \sin x)}}} $

$ = \pi \int_0^\pi {\frac{{(1 – \sin x)dx}}{{{{\cos }^2}x}}} $

$ = \pi \int_0^\pi {\left( {{{\sec }^2}x – \tan x \cdot \sec x} \right)} dx$

$ = \pi \int_0^\pi {{{\sec }^2}} xdx – \pi \int_0^\pi {\sec } xx \cdot \tan xdx$

$ = \pi [\tan x]_0^\pi – \pi [\sec x]_0^\pi $

$ = \pi [\tan x – \sec x]_0^\pi $

$ = \pi [\tan \pi – \sec \pi – \tan 0 – \sec 0]$

$ \Rightarrow $$2I = \pi [0 + 1 – 0 + 1]$

$2I = 2\pi $

therefore,$I = \pi $