# Techniques to solve nonlinear first-order ODEs

I am trying to solve the following nonlinear ODE:

$$\frac{dy}{dx} = \frac{1}{x(ayx-b)},$$

where $a, b$ are constants and $a>0$. Moreover, you may assume that $b \neq 0$ if necessary.

This equation is part of a system of two differential equations I need to solve in order to use the explicit solution of this equation to solve for the second differential equation. Apart from already trying to solve it with usual methods, I've already tried solving it with Mathematica as well. However, Mathematica yields an implicit solution. Therefore, I am wondering if someone can refer me to some other methods for solving this type of ODE that will give me an explicit solution.

In case it might "ring a bell", the above ODE can be decomposed to be the following ODE through partial fraction decomposition (assuming I did it correctly):

$$\frac{dy}{dx} = -\frac{1}{b\,x} + \frac{a\,y}{b\,(a\,y\,x - b)} \iff dy = \frac{a\,y}{b\,(a\,y\,x - b)}\,dx -\frac{1}{b\,x}\,dx$$

Thank you in advance and any help will be greatly appreciated.

What I should do is to rewrite the differential equation as $$\frac{dx}{dy} = x(ayx-b)$$ which looks slightly better. Now, changing variable $x=\frac 1z$, the equation write $$\frac{dz}{dy}-b z+ay=0$$which looks much better. It is easy now to get $$z=\frac{a (1+b y)}{b^2}+c_1 e^{b y}$$ $$x=\frac{b^2}{a(1+ b y)+ c_1 e^{b y}}$$ Solving for $y$ appears, once more, Lambert function $$y=\frac{-a W\left(c_1 e^{\frac{b^2}{a x}}\right)-a+\frac{b^2}{x}}{a b}$$
• You are very welcome ! The first change looked obvious to me. Later, I tried a few changes. You must look at Lambert function (Wikipedia has a good page about it). What you must know is that any equation whcig can write as $A+Bx+C\log(D+Ex)=0$ has an explicit solution in terms of Lambert function. For me, this function became almost as important as $e^x$ or $\log(x)$. Lambert and Euler worked together. Look at it and come back if you need more. – Claude Leibovici Apr 24 '15 at 11:31