29.22.11 problem 619

Internal problem ID [5211]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 22
Problem number : 619
Date solved : Sunday, March 30, 2025 at 06:52:38 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.017 (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.399 (sec). Leaf size: 53
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 {-\frac {3 y(x)^2}{x^2}-\frac {2 y(x)}{x}+1}{2 \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