47.2.31 problem Example 3

Internal problem ID [7447]
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
Date solved : Monday, January 27, 2025 at 03:00:06 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +y-2}{y-x -4} \end{align*}

Solution by Maple

Time used: 0.145 (sec). Leaf size: 30

dsolve(diff(y(x),x)=(x+y(x)-2)/(y(x)-x-4),y(x), singsol=all)
 
\[ y = \frac {-\sqrt {2 \left (x +1\right )^{2} c_{1}^{2}+1}+\left (x +4\right ) c_{1}}{c_{1}} \]

Solution by Mathematica

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

DSolve[D[y[x],x]==(x+y[x]-2)/(y[x]-x-4),y[x],x,IncludeSingularSolutions -> True]
 
\begin{align*} y(x)\to -i \sqrt {-2 x^2-4 x-16-c_1}+x+4 \\ y(x)\to i \sqrt {-2 x^2-4 x-16-c_1}+x+4 \\ \end{align*}