how do i solve this differential equation y'=2y-x over 2x-y

Verified Answer :

\(y'=\dfrac{2y-x}{2x-y}\)

Let \(y=xv\), where \(v=v(x)\), so that \(y'=xv'+v\). Then the ODE is

\(xv'+v=\dfrac{2xv-x}{2x-xv}\)
\(xv'=\dfrac{2x(v-1)}{x(2-v)}-v\)
\(xv'=\dfrac{2(v-1)}{2-v}-\dfrac{v(2-v)}{2-v}\)
\(xv'=\dfrac{v^2-2}{2-v}\)

This is separable, so you have

\(\dfrac{2-v}{v^2-2}\,\mathrm dv=\dfrac{\mathrm dx}x\)

Integrate both sides, solving for \(v\) if possible, then replace using \(v=\dfrac yx\) and solve for \(y\) if possible.