Concept:
• Half-angle identities: \( 1 - \cos x = 2\sin^2(x/2) \) and \( \sin x = 2\sin(x/2)\cos(x/2) \).
• Integration by parts: \( \int u \, dv = uv - \int v \, du \).
Step 1: Simplify the integrand using identities
Split the integral into two parts:
\[ I = \int \frac{x}{1 - \cos x} \, dx - \int \frac{\sin x}{1 - \cos x} \, dx \]
Substitute half-angle formulas:
\[ I = \int \frac{x}{2\sin^2(x/2)} \, dx - \int \frac{2\sin(x/2)\cos(x/2)}{2\sin^2(x/2)} \, dx \]
\[ I = \frac{1}{2} \int x \csc^2(x/2) \, dx - \int \cot(x/2) \, dx \]
Step 2: Solve the first integral using Integration by Parts
For \( \int x \csc^2(x/2) \, dx \), let \( u = x \) and \( dv = \csc^2(x/2) \, dx \).
Then \( du = dx \) and \( v = -2 \cot(x/2) \).
\[ \int x \csc^2(x/2) \, dx = -2x \cot(x/2) - \int -2 \cot(x/2) \, dx \]
\[ = -2x \cot(x/2) + 2 \int \cot(x/2) \, dx \]
Step 3: Combine the results
Substitute this back into the main expression for \( I \):
\[ I = \frac{1}{2} \left[ -2x \cot(x/2) + 2 \int \cot(x/2) \, dx \right] - \int \cot(x/2) \, dx \]
\[ I = -x \cot(x/2) + \int \cot(x/2) \, dx - \int \cot(x/2) \, dx \]
The integral terms cancel out:
\[ I = -x \cot(x/2) + C \]