23.1.541 problem 531

Internal problem ID [5148]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 531
Date solved : Tuesday, September 30, 2025 at 11:45:27 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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