23.1.628 problem 622

Internal problem ID [5235]
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 : 622
Date solved : Tuesday, September 30, 2025 at 11:58:03 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} \left (x +y\right )^{2} y^{\prime }&=x^{2}-2 x y+5 y^{2} \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 35
ode:=(x+y(x))^2*diff(y(x),x) = x^2-2*x*y(x)+5*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left ({\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{2 \textit {\_Z}} \ln \left (x \right )+{\mathrm e}^{2 \textit {\_Z}} c_1 +\textit {\_Z} \,{\mathrm e}^{2 \textit {\_Z}}-4 \,{\mathrm e}^{\textit {\_Z}}-2\right )}+1\right ) \]
Mathematica. Time used: 0.19 (sec). Leaf size: 41
ode=(x+y[x])^2 *D[y[x],x]==x^2-2*x*y[x]+5*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {2-\frac {4 y(x)}{x}}{\left (\frac {y(x)}{x}-1\right )^2}+\log \left (\frac {y(x)}{x}-1\right )=-\log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 2*x*y(x) + (x + y(x))**2*Derivative(y(x), x) - 5*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational: 2 < -x**2