sin(n + 1)x sin ( n+2 )x + cos(n+1)x cos (n+2)x = cos x
We have
cos(n+1)xcos(n+2)x + sin(n+1)xsin(n+2)x
it is from the identity
cos(a-b) = cosa * cosb + sina * sinb
here a= (n+1)x and b= (n+2)x
so,
= cos((n+1)x-(n+2)x)
= cos(nx+x-nx-2x)
= cos(-x)
= cosx { since cos(-x) = cosx }