61.2.47 problem 47

Internal problem ID [11974]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 47
Date solved : Wednesday, March 05, 2025 at 03:18:23 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.006 (sec). Leaf size: 24
ode:=2*x^2*diff(y(x),x) = 2*y(x)^2+x*y(x)-2*x*a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tanh \left (\frac {i c_{1} \sqrt {x}+2 a}{\sqrt {x}}\right ) \sqrt {x}\, a \]
Mathematica. Time used: 0.447 (sec). Leaf size: 43
ode=2*x^2*D[y[x],x]==2*y[x]^2+x*y[x]-2*a^2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sqrt {-a^2} \sqrt {x} \tan \left (\frac {2 \sqrt {-a^2}}{\sqrt {x}}-c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(2*a**2*x + 2*x**2*Derivative(y(x), x) - x*y(x) - 2*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded