Answer
$$\frac{1}{2}xsin2x + \frac{1}{4}\cos 2x + C$$
Work Step by Step
$$\eqalign{
& \int {x\cos 2x} dx \cr
& {\text{substitute }}u = x,{\text{ }}du = dx \cr
& dv = \cos 2xdx,{\text{ }}v = \frac{1}{2}sin2x \cr
& {\text{ integration by parts}} \cr
& \int {udv} = uv - \int {vdu} \cr
& {\text{, we have}} \cr
& \int {x\cos 2x} dx = \frac{1}{2}xsin2x - \int {\left( {\frac{1}{2}sin2x} \right)dx} \cr
& \int {x\cos 2x} dx = \frac{1}{2}xsin2x - \frac{1}{2}\int {sin2xdx} \cr
& {\text{find antiderivative}} \cr
& \int {x\cos 2x} dx = \frac{1}{2}xsin2x - \frac{1}{2}\left( { - \frac{1}{2}\cos 2x} \right) + C \cr
& \int {x\cos 2x} dx = \frac{1}{2}xsin2x + \frac{1}{4}\cos 2x + C \cr} $$