Idea. Standard linear form is \(y'+P(x)y=Q(x)\). The integrating factor is \(e^{\int P(x)\,dx}\).
Step 1. Identify \(P(x)\). Here \(y'-y\sin x=\cot x\Rightarrow P(x)=-\sin x\).
Step 2. Compute IF.
\[
\text{IF}=e^{\int -\sin x\,dx}=e^{\cos x}.
\]
That's the required integrating factor (no need to solve for \(y\) here).