Given,
3excos2ydx+(1−ex)cotydy=0
3excos2ydx=(ex−1)cotydy
3exex−1dx=cotycos2ydy
integrating on both sides, we get,
∫3exex−1dx=∫cotycos2ydy
∫3exex−1dx=∫secysinydy
3log(ex−1)=log(tany)+c