Concept:
• Half-angle trigonometric identities:
\[ 1 + \cos x = 2 \cos^2 \left( \frac{x}{2} \right) \]
\[ 1 - \cos x = 2 \sin^2 \left( \frac{x}{2} \right) \]
• Basic integral of cotangent: \( \int \cot \theta \, d\theta = \log |\sin \theta| + C \).
Step 1: Simplify the integrand using trigonometric identities
Substitute the half-angle formulas into the expression:
\[ I = \int \sqrt{\frac{2 \cos^2(x/2)}{2 \sin^2(x/2)}} \, dx \]
The factor of 2 cancels out:
\[ I = \int \sqrt{\frac{\cos^2(x/2)}{\sin^2(x/2)}} \, dx \]
\[ I = \int \sqrt{\cot^2(x/2)} \, dx \]
\[ I = \int \cot(x/2) \, dx \]
Step 2: Integrate the simplified expression
Let \( u = \frac{x}{2} \), then \( du = \frac{1}{2} dx \implies dx = 2 du \).
Substituting these into the integral:
\[ I = \int \cot(u) \cdot 2 du \]
\[ I = 2 \int \cot(u) du \]
Step 3: Write the final answer in terms of \( x \)
Using the standard formula for \( \int \cot u \, du = \log |\sin u| + C \):
\[ I = 2 \log |\sin u| + C \]
Substitute back \( u = x/2 \):
\[ I = 2 \log \left| \sin \frac{x}{2} \right| + C \]