(xy + 1)dx + x(x + 4y - 2)dy = 0
i.e. Mdx + Ndy = 0
Using ð as the partial derivative symbol (curly d)
ðM/ðy = x, ðN/ðx = (x + 4y - 2) + x(1)
Since ðM/ðy =/= ðN/ðx, then the DE is not exact.
Since the DE is not exact, we need to find a function r(x,y) such that P = rM, Q = rN giving,
Pdx + Qdy = 0
The subsidiary eqns for this DE are
dx/N = dy/(-M) = dr/(rp)
where p(x,y) = ðM/ðy - ðN/ðx
p = x – (x + 4y – 2) – x
p = -(x + 4y – 2)
Using dx/N = dr/(rp),
dx/{x(x + 4y – 2)} = -dr/{r(x + 4y – 2)}
dx/x = -dr/r
Integrating,
ln(x) = -ln(r) (ignore the constant of integration when it just a simple multiplier)
r(x,y) = r(x) = 1/x
So P(x,y) = rM = y + 1/x
And, Q = rN = (x + 4y – 2)
Our DE is now,
(y + 1/x)dx + (x + 4y – 2)dy = 0
Since this DE is now exact, we can write,
ðU/ðx = P = y + 1/x, ðU/ðy = Q = x + 4y - 2
Doing partial integration of P and Q respectively,
U(x,y) = xy + ln(x) + f(y)
U(x,y) = xy + 2y^2 - 2y + g(x)
Comparing the two expressions for U(x,y), we get f(y) = 2y^2 - 2y and g(x) = ln(x), giving finally
U(x,y) = ln(x) + xy + 2y^2 - 2y = Const