Because the expression is a product of two factors, we use the product rule,
Using the formula for double angles, the answer can be simplified to cos2x.