61.2.44 problem 44

Internal problem ID [11971]
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 : 44
Date solved : Wednesday, March 05, 2025 at 03:17:15 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.031 (sec). Leaf size: 78
ode:=x*diff(y(x),x) = a*x^(2*n+m)*y(x)^2+(b*x^(n+m)-n)*y(x)+c*x^m; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{-n} \left (\sqrt {4 a \,b^{2} c -b^{4}}\, \tan \left (\frac {\left (x^{m +n} b +c_{1} \left (m +n \right )\right ) \sqrt {4 a \,b^{2} c -b^{4}}}{2 b^{2} \left (m +n \right )}\right )-b^{2}\right )}{2 a b} \]
Mathematica. Time used: 1.812 (sec). Leaf size: 126
ode=x*D[y[x],x]==a*x^(2*n+m)*y[x]^2+(b*x^(n+m)-n)*y[x]+c*x^m; 
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 {\sqrt {b^2-4 a c} x^{m+n}}{m+n}}+c_1\right )}{e^{\frac {\sqrt {b^2-4 a c} x^{m+n}}{m+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") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*x**(m + 2*n)*y(x)**2 - c*x**m + x*Derivative(y(x), x) - (b*x**(m + n) - n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out