2.2.70 Problem 74

2.2.70.1 Solved using first_order_ode_riccati
2.2.70.2 Maple
2.2.70.3 Mathematica
2.2.70.4 Sympy

Internal problem ID [13276]
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 : 74
Date solved : Sunday, January 18, 2026 at 07:05:01 PM
CAS classification : [_rational, _Riccati]

2.2.70.1 Solved using first_order_ode_riccati

7.849 (sec)

Entering first order ode riccati solver

\begin{align*} x^{2} \left (x^{n} a -1\right ) \left (y^{\prime }+\lambda y^{2}\right )+\left (p \,x^{n}+q \right ) x y+r \,x^{n}+s&=0 \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= -\frac {x^{n} y^{2} a \lambda \,x^{2}-y^{2} \lambda \,x^{2}+x^{n} y p x +y q x +r \,x^{n}+s}{x^{2} \left (x^{n} a -1\right )} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = -\frac {x^{n} y^{2} a \lambda }{x^{n} a -1}+\frac {y^{2} \lambda }{x^{n} a -1}-\frac {x^{n} y p}{x \left (x^{n} a -1\right )}-\frac {y q}{x \left (x^{n} a -1\right )}-\frac {r \,x^{n}}{x^{2} \left (x^{n} a -1\right )}-\frac {s}{x^{2} \left (x^{n} a -1\right )} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=-\frac {r \,x^{n}}{x^{2} \left (x^{n} a -1\right )}-\frac {s}{x^{2} \left (x^{n} a -1\right )}\), \(f_1(x)=-\frac {x^{n} p}{x \left (x^{n} a -1\right )}-\frac {q}{x \left (x^{n} a -1\right )}\) and \(f_2(x)=-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )} \tag {1} \end{align*}

Using the above substitution in the given ODE results (after some simplification) in a second order ODE to solve for \(u(x)\) which is

\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}

But

\begin{align*} f_2' &=\frac {x^{2 n} a^{2} \lambda n}{\left (x^{n} a -1\right )^{2} x}-\frac {x^{n} n a \lambda }{\left (x^{n} a -1\right ) x}-\frac {\lambda a n \,x^{n}}{\left (x^{n} a -1\right )^{2} x}\\ f_1 f_2 &=\left (-\frac {x^{n} p}{x \left (x^{n} a -1\right )}-\frac {q}{x \left (x^{n} a -1\right )}\right ) \left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )\\ f_2^2 f_0 &=\left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )^{2} \left (-\frac {r \,x^{n}}{x^{2} \left (x^{n} a -1\right )}-\frac {s}{x^{2} \left (x^{n} a -1\right )}\right ) \end{align*}

Substituting the above terms back in equation (2) gives

\[ \left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right ) u^{\prime \prime }\left (x \right )-\left (\frac {x^{2 n} a^{2} \lambda n}{\left (x^{n} a -1\right )^{2} x}-\frac {x^{n} n a \lambda }{\left (x^{n} a -1\right ) x}-\frac {\lambda a n \,x^{n}}{\left (x^{n} a -1\right )^{2} x}+\left (-\frac {x^{n} p}{x \left (x^{n} a -1\right )}-\frac {q}{x \left (x^{n} a -1\right )}\right ) \left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )\right ) u^{\prime }\left (x \right )+\left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )^{2} \left (-\frac {r \,x^{n}}{x^{2} \left (x^{n} a -1\right )}-\frac {s}{x^{2} \left (x^{n} a -1\right )}\right ) u \left (x \right ) = 0 \]
Unable to solve. Will ask Maple to solve this ode now.

The solution for \(u \left (x \right )\) is

\begin{equation} \tag{3} u \left (x \right ) = c_1 \,x^{\frac {1}{2}+\frac {q}{2}+\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \operatorname {hypergeom}\left (\left [\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}, \frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q -\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 n a}\right ], \left [\frac {n +\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}\right ], x^{n} a \right )+c_2 \,x^{\frac {1}{2}+\frac {q}{2}-\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \operatorname {hypergeom}\left (\left [\frac {-a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}, -\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}-a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}-p}{2 a n}\right ], \left [\frac {n -\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}\right ], x^{n} a \right ) \end{equation}
Taking derivative gives
\begin{equation} \tag{4} u^{\prime }\left (x \right ) = \frac {c_1 \,x^{\frac {1}{2}+\frac {q}{2}+\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \left (\frac {1}{2}+\frac {q}{2}+\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}\right ) \operatorname {hypergeom}\left (\left [\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}, \frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q -\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 n a}\right ], \left [\frac {n +\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}\right ], x^{n} a \right )}{x}+\frac {c_1 \,x^{\frac {1}{2}+\frac {q}{2}+\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \left (a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p \right ) \left (a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q -\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p \right ) \operatorname {hypergeom}\left (\left [\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}+1, \frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q -\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 n a}+1\right ], \left [\frac {n +\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}+1\right ], x^{n} a \right ) x^{n}}{4 a \left (n +\sqrt {4 \lambda s +q^{2}+2 q +1}\right ) x}+\frac {c_2 \,x^{\frac {1}{2}+\frac {q}{2}-\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \left (\frac {1}{2}+\frac {q}{2}-\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}\right ) \operatorname {hypergeom}\left (\left [\frac {-a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}, -\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}-a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}-p}{2 a n}\right ], \left [\frac {n -\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}\right ], x^{n} a \right )}{x}-\frac {c_2 \,x^{\frac {1}{2}+\frac {q}{2}-\frac {\sqrt {4 \lambda s +q^{2}+2 q +1}}{2}} \left (-a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p \right ) \left (a \sqrt {4 \lambda s +q^{2}+2 q +1}-a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}-p \right ) \operatorname {hypergeom}\left (\left [\frac {-a \sqrt {4 \lambda s +q^{2}+2 q +1}+a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}+p}{2 a n}+1, -\frac {a \sqrt {4 \lambda s +q^{2}+2 q +1}-a q +\sqrt {a^{2}+\left (-4 \lambda r -2 p \right ) a +p^{2}}-p}{2 a n}+1\right ], \left [\frac {n -\sqrt {4 \lambda s +q^{2}+2 q +1}}{n}+1\right ], x^{n} a \right ) x^{n}}{4 a \left (n -\sqrt {4 \lambda s +q^{2}+2 q +1}\right ) x} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u \left (-\frac {x^{n} a \lambda }{x^{n} a -1}+\frac {\lambda }{x^{n} a -1}\right )} \\ y &= \text {Expression too large to display} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ \text {Expression too large to display} \]
Simplifying the above gives
\begin{align*} \text {Expression too large to display} \\ \end{align*}

Summary of solutions found

\begin{align*} \text {Expression too large to display} \\ \end{align*}
2.2.70.2 Maple. Time used: 0.007 (sec). Leaf size: 1218
ode:=x^2*(a*x^n-1)*(diff(y(x),x)+lambda*y(x)^2)+(p*x^n+q)*x*y(x)+r*x^n+s = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
   trying Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = -1/x/(a*x^n-1)*(x^(-\ 
1+n)*p*x+q)*diff(y(x),x)-(x^(-2+n)*r*x^2+s)*lambda/x^2/(a*x^n-1)*y(x), y(x) 
      *** Sublevel 2 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Trying an equivalence, under non-integer power transformations, 
         to LODEs admitting Liouvillian solutions. 
         -> Trying a Liouvillian solution using Kovacics algorithm 
         <- No Liouvillian solutions exists 
      -> Trying a solution in terms of special functions: 
         -> Bessel 
         -> elliptic 
         -> Legendre 
         -> Whittaker 
            -> hyper3: Equivalence to 1F1 under a power @ Moebius 
         -> hypergeometric 
            -> heuristic approach 
            <- heuristic approach successful 
         <- hypergeometric successful 
      <- special function solution successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{2} \left (a \,x^{13276}-1\right ) \left (\frac {d}{d x}y \left (x \right )+\lambda y \left (x \right )^{2}\right )+\left (p \,x^{13276}+q \right ) x y \left (x \right )+r \,x^{13276}+s =0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\frac {x^{13278} \lambda y \left (x \right )^{2} a -x^{2} \lambda y \left (x \right )^{2}+x^{13277} y \left (x \right ) p +x y \left (x \right ) q +r \,x^{13276}+s}{x^{2} \left (a \,x^{13276}-1\right )} \end {array} \]
2.2.70.3 Mathematica. Time used: 3.074 (sec). Leaf size: 1882
ode=x^2*(a*x^n-1)*(D[y[x],x]+\[Lambda]*y[x]^2)+(p*x^n+q)*x*y[x]+r*x^n+s==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}
2.2.70.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
lambda_ = symbols("lambda_") 
n = symbols("n") 
p = symbols("p") 
q = symbols("q") 
r = symbols("r") 
s = symbols("s") 
y = Function("y") 
ode = Eq(r*x**n + s + x**2*(a*x**n - 1)*(lambda_*y(x)**2 + Derivative(y(x), x)) + x*(p*x**n + q)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0