How to differentiate cosecx using implicit differentiation