Step 1: Choose integration by parts.
Instead of the double angle identity, treat \(\cos^2 x\) as the product $\cos x \cdot \cos x$ and integrate by parts. Let $I = \int \cos^2 x\,dx$.
Step 2: Apply the rule.
Take $u = \cos x$ and $dv = \cos x\,dx$. Then $du = -\sin x\,dx$ and $v = \sin x$.
\[ I = \cos x\sin x + \int \sin^2 x\,dx \]
Step 3: Bring back $\cos^2 x$.
Use $\sin^2 x = 1 - \cos^2 x$ in the last integral.
\[ I = \sin x\cos x + \int (1-\cos^2 x)\,dx = \sin x\cos x + x - I \]
The same integral $I$ has appeared on the right side, so we can solve for it.
Step 4: Solve for $I$.
\[ 2I = x + \sin x\cos x \quad\Rightarrow\quad I = \frac12(x + \sin x\cos x) + C \]
Step 5: Match with the options.
This matches option (A) exactly. Option (B) has the wrong sign inside the bracket, and it is the antiderivative of $\sin^2 x$. Options (C) and (D) contain $\cos 2x$, whose derivative gives a $\sin 2x$ term, so they cannot differentiate back to $\cos^2 x$.
Final Answer:
Option (A) is correct.
\[ \boxed{\frac12\,(x+\sin x\cos x)+C} \]