# Nonlinear 1st order ODE involving a rational function

$$y'=\frac{-6x+y-3}{2x-y-1}$$ Is there a foolproof method for tackling equations of the form $y'=\dfrac{ax+by+c}{dx+ey+f}$ ?

I've tried a few substitutions (like $y=vx$ and $v=2x-y-1$, neither of which seem to work), and I've also tried treating the equation as one would an exact equation, but the integrating factor isn't one-dimensional.

There sure is!

First let's tackle an equation of the form $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{Ax+By}{Cx+Dy}\tag{1} \quad .$$

Divide top and bottomh by $x$, on the RHS, to give $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{A+B\left(\frac{y}{x}\right)}{C+D\left(\frac{y}{x} \right)} \quad.$$

Now let $v=\frac{y}{x} \iff y=vx \implies \underbrace{\frac{\mathrm{d}y}{\mathrm{d}x}=v+x\frac{\mathrm{d}v}{\mathrm{d}x}}_{\text{product rule}} \quad .$

Then we have $$v+x\frac{\mathrm{d}v}{\mathrm{d}x}=\frac{A+Bv}{C+Dv}$$ which is separable (I'll leave this as an exercise for you-- subtract $v$ from both sides and put everything on RHS over a common denominator).

Now, what happens if we've got an equation of the form $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{ax+by+c}{dx+ey+f} \quad?$$

Let $$X=x-x_0, \quad Y=y-y_0 \iff x=X+x_0, \quad y=Y+y_0 \quad$$ for some suitable constants $x_0, y_0$ (which are to be determined).

Then we have $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\mathrm{d}Y}{\mathrm{d}X}=\frac{a(X+x_0)+b(Y+y_0)+c}{d(X+x_0)+e(Y+y_0)+f}=\frac{aX+bY+(\color{red}{ax_0+by_0+c})}{cX+dY+(\color{green}{dx_0+ey_0+f})}.$$

We now choose $x_0, y_0$ so that the constant terms vanish.

i.e. $$\begin{cases}\color{red}{ax_0+by_0+c=0} \\ \color{green}{dx_0+ey_0+f=0}\end{cases} \tag{2}$$ which we can solve (under certain conditions) to give $x_0$ and $y_0$.

Then we have $$\frac{\mathrm{d}Y}{\mathrm{d}X}=\frac{aX+bY}{dX+eY}$$ which is of the form $(1).$

• This is what SE is made for, answering question. Isn't it! – jlandercy Sep 22 '14 at 18:26
• That last line regarding $(2)\implies$ the ODE has no solution seems too strong to me. For instance, the ODE $\dfrac{dy}{dx}=\dfrac{x+1}{x}$ is separable but the system $\{x_0+1=0,x_0=0\}$ is inconsistent. – Semiclassical Sep 22 '14 at 18:46
• @Semiclassical Well noted. Thanks. I'll remove that last part. – beep-boop Sep 22 '14 at 18:48
• It would be worth figuring out what the system being overdetermined (i.e. $ae=bd$) does imply about the solution of the ODE. Seems like a better substitution should be available in that case. – Semiclassical Sep 22 '14 at 19:17