Use the chain rule.
[tex]\dfrac{\mathrm d\cos(x^3)}{\mathrm dx}=-\sin(x^3)\dfrac{\mathrm dx^3}{\mathrm dx}=-3x^2\sin(x^3)[/tex]