2.31 problem Example 3

Internal problem ID [5026]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number: Example 3.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_homogeneous, class C], _rational, [_Abel, 2nd type, class A]]

Solve \begin {gather*} \boxed {y^{\prime }-\frac {x +y-2}{y-x -4}=0} \end {gather*}

Solution by Maple

Time used: 0.364 (sec). Leaf size: 32

dsolve(diff(y(x),x)=(x+y(x)-2)/(y(x)-x-4),y(x), singsol=all)
 

\[ y \relax (x ) = 3-\frac {-c_{1} \left (x +1\right )+\sqrt {2 \left (x +1\right )^{2} c_{1}^{2}+1}}{c_{1}} \]

Solution by Mathematica

Time used: 0.095 (sec). Leaf size: 59

DSolve[y'[x]==(x+y[x]-2)/(y[x]-x-4),y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to x-i \sqrt {-2 (x (x+2)+8)-c_1}+4 \\ y(x)\to x+i \sqrt {-2 (x (x+2)+8)-c_1}+4 \\ \end{align*}