How do you find the derivative of cos(pi*x^2)?