x(xy+1)(dy/dx) + y(xy+1) = 0
(x2y + x)dy + (xy2 + y)dx = 0
Let M(x,y) = xy2 + y and N(x,y) = x2y + x
∂M/∂y = ∂N/∂x = 2xy + 1. So, the differential equation is exact.
So, there exists a function f(x,y) such that ∂f/∂x = xy2+y and ∂f/∂y = x2y + x
Integrating the first equation with respect to x, we get f(x,y) = (1/2)x2y2 + xy + g(y)
So, ∂f/∂y = x2y + x + g'(y). But ∂f/∂y = N(x,y) = x2y + x
x2y + x + g'(y) = x2y + x. So, g'(y) = 0. Therefore, g(y) = C.
So, (1/2)x2y2 + xy = C