How do you differentiate f(x)=cos(x2x) using the chain rule?