Solution (source code)

= Solution

The <product rule> and <chain rule> give
$$
\boxed{\frac{d}{dx}[x\cos(2x)]=\cos(2x)-2x\sin(2x).}
$$