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 : Wednesday, March 05, 2025 at 03:14:51 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.004 (sec). Leaf size: 141
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 \,x^{n} n +x^{m} m b \right ) \left (a \,x^{n}+x^{m} b +c \right ) \left (\int \frac {1}{\left (a \,x^{n}+x^{m} b +c \right )^{2}}d x \right )-x^{2 m} c_{1} b^{2} m -c_{1} b \left (a \left (m +n \right ) x^{n}+c m \right ) x^{m}-x^{2 n} c_{1} a^{2} n -x^{n} c_{1} a c n -x}{\left (a \,x^{n}+x^{m} b +c \right )^{2} x \left (c_{1} +\int \frac {1}{\left (a \,x^{n}+x^{m} b +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