61.2.36 problem 36

Internal problem ID [11963]
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 : 36
Date solved : Wednesday, March 05, 2025 at 03:16:43 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.028 (sec). Leaf size: 69
ode:=x*diff(y(x),x) = y(x)^2*a+(n+b*x^n)*y(x)+c*x^(2*n); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{n} \left (b^{2}-\sqrt {4 a \,b^{2} c -b^{4}}\, \tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (b \,x^{n}+c_{1} n \right )}{2 b^{2} n}\right )\right )}{2 a b} \]
Mathematica. Time used: 0.688 (sec). Leaf size: 114
ode=x*D[y[x],x]==a*y[x]^2+(n+b*x^n)*y[x]+c*x^(2*n); 
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}}+c_1\right )}{e^{\frac {x^n \sqrt {b^2-4 a c}}{n}}+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*y(x)**2 - c*x**(2*n) + x*Derivative(y(x), x) - (b*x**n + n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*y(x)**2 + b*x**n*y(x) + c*x**(2*n) + n*y(x))/x cannot be solved by the factorable group method