Notice that the condition <em>x</em> ≠ 2<em>πk</em> for (presumably) integer <em>k</em> means cos(<em>x</em>) ≠ ±1, and in particular cos(<em>x</em>) ≠ 1 so that we could divide both sides by (1 - cos(<em>x</em>)) safely. Doing so lets us separate the variables:
(1 - cos(<em>x</em>)) <em>y'</em> - <em>y</em> sin(<em>x</em>) = 0
==> (1 - cos(<em>x</em>)) <em>y'</em> = <em>y</em> sin(<em>x</em>)
==> <em>y'</em>/<em>y</em> = sin(<em>x</em>)/(1 - cos(<em>x</em>))
==> d<em>y</em>/<em>y</em> = sin(<em>x</em>)/(1 - cos(<em>x</em>)) d<em>x</em>
Integrate both sides and solve for <em>y</em>. On the right, substitute <em>u</em> = 1 - cos(<em>x</em>) and d<em>u</em> = sin(<em>x</em>) d<em>x</em>.
∫ d<em>y</em>/<em>y</em> = ∫ sin(<em>x</em>)/(1 - cos(<em>x</em>)) d<em>x</em>
∫ d<em>y</em>/<em>y</em> = ∫ d<em>u</em>/<em>u</em>
ln|<em>y</em>| = ln|<em>u</em>| + <em>C</em>
exp(ln|<em>y</em>|) = exp(ln|<em>u</em>| + <em>C </em>)
exp(ln|<em>y</em>|) = exp(ln|<em>u</em>|) exp(<em>C </em>)
<em>y</em> = <em>Cu</em>
<em>y</em> = <em>C</em> (1 - cos(<em>x</em>))