How to solve the ODE $y' = \frac{x+y-2}{y-x-4}$?

89 Views Asked by At

I am trying to solve the ODE $$y' = \frac{x+y-2}{y-x-4} \tag1 $$

This is a homogeneous special form ODE.


Let $x = u -1$ and $y=v+3$ in order to transform it to a homogeneous ODE. Hence,

$$ (1) \iff v'(u) = \frac{u+v(u)}{v-u} \tag 2$$


At last let $v(u) = z(u)u \iff v'(u) = z'(u)u+z(u)$ therefore,

$$ (2) \iff \frac{z'(u)}{z(u)+1} = \frac1u \tag 3$$

$(3)$ is a seperate variable ODE. Therefore we integrate both sides.

$$ \int \frac{z'(u)}{z(u)+1} \,du = \int \frac1u \,du $$


This integral seems to be easy to evaluate

$$ \int \frac{z'(u)}{z(u)+1} \, du $$

but I can't get my head around it. Any ideas?

2

There are 2 best solutions below

0
On BEST ANSWER

Your integral is just: $$I=\int \dfrac {dz}{z+1}=\ln |z+1|+C$$


$$y' = \frac{x+y-2}{y-x-4}$$ Is easy to integrate: $$(y-x-4)dy-(x+y-2)dx=0$$ $$(y-4)dy-(x-2)dx-(xdy+ydx)=0$$ $$(y-4)dy-(x-2)dx-dxy=0$$ Integration gives us : $$\dfrac {y^2}2-4y-\dfrac {x^2}2+2x-xy=C$$

0
On

Here I propose an alternative way to solve it for the sake of curiosity.

\begin{align*} y' = \frac{x + y - 2}{y - x - 4} & \Longleftrightarrow (y-x-4)y' = x + y - 2\\\\ & \Longleftrightarrow yy' - xy' - 4y' = x + y - 2\\\\ & \Longleftrightarrow yy' - 4y ' = x + xy' + y-2\\\\ & \Longleftrightarrow \frac{1}{2}(y^{2})' - 4y' = (xy)' + x - 2\\\\ & \Longleftrightarrow y^{2} - 8y = 2xy + x^{2} - 4x + c \end{align*}