# Solve a non-exact ODE by a different method

The following equation

$$(x^3+2xy)dx-x^2dy=0$$

is not exact, since

$$\frac{\partial M}{\partial y}=2x\ne\frac{\partial N}{\partial x}=-2x$$

I wanted to try the following then,

$$-x^2dy=-(x^3+2xy)dx$$ $$\frac{dy}{dx}=\frac{x^3+2xy}{x^2}$$ $$dy=\frac{x^3+2xy}{x^2}dx$$ $$\int dy=\int xdx+ \int \frac{2y}{x}dx$$

But the last integral, according to what I suspect does not make any sense for finding a solution to the original problem. That would mean that the answer by this approach is:

$$y=\frac{x^2}{2}+2y\ln x$$

However, this is not correct.

Any ideas how to solve this?

Thanks

• Divide the initial equation by $x^4.$ (I don't see what makes you think " That would mean that the answer by this approach is [etc.]") Oct 11, 2022 at 14:48
• What I mean by that comment is: Why is not that approach correct? Oct 11, 2022 at 15:06
• @AnneBauval in fact, the original eqn is a result of applying already an integrating factor on its "precursor". What is proposed by you, and outlined by gtgh suggests that thus that one can apply the integrating procedure indefinitely. Is that the case for such problems? Apply integrating factors until you have an exact form? Oct 11, 2022 at 15:09
• In general , it is sometimes possible to convert a differential equation that is not exact into an exact differential equation by multiplying the equation by a suitable integrating factor.
– gtgh
Oct 11, 2022 at 15:16

$$(x^3+2xy)dx-x^2dy=0$$ $$x^3dx+ydx^2-x^2dy=0$$ $$\dfrac {dx}{x}+\dfrac {ydx^2-x^2dy}{x^4}=0$$ $$\dfrac {dx}{x}-d \left (\dfrac {y}{x^2}\right)=0$$ Integrate.

• I divided by $x^4$ the original differential equation. You'e welcome. @Luthier415Hz Oct 11, 2022 at 15:44
• you have to know that $d\dfrac u v=\dfrac {vdu-udv}{v^2}$ here $v=x^2$ and $u=y$ @Luthier415Hz Oct 11, 2022 at 15:49
• You're welcome @Luthier415Hz Oct 11, 2022 at 15:51
• Yep, you seem to juggle with differentials. Incredible stuff. Oct 11, 2022 at 15:52
• Thank you @Luthier415Hz Oct 11, 2022 at 16:00

First, compute $$\frac{M_y-N_x}{N}$$ and we will get $$\frac{M_y-N_x}{N}$$=-$$\frac{4}{x}$$ So set the integrating factor Ψ as $$e^{-\int\frac{4}{x}dx}$$ and we will have Ψ =$$x^{-4}$$. Multiply Ψ =$$x^{-4}$$ to both sides and you can check that the differential equation after multiplying the integrating factor will be exact.

• Isn't it rather $-\frac 4x$, and $\Psi=x^{-4}$ (like in my comment)? (Btw, Luthier, I am unable to answer you, I had nothing more than "calculus intuition", and being vaguely aware of what gtgh just alluded to in his last comment above.) Oct 11, 2022 at 15:16
• ohh i see my mistake, thanks for the reminder
– gtgh
Oct 11, 2022 at 15:20
• @AnneBauval is there a limit to how many integrating factors you may have to seek to find an exact form? Oct 11, 2022 at 15:47
• Luthier, I don't know (see my reply 33 min ago). Oct 11, 2022 at 15:50