Question: Solve the DE cos(x+y)dx+(3y^2+2y+cos(x+y))dy=0.
The DE is cos(x+y)dx+(3y^2+2y+cos(x+y))dy=0
or, P(x,y) dx + Q(x,y) dy = 0, where P(x,y) = cos(x+y) and Q(x,y) = 3y^2+2y+cos(x+y)
Py = -sin(x+y),
Qx = - sin(x+y)
Since Py = Qx, then the DE is exact, and we can write that DE as
(∂U/∂x).dx + (∂U/∂y).dy = dU = 0 (implies U(x,y) = const)
i.e.
∂U/∂x = cos(x+y) --> U(x,y) = sin(x+y) + g(y)
∂U/∂y = 3y^2+2y+cos(x+y) --> U(x,y) = y^3 + y^2 + sin(x+y) + h(x)
Comparing the two forms for U(x,y) we see that g(y) = x^3 + y^2 and that h(x) = 0.
Hence, U(x,y) = y^3 + y^2 + sin(x+y) = K