73.7.31 problem 31

Internal problem ID [15118]
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 : Monday, March 31, 2025 at 01:25:35 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} x y y^{\prime }&=x^{2}+x y+y^{2} \end{align*}

Maple. Time used: 0.012 (sec). Leaf size: 21
ode:=x*y(x)*diff(y(x),x) = x^2+x*y(x)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x \left (\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-c_1 -1}}{x}\right )+1\right ) \]
Mathematica. Time used: 0.089 (sec). Leaf size: 30
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]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {K[1]}{K[1]+1}dK[1]=\log (x)+c_1,y(x)\right ] \]
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