The integration is of the form
\[
I=\int x \cos 2 x d x
\]
Here the first function is \(x\) and the second function is \(\cos 2 x\)
\[
I=\int x \cos 2 x d x-\cdots \text { (i) }
\]
Using the formula for integration by parts, we have
\[
\int[f(x) g(x)] d x=f(x) \int g(x) d x-\int\left[\frac{d}{d x} f(x) \int g(x) d x\right] d x
\]
Using the formula above, equation (i) becomes
\[
I=x \int \cos 2 x d x-\int\left[\frac{d}{d x} x\left(\int \cos 2 x d x\right)\right] d x
\]
Using the integral rule \(\int \cos k x d x=\frac{\sin k x}{k}+c\), we have
\[
\begin{aligned}
&I=x \frac{\sin 2 x}{2}-\int\left[(1) \frac{\sin 2 x}{2}\right] d x \\
&\Rightarrow I=\frac{x}{2} \sin 2 x-\frac{1}{2} \int \sin 2 x d x
\end{aligned}
\]
Using the integral rule \(\int \sin k x d x=-\frac{\cos k x}{k}+c\), we have
\[
\begin{gathered}
I=\frac{x}{2} \sin 2 x-\frac{1}{2}\left(\frac{-\cos 2 x}{2}\right)+c \\
\Rightarrow I=\frac{x}{2} \sin 2 x+\frac{1}{4} \cos 2 x+c \\
\Rightarrow \int x \cos 2 x d x=\frac{x}{2} \sin 2 x+\frac{1}{4} \cos 2 x+c
\end{gathered}
\]