dydx+2x1+x2y=cotx1+x2
I.F=e∫2x1+x2.dx
=eln(1+x2)
=1+x2
Hence, multiplying the entire equation by 1+x2, gives us
(1+x2)dydx+2xy=cotx
(1+x2)dy+2xy.dx=cotxdx
d((1+x2)y)=cotx.dx
∫d(y+x2y)=∫cotxdx
y(1+x2)=ln|sinx|+C
At x=π2, y=0.
Hence
ln(1)+C=0
Or
C=0
Therefore the particular solution of the above differential equation is
y=ln|sinx|1+x2