Answer
\[\frac{x}{2}+\frac{1}{4}\sin 2x+C\]
Where $C$ is constant of integration
Work Step by Step
Let \[I=\int \cos^2 x\;dx\]
We know that \[\cos 2x=2\cos ^2 x-1\]
\[\Rightarrow \cos^2 x=\frac{1+\cos 2x}{2}\]
\[\Rightarrow I=\frac{1}{2}\int (1+\cos 2x )\:dx\]
\[I=\frac{1}{2}\left[x+\frac{\sin 2x}{2}\right]+C\]
Where $C$ is constant of integration
\[I=\frac{x}{2}+\frac{1}{4}\sin 2x+C\]
Hence,
\[I=\frac{x}{2}+\frac{1}{4}\sin 2x+C\;\;.\]