We have,
(2+sinx)dxdy=−(y+1)cosx
⇒∫(y+1)dy=−∫sinx+2cosxdx
Let, sinx=t⇒cosxdx=dt
⇒log∣y+1∣=−∫t+2dt+C
where, C is the constant of integration.
⇒log∣y+1∣+log∣sinx+2∣−C=0
⇒log(y+1)(sinx+2)=C
Given, y(0)=1
⇒C=log4.
⇒log(y+1)(sinx+2)=log4.....(i)
Now, put x=2π in the equation (i), we get, log(y+1)+log(3)−log(4)=0
⇒log(y+1)=log(34)
⇒y+1=34
⇒y=34−1=31.