Step 1: Use trigonometric identities.
We can use the identity \( \cos 2x = 2 \cos^2 x - 1 \) to simplify the integrand. Substituting this identity into the expression, we get a simpler integrand that can be integrated easily.
Step 2: Perform the integration.
After simplifying, we integrate the function and find that the result is \( \cot x + c \).
Step 3: Conclusion.
Thus, the correct answer is \( \cot x + c \), corresponding to option (D).