Use a sum-to-product formula to rewrite cos5w+cos2w as a product.

the formula you want is

cos a + cos b= 2cos((a+b)/2) * cos((a-b)/2)
so
cos 5w + cos 2W = 2cos(7w/2) * cos(3W/2)

To rewrite cos(5w) + cos(2w) as a product, we can use the sum-to-product formula for cosine functions. The sum-to-product formula is given by:

cos(A) + cos(B) = 2 * cos((A + B) / 2) * cos((A - B) / 2)

In this case, A = 5w and B = 2w. Let's substitute these values into the formula:

cos(5w) + cos(2w) = 2 * cos((5w + 2w) / 2) * cos((5w - 2w) / 2)

Simplifying further:

cos(5w) + cos(2w) = 2 * cos(7w / 2) * cos(3w / 2)

Therefore, we have rewritten cos(5w) + cos(2w) as a product of cos(7w/2) and cos(3w/2) using the sum-to-product formula.