38.2.28 problem 28

Internal problem ID [6457]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 28
Date solved : Wednesday, March 05, 2025 at 12:46:04 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} x^{2}-2 x y+5 y^{2}&=\left (x^{2}+2 x y+y^{2}\right ) y^{\prime } \end{align*}

Maple. Time used: 0.020 (sec). Leaf size: 35
ode:=x^2-2*x*y(x)+5*y(x)^2 = (x^2+2*x*y(x)+y(x)^2)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (1+{\mathrm e}^{\operatorname {RootOf}\left (\ln \left (x \right ) {\mathrm e}^{2 \textit {\_Z}}+c_1 \,{\mathrm e}^{2 \textit {\_Z}}+\textit {\_Z} \,{\mathrm e}^{2 \textit {\_Z}}-4 \,{\mathrm e}^{\textit {\_Z}}-2\right )}\right ) \]
Mathematica. Time used: 0.413 (sec). Leaf size: 53
ode=(x^2-2*x*y[x]+5*y[x]^2)==(x^2+2*x*y[x]+y[x]^2)*D[y[x],x]; 
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**2 + 2*x*y(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