6.5.40 problem 37(a)

Internal problem ID [1664]
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 : 37(a)
Date solved : Tuesday, September 30, 2025 at 04:47:36 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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