61.2.23 problem 23

Internal problem ID [11950]
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 : 23
Date solved : Sunday, March 30, 2025 at 09:26:06 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.009 (sec). Leaf size: 169
ode:=(a*x^n+b*x^m+c)*(diff(y(x),x)-y(x)^2)+a*n*(n-1)*x^(n-2)+b*m*(m-1)*x^(m-2) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-a b \left (m +n \right ) x^{m +n}-m \,x^{2 m} b^{2}-n \,x^{2 n} a^{2}-c \left (a n \,x^{n}+b m \,x^{m}\right )\right ) \int \frac {1}{\left (a \,x^{n}+b \,x^{m}+c \right )^{2}}d x -a b c_1 \left (m +n \right ) x^{m +n}-x^{2 n} c_1 \,a^{2} n -x^{n} c_1 a c n -x^{2 m} c_1 \,b^{2} m -x^{m} c_1 b c m -x}{\left (a \,x^{n}+b \,x^{m}+c \right )^{2} x \left (c_1 +\int \frac {1}{\left (a \,x^{n}+b \,x^{m}+c \right )^{2}}d x \right )} \]
Mathematica. Time used: 4.464 (sec). Leaf size: 201
ode=(a*x^n+b*x^m+c)*(D[y[x],x]-y[x]^2)+a*n*(n-1)*x^(n-2)+b*m*(m-1)*x^(m-2)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {c_1 \left (\frac {\left (a n x^n+b m x^m\right ) \int _1^x\frac {1}{\left (b K[1]^m+a K[1]^n+c\right )^2}dK[1]}{x}+\frac {1}{a x^n+b x^m+c}\right )+a n x^{n-1}+b m x^{m-1}}{\left (a x^n+b x^m+c\right ) \left (1+c_1 \int _1^x\frac {1}{\left (b K[1]^m+a K[1]^n+c\right )^2}dK[1]\right )} \\ y(x)\to -\frac {\frac {1}{\int _1^x\frac {1}{\left (b K[1]^m+a K[1]^n+c\right )^2}dK[1]}+\frac {\left (a n x^n+b m x^m\right ) \left (a x^n+b x^m+c\right )}{x}}{\left (a x^n+b x^m+c\right )^2} \\ \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*n*x**(n - 2)*(n - 1) + b*m*x**(m - 2)*(m - 1) + (-y(x)**2 + Derivative(y(x), x))*(a*x**n + b*x**m + c),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out