Solve: x^2∙dx+y(x+1)∙dy=0
Rewrite the ODE as, P∙dx+Q∙dy=0
Where P=x^2, P_y=0.
And Q=y(x+1), Q_x=y.
Since P_y≠Q_x, then the ODE is not exact.
IF – integration factor
h(x)=(P_y-Q_x)/Q=(0-y)/y(x+1) =(-1)/(x+1)
Since h(x) is a function of x only, then we have found an integrating factor, which is μ(x), where
μ(x)= e^(∫h(x) dx)=e^(-∫dx/(x+1))=e^(-ln(x+1) )=1/(x+1)
μ(x)=1/(x+1)
The ODE can now be made exact as,
P^'∙dx+Q^'∙dy=dU(x,y)=∂U/∂x∙dx+∂U/∂y∙dy
And dU=0, which implies U(x,y)=const.
∂U/∂x=P^'=μP=x^2/(x+1)
Using IBP, U(x,y)=1/2∙x^2-x+ln(x+1)+g(y)
∂U/∂y=Q^'=μQ=y
U(x,y)=1/2∙y^2+k(x)
Comparison of the two forms of U(x,y) gives us,
g(y)=1/2∙y^2, k(x)=1/2∙x^2-x+ln(x+1)
Hence U(x,y)=1/2∙y^2+1/2∙x^2-x+ln(x+1)=const=K/2
Answer: y^2=K-x^2+2x-2 ln(x+1)