61.8.11 problem 20

Internal problem ID [12092]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. subsection 1.2.5-2
Problem number : 20
Date solved : Wednesday, March 05, 2025 at 04:15:52 PM
CAS classification : [_Riccati]

\begin{align*} x y^{\prime }&=a \,x^{2 n} \ln \left (x \right ) y^{2}+\left (b \,x^{n} \ln \left (x \right )-n \right ) y+c \ln \left (x \right ) \end{align*}

Maple. Time used: 0.061 (sec). Leaf size: 80
ode:=x*diff(y(x),x) = a*x^(2*n)*ln(x)*y(x)^2+(b*x^n*ln(x)-n)*y(x)+c*ln(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\sqrt {4 a \,b^{2} c -b^{4}}\, \tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (b \left (n \ln \left (x \right )-1\right ) x^{n}+c_{1} n^{2}\right )}{2 b^{2} n^{2}}\right )-b^{2}\right ) x^{-n}}{2 a b} \]
Mathematica. Time used: 0.907 (sec). Leaf size: 130
ode=x*D[y[x],x]==a*x^(2*n)*Log[x]*y[x]^2+(b*x^n*Log[x]-n)*y[x]+c*Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^{-n} \left (-b+\frac {\sqrt {b^2-4 a c} \left (-e^{\frac {x^n \sqrt {b^2-4 a c} (n \log (x)-1)}{n^2}}+c_1\right )}{e^{\frac {x^n \sqrt {b^2-4 a c} (n \log (x)-1)}{n^2}}+c_1}\right )}{2 a} \\ y(x)\to \frac {x^{-n} \left (\sqrt {b^2-4 a c}-b\right )}{2 a} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*x**(2*n)*y(x)**2*log(x) - c*log(x) + x*Derivative(y(x), x) - (b*x**n*log(x) - n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**(2*n)*y(x)**2*log(x) + b*x**n*y(x)*log(x) + c*log(x) - n*y(x))/x cannot be solved by the factorable group method