How to evaluate for the composition of two trigonometric functions