6.5.43 problem 42

Internal problem ID [1667]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 42
Date solved : Tuesday, September 30, 2025 at 04:48:33 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {2 x +y+1}{x +2 y-4} \end{align*}
Maple. Time used: 0.538 (sec). Leaf size: 31
ode:=diff(y(x),x) = (2*x+y(x)+1)/(x+2*y(x)-4); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\operatorname {RootOf}\left (-2 \left (x +2\right ) c_1 \,\textit {\_Z}^{3}+\textit {\_Z}^{4}-1\right )+\left (x +5\right ) c_1}{c_1} \]
Mathematica. Time used: 60.184 (sec). Leaf size: 4389
ode=D[y[x],x]==(2*x+y[x]+1)/(x+2*y[x]-4); 
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(Derivative(y(x), x) - (2*x + y(x) + 1)/(x + 2*y(x) - 4),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out