The given integral is,
\(I=\int_{0}^{\frac{\pi}{2}} \frac{1}{1+\tan x} d x\) ----(1)
We know that, \(\int_{0}^{a} \mathrm{f}(\mathrm{x}) \mathrm{dx}=\int_{0}^{\mathrm{a}} \mathrm{f}(\mathrm{a}-\mathrm{x}) \mathrm{d} \mathrm{x}\)
By using the above property of definite integral, equation (1) becomes,
\(\Rightarrow \mathrm{I}=\int_{0}^{\frac{\pi}{2}} \frac{1}{1+\tan \left(\frac{\pi}{2}-\mathrm{x}\right)} \mathrm{dx}\)
\(\Rightarrow \mathrm{I}=\int_{0}^{\frac{\pi}{2}} \frac{1}{1+\cot \mathrm{x}} \mathrm{dx}\) ----(2)
Adding equation (1) and (2), we get,
\(\Rightarrow 2I=\int_{0}^{\frac{\pi}{2}} \frac{1}{1+\tan x} d x+\int_{0}^{\frac{\pi}{2}} \frac{1}{1+\cot x} d x\)
\(\Rightarrow 2I=\int_{0}^{\frac{\pi}{2}}\left[\frac{1}{1+\tan x}+\frac{1}{1+\cot x}\right] d x\)
\(\Rightarrow 2I=\int_{0}^{\frac{\pi}{2}}\left[\frac{1}{1+\tan x}+\frac{\tan x}{1+\tan x}\right] d x\)
\(\Rightarrow 2I=\int_{0}^{\frac{\pi}{2}}\left[\frac{1+\tan x}{1+\tan x}\right] d x\)
\(\Rightarrow 2I=\int_{0}^{\frac{\pi}{2}} 1 d x\)
\(\Rightarrow 2I=[x]_{0}^{\frac{\pi}{2}}\)
\(\Rightarrow 2I=\frac{\pi}{2}\)
\(\Rightarrow I=\frac{\pi}{4}\)