The differential equation xdxdy−y=x2cotx can be rewritten as dxdy−xy=xcotx.
The integrating factor is μ(x)=x1. Multiplying by μ(x) gives dxd(xy)=cotx.
Integrating: xy=ln∣sinx∣+C, so y=xln(sinx)+Cx.
Using y(2π)=2π: we get 2π=0+C2π, thus C=1.
Therefore y=x(1+ln(sinx)).
Now: y(6π)=6π(1−ln2) and y(4π)=4π(1−2ln2).
Thus 6y(6π)−8y(4π)=π(1−ln2)−2π(1−2ln2)=−π.