Trig functions differentiation