28.1.37 problem 37

Internal problem ID [4343]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 37
Date solved : Sunday, March 30, 2025 at 03:06:05 AM
CAS classification : [_rational]

\begin{align*} 2 x y^{2}-y+\left (y^{2}+x +y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.022 (sec). Leaf size: 28
ode:=2*x*y(x)^2-y(x)+(y(x)^2+x+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (x^{2} {\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{2 \textit {\_Z}}+c_1 \,{\mathrm e}^{\textit {\_Z}}+\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}-x \right )} \]
Mathematica. Time used: 0.182 (sec). Leaf size: 22
ode=(2*x*y[x]^2-y[x])+(y[x]^2+x+y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x^2-\frac {x}{y(x)}+y(x)+\log (y(x))=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)**2 + (x + y(x)**2 + y(x))*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out