d[uv]= vdu+udv this is the product rule, where v and u are both functions of x.
Let u =3x and v=cos2x
so we have ......cos2x.[3]+3x[−2sinxcosx]
=3cos2x-6xsinxcosx.....=3cosx[cosx−2xsinx].
cos2x=[cosx]2 and so need to use the chain rule to differentiate this, =2cosx, times the derivative of cosx which is -sinx, soddxcos2x=−2sinxcosx. hope this helped.