67.7.31 problem 31

Internal problem ID [16476]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 8. Review exercises for part of part II. page 143
Problem number : 31
Date solved : Thursday, October 02, 2025 at 01:34:52 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} x y y^{\prime }&=x^{2}+y x +y^{2} \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 23
ode:=x*y(x)*diff(y(x),x) = x^2+x*y(x)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-c_1 -1}}{x}\right ) x -x \]
Mathematica. Time used: 1.246 (sec). Leaf size: 31
ode=x*y[x]*D[y[x],x]==x^2+x*y[x]+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x \left (1+W\left (-\frac {e^{-1-c_1}}{x}\right )\right )\\ y(x)&\to -x \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*y(x)*Derivative(y(x), x) - x*y(x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded