the pic post is the solving using exact equation method , but

the author solve it using another method ( i typed below)

after rearranging , we have

dy/dx + y cotx = x

integrating factor = sin x

d/dx( ysinx) = ∫x sinx dx

so , finally , i have ysinx +xcosx - sinx = C

why not the final ans = ysinx +xcosx - sinx + C = 0 ???