56.1.30 problem 31

Internal problem ID [8742]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 31
Date solved : Wednesday, March 05, 2025 at 06:43:32 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Riccati]

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

Maple. Time used: 0.006 (sec). Leaf size: 19
ode:=diff(y(x),x) = (5*x^2-x*y(x)+y(x)^2)/x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (1+2 \tan \left (2 \ln \left (x \right )+2 c_{1} \right )\right ) \]
Mathematica. Time used: 0.899 (sec). Leaf size: 18
ode=D[y[x],x]==(5*x^2-x*y[x]+y[x]^2)/x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x+2 x \tan (2 (\log (x)+c_1)) \]
Sympy. Time used: 0.284 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (5*x**2 - x*y(x) + y(x)**2)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (C_{1} \left (1 + 2 i\right ) + \left (-1 + 2 i\right ) e^{4 i \log {\left (x \right )}}\right )}{C_{1} - e^{4 i \log {\left (x \right )}}} \]