Trigonometric functions differentiation