78.3.16 problem 5 (d)

Internal problem ID [18040]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 7 (Homogeneous Equations). Problems at page 67
Problem number : 5 (d)
Date solved : Thursday, March 13, 2025 at 11:23:53 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 2.305 (sec). Leaf size: 139
ode:=diff(y(x),x) = (x+y(x)-1)/(x+4*y(x)+2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x -4\right ) \operatorname {RootOf}\left (\textit {\_Z}^{16}+\left (2 c_1 \,x^{4}-16 c_1 \,x^{3}+48 c_1 \,x^{2}-64 c_1 x +32 c_1 \right ) \textit {\_Z}^{4}-c_1 \,x^{4}+8 c_1 \,x^{3}-24 c_1 \,x^{2}+32 c_1 x -16 c_1 \right )^{4}-x +2}{2 \operatorname {RootOf}\left (\textit {\_Z}^{16}+\left (2 c_1 \,x^{4}-16 c_1 \,x^{3}+48 c_1 \,x^{2}-64 c_1 x +32 c_1 \right ) \textit {\_Z}^{4}-c_1 \,x^{4}+8 c_1 \,x^{3}-24 c_1 \,x^{2}+32 c_1 x -16 c_1 \right )^{4}} \]
Mathematica. Time used: 60.297 (sec). Leaf size: 8141
ode=D[y[x],x]==(x+y[x]-1)/(x+4*y[x]+2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - y(x) + 1)/(x + 4*y(x) + 2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out