Solution of the differential equation dydx=2x−y+1x+y+2 is
xy−y2=2y+C
xy+y2+2y=3x2+C
xy+y2=2y+3x2+C
xy+y22+2y=x2+x+C
Given that dydx=2x−y+1x+y+2⇒(x+y+2)dy=(2x−y+1)dx
⇒xdy+(y+2)dy=2xdx−ydx+dx⇒xdy+ydx+(y+2)dy=2xdx+dx⇒d(xy)+(y+2)dy=2xdx+dx
Integrating on both sides
⇒xy+y22+2y=x2+x+C Therefore, the correct answer is (4).