We are tasked with evaluating the integral: \[ I = \int_0^{\frac{\pi}{2}} \frac{1}{1 + \sqrt{\tan x}} \, dx. \] Step 1: Use the substitution \( u = \frac{\pi}{2} - x \), which implies that \( du = -dx \) and \( \tan x = \cot u \).
Substituting into the integral gives: \[ I = \int_0^{\frac{\pi}{2}} \frac{1}{1 + \sqrt{\tan x}} \, dx = \int_{\frac{\pi}{2}}^0 \frac{1}{1 + \sqrt{\cot u}} \, (-du) = \int_0^{\frac{\pi}{2}} \frac{1}{1 + \sqrt{\cot u}} \, du. \] Step 2: Now notice the symmetry: \[ \frac{1}{1 + \sqrt{\tan x}} + \frac{1}{1 + \sqrt{\cot x}} = \frac{1 + \sqrt{\cot x} + 1 + \sqrt{\tan x}}{1 + \sqrt{\tan x} + \sqrt{\cot x}} = 1. \] Thus, we have: \[ \int_0^{\frac{\pi}{2}} \left( \frac{1}{1 + \sqrt{\tan x}} + \frac{1}{1 + \sqrt{\cot x}} \right) \, dx = \int_0^{\frac{\pi}{2}} 1 \, dx = \frac{\pi}{2}. \] Since the two integrals are equal due to symmetry: \[ I = \frac{1}{2} \cdot \frac{\pi}{2} = \frac{\pi}{4}. \]