Derivatives involving trigonometric functions