Given: #(3+y+2 y^2 sin^2(x))dx+(x+2xy-y sin(2x))dy=0#
Check for exactness by computing the following partial derivatives:
#(del(3+y+2 y^2 sin^2(x)))/(dely) = 4ysin^2(x)+1#
#(del(x+2xy-y sin(2x)))/(delx)= 2ycos(2x)+2y+1#
Use the identity #cos(2x) = 2sin^2(x)-1#:
#(del(x+2xy-y sin(2x)))/(delx)= 2y(2sin^2(x)-1)+2y+1#
Distribute 2y:
#(del(x+2xy-y sin(2x)))/(delx)= 4ysin^2(x)-2y+2y+1#
#(del(x+2xy-y sin(2x)))/(delx)= 4ysin^2(x)+1#
Because we have observed that #(del(3+y+2 y^2 sin^2(x)))/(dely) = (del(x+2xy-y sin(2x)))/(delx)#, we know that the differential equation is exact. The solution method for an exact differential equation is well known.
We know that the solution is of the #f(x,y) = C# and we know that:
#(del(f(x,y)))/(delx) = 3+y+2 y^2 sin^2(x)" [1]"#
and
#(del(f(x,y)))/(dely) = x+2xy-y sin(2x)" [2]"#
We can choose to integrate either equation; I shall choose to integrate equation [2]:
#f(x,y) = int x+2xy-y sin(2x)dy#
#f(x,y) = xy+xy^2-1/2y^2sin(2x)+ phi(x)" [3]"#
where #phi(x)# is a function of x that becomes 0, when #f(x,y)# is differentiated with respect to y.
To find #phi(x)#, we must differentiate equation [3] with respect to x:
#(del(f(x,y)))/(delx) = y+y^2+y^2cos(2x)+ phi'(x)#
Use the identity #cos(2x) = 2sin^2(x) -1#:
#(del(f(x,y)))/(delx) = y+y^2+y^2(2sin^2(x) -1)+ phi'(x)#
#(del(f(x,y)))/(delx) = y+2y^2sin^2(x)+ phi'(x)#
We know that right side of the above equation must equal the right side of equation [1]:
#y+2y^2sin^2(x)+ phi'(x)= 3+y+2 y^2 sin^2(x)#
Solve for #phi'(x)#:
#phi'(x) = 3#
#phi(x) = 3x#
Substitute this into equation [3]:
#f(x,y) = xy+xy^2-1/2y^2sin(2x)+ 3x#
Make the equation fit the known form by setting it equal to an arbitrary constant C:
#f(x,y) = xy+xy^2-1/2y^2sin(2x)+ 3x= C#