56.1.36 problem 37

Internal problem ID [8748]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 37
Date solved : Sunday, March 30, 2025 at 01:29:58 PM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }-2 y+b y^{2}&=c \,x^{4} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=x*diff(y(x),x)-2*y(x)+b*y(x)^2 = c*x^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {i \tan \left (-\frac {i x^{2} \sqrt {b}\, \sqrt {c}}{2}+c_1 \right ) x^{2} \sqrt {c}}{\sqrt {b}} \]
Mathematica. Time used: 0.242 (sec). Leaf size: 153
ode=x*D[y[x],x]-2*y[x]+b*y[x]^2==c*x^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt {c} x^2 \left (-\cos \left (\frac {1}{2} \sqrt {-b} \sqrt {c} x^2\right )+c_1 \sin \left (\frac {1}{2} \sqrt {-b} \sqrt {c} x^2\right )\right )}{\sqrt {-b} \left (\sin \left (\frac {1}{2} \sqrt {-b} \sqrt {c} x^2\right )+c_1 \cos \left (\frac {1}{2} \sqrt {-b} \sqrt {c} x^2\right )\right )} \\ y(x)\to \frac {\sqrt {c} x^2 \tan \left (\frac {1}{2} \sqrt {-b} \sqrt {c} x^2\right )}{\sqrt {-b}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(b*y(x)**2 - c*x**4 + x*Derivative(y(x), x) - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded