
This is a first order linear differential equation of the form

The integrating factor (I.F) of this differential equation is,

Hence, the solution of the differential equation is,

⇒ cosxdx = dt [Differentiating both sides]
By substituting this in the above integral, we get

Thus, the solution of the given differential equation is \(y = \frac{2}{3}sin^2x + c\,cosec\,x\)