# Making an ODE exact, when formula's of exactness do not provide a solution

I have

$$\left(2x+ 1-\frac{y^2}{x^2}\right)dx+ \frac{2y}{x}dy= 0$$

which is not exact. However, it could be made exact by using the formula for integrating factors. I have two ways,

With $$M=\left(2x+ 1-\frac{y^2}{x^2}\right)$$ and $$N=\frac{2y}{x}$$ we can form the following integrating factors:

$$\phi(x)=\frac{N_x-M_y}{M}=-\frac{\frac{4y}{x^2}}{2x+1-\frac{y^2}{x^2}}$$

or

$$\psi(x)=\frac{M_y-N_x}{N}=\frac{ (x^3 - x^2 + y^2)}{yx^2}$$

Then multiplying these in, should give an exact form of the ODE. But neither of the two make the ODE exact. Are there other formulas one can use?

Thanks

• Isn't $F(x,y) = x^2 + x + \frac{y^2}{x}$ a potential or am I missing something? Oct 11, 2022 at 8:54
• see can i post an alternative solution Oct 11, 2022 at 8:56
• Note that the x-derivative of $2y/x$ is $-2y/x^2$, you seem to have missed the sign. Oct 11, 2022 at 10:48

$$\left(2x+ 1-\frac{y^2}{x^2}\right)dx+ \frac{2y}{x}dy= 0$$ $$\left(2x+1\right)dx+\dfrac {(-y^2dx +{2xy}dy)}{x^2}= 0$$ $$\left(2x+1\right)dx+\dfrac {(-y^2dx +{x}dy^2)}{x^2}= 0$$ $$\left(2x+1\right)dx+d \left (\dfrac {y^2}{x}\right)= 0$$ Integrate.
Combine the two differentials into $$y'=dy/dx$$: $$2x+1-(y/x)^2=-2yy'/x$$ Set $$z=y/x,y'=z'x+z$$: $$2x+1-z^2=-2zx(z'x+z)/x$$ $$z^2+2zz'x=-2x-1$$ $$(z^2x)'=-2x-1\implies z^2x=-x^2-x+K$$ $$\frac{y^2}x+x^2+x=K$$
Ok, this differential form is indeed exact. The integrating factor is 1, and the first integral is $$I=\dfrac{x^3+x^2+y^2}{x}$$