# How to solve this weird ODE?

I came across this differential equation which I'm having trouble finding an analytic solution to:

$$\frac{dy}{dx}=\frac{A}{xy}+\frac{B}{(xy)^2}$$

I'm trying to solve for y. I have initial conditions as $$x_0=0.02$$ and $$y_0=100000$$, and A and B are known constants. I don't have a very heavy differential equations background so all I know is that I can't use separation of variables--what kind of method should I use to solve this equation?

Thank you!!

• You can use a numerical method! – Dr. Sonnhard Graubner Aug 1 '19 at 14:15
• Try something along the lines of using $z = \frac{1}{x y}$ as a new independent variable... – vonbrand Aug 1 '19 at 18:16

Assume $$A,B\neq0$$ for the key case:

Hint:

Let $$u=xy$$ ,

Then $$y=\dfrac{u}{x}$$

$$\dfrac{dy}{dx}=\dfrac{1}{x}\dfrac{du}{dx}-\dfrac{u}{x^2}$$

$$\therefore\dfrac{1}{x}\dfrac{du}{dx}-\dfrac{u}{x^2}=\dfrac{A}{u}+\dfrac{B}{u^2}$$

$$\dfrac{1}{x}\dfrac{du}{dx}=\dfrac{u}{x^2}+\dfrac{A}{u}+\dfrac{B}{u^2}$$

$$\dfrac{1}{x}\dfrac{du}{dx}=\dfrac{(Au+B)x^2+u^3}{x^2u^2}$$

$$((Au+B)x^2+u^3)\dfrac{dx}{du}=xu^2$$

Let $$v=x^2$$ ,

Then $$\dfrac{dv}{du}=2x\dfrac{dx}{du}$$

$$\therefore\dfrac{(Au+B)x^2+u^3}{2x}\dfrac{dv}{du}=xu^2$$

$$((Au+B)x^2+u^3)\dfrac{dv}{du}=2u^2x^2$$

$$((Au+B)v+u^3)\dfrac{dv}{du}=2u^2v$$

This belongs to an Abel equation of the second kind.