First, simplify the given integral. Utilize the trigonometric identity:
\[
1 + \cos x = 2 \cos^2 \left( \frac{x}{2} \right)
\]
The integral transforms to:
\[
I = \int \frac{x + \sin x}{2 \cos^2 \left( \frac{x}{2} \right)} \, dx
\]
Next, separate the terms in the numerator:
\[
I = \frac{1}{2} \int \frac{x}{\cos^2 \left( \frac{x}{2} \right)} \, dx + \frac{1}{2} \int \frac{\sin x}{\cos^2 \left( \frac{x}{2} \right)} \, dx
\]
The second term is simplified using the identity \( \sin x = 2 \sin \left( \frac{x}{2} \right) \cos \left( \frac{x}{2} \right) \). Proceed with integration after further algebraic manipulation.