The correct choice is (b) \(y sin \,x = \frac{sin^2 x}{2} + c\)
To explain: \(\frac{dy}{dx}\) + y cotx = cosx is of the form \(\frac{dy}{dx}\) + Py = Q where P & Q is a function of x only
given DE is linear DE in y here P=cot x, Q=cos x, \(e^{\int P \,dx} = e^{\int cotx \,dx} = e^{logsinx} = sin x\)
Linear DE solution is given by \(y e^{\int P \,dx} = \int Q \,e^{\int P \,dx} \,dx + c\)
y sin x=∫(cos x*sin x) dx + c….. substitute sin x=t to solve integral
\(y sin x = \frac{t^2}{2} + c = \frac{sin^2 x}{2} + c\) is the solution.