2.2.10 Problem 11

2.2.10.1 Solved using first_order_ode_riccati
2.2.10.2 Maple
2.2.10.3 Mathematica
2.2.10.4 Sympy

Internal problem ID [13216]
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 : 11
Date solved : Wednesday, December 31, 2025 at 12:07:39 PM
CAS classification : [_Riccati]

2.2.10.1 Solved using first_order_ode_riccati

23.593 (sec)

Entering first order ode riccati solver

\begin{align*} y^{\prime }&=\left (a \,x^{2 n}+b \,x^{n -1}\right ) y^{2}+c \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= x^{2 n} a y^{2}+x^{n -1} b y^{2}+c \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \textit {the\_rhs} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=c\), \(f_1(x)=0\) and \(f_2(x)=a \,x^{2 n}+\frac {b \,x^{n}}{x}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \left (a \,x^{2 n}+\frac {b \,x^{n}}{x}\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 {2 a \,x^{2 n} n}{x}+\frac {b \,x^{n} n}{x^{2}}-\frac {b \,x^{n}}{x^{2}}\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\left (a \,x^{2 n}+\frac {b \,x^{n}}{x}\right )^{2} c \end{align*}

Substituting the above terms back in equation (2) gives

\[ \left (a \,x^{2 n}+\frac {b \,x^{n}}{x}\right ) u^{\prime \prime }\left (x \right )-\left (\frac {2 a \,x^{2 n} n}{x}+\frac {b \,x^{n} n}{x^{2}}-\frac {b \,x^{n}}{x^{2}}\right ) u^{\prime }\left (x \right )+\left (a \,x^{2 n}+\frac {b \,x^{n}}{x}\right )^{2} c 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 ) = \frac {c_1 \left (\left (-i a^{{3}/{2}} c \,x^{n +1} n +b \left (c^{{3}/{2}} a \,x^{n +1}-i c n \sqrt {a}+c^{{3}/{2}} b \right )\right ) \operatorname {hypergeom}\left (\left [\frac {\left (2+3 n \right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {1+2 n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+i \left (a^{{3}/{2}} x^{n +1}+\sqrt {a}\, b \right ) n c \operatorname {hypergeom}\left (\left [\frac {i \sqrt {c}\, b +\sqrt {a}\, n}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )\right ) {\mathrm e}^{-\frac {i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}} x^{n}}{a \,x^{n +1}+b}+\frac {c_2 \left (\left (-i \sqrt {c}\, x^{n +1} \left (n +2\right ) a^{{3}/{2}}+b \left (a \,x^{n +1} c -i \sqrt {a}\, \left (n +2\right ) \sqrt {c}+b c \right )\right ) x^{n +1} \operatorname {hypergeom}\left (\left [\frac {\left (3 n +4\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {2 n +3}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\left (i x^{2 n +2} a^{{3}/{2}} \sqrt {c}+\left (i \sqrt {a}\, \sqrt {c}\, b -a \right ) x^{n +1}-b \right ) \operatorname {hypergeom}\left (\left [\frac {\left (n +2\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n +2}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right ) \left (n +2\right )\right ) {\mathrm e}^{\frac {i \left (-4 \sqrt {a}\, \sqrt {c}\, x^{n +1}+\pi \left (n +2\right )\right )}{4 n +4}}}{a \,x^{n +1}+b} \end{equation}
Taking derivative gives
\begin{equation} \tag{4} \text {Expression too large to display} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u \left (a \,x^{2 n}+\frac {b \,x^{n}}{x}\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*} y &= \frac {\left ({\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} c_3 \left (n +2\right ) \left (a^{3} x^{3 n +4}+3 b \,a^{2} x^{2 n +3}+3 a \,x^{n +2} b^{2}+b^{3} x \right ) \operatorname {hypergeom}\left (\left [\frac {\left (n +2\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n +2}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\sqrt {c}\, \operatorname {hypergeom}\left (\left [\frac {i \sqrt {c}\, b +\sqrt {a}\, n}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right ) n \left (a^{3} x^{3+3 n}+3 b \,a^{2} x^{2 n +2}+3 a \,x^{n +1} b^{2}+b^{3}\right )\right ) c}{\left (\left (\left (i \sqrt {c}\, \left (n +2\right ) a^{{3}/{2}}-b c a \right ) x^{2 n +2}+x^{n +1} b \left (i \sqrt {a}\, \left (n +2\right ) \sqrt {c}-b c \right )\right ) c_3 \,{\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} \operatorname {hypergeom}\left (\left [\frac {\left (3 n +4\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {2 n +3}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\left (\left (i a^{{3}/{2}} c n -a b \,c^{{3}/{2}}\right ) x^{1+2 n}+b \left (i c n \sqrt {a}-c^{{3}/{2}} b \right ) x^{n}\right ) \operatorname {hypergeom}\left (\left [\frac {\left (2+3 n \right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {1+2 n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\left (-i x^{2 n +2} a^{{3}/{2}} \sqrt {c}+\left (-i \sqrt {a}\, \sqrt {c}\, b +a \right ) x^{n +1}+b \right ) c_3 \,{\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} \left (n +2\right ) \operatorname {hypergeom}\left (\left [\frac {\left (n +2\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n +2}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )-i \operatorname {hypergeom}\left (\left [\frac {i \sqrt {c}\, b +\sqrt {a}\, n}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right ) \left (\sqrt {a}\, b \,x^{n}+a^{{3}/{2}} x^{1+2 n}\right ) n c \right ) \left (a \,x^{n +1}+b \right )^{2}} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {\left ({\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} c_3 \left (n +2\right ) \left (a^{3} x^{3 n +4}+3 b \,a^{2} x^{2 n +3}+3 a \,x^{n +2} b^{2}+b^{3} x \right ) \operatorname {hypergeom}\left (\left [\frac {\left (n +2\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n +2}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\sqrt {c}\, \operatorname {hypergeom}\left (\left [\frac {i \sqrt {c}\, b +\sqrt {a}\, n}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right ) n \left (a^{3} x^{3+3 n}+3 b \,a^{2} x^{2 n +2}+3 a \,x^{n +1} b^{2}+b^{3}\right )\right ) c}{\left (\left (\left (i \sqrt {c}\, \left (n +2\right ) a^{{3}/{2}}-b c a \right ) x^{2 n +2}+x^{n +1} b \left (i \sqrt {a}\, \left (n +2\right ) \sqrt {c}-b c \right )\right ) c_3 \,{\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} \operatorname {hypergeom}\left (\left [\frac {\left (3 n +4\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {2 n +3}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\left (\left (i a^{{3}/{2}} c n -a b \,c^{{3}/{2}}\right ) x^{1+2 n}+b \left (i c n \sqrt {a}-c^{{3}/{2}} b \right ) x^{n}\right ) \operatorname {hypergeom}\left (\left [\frac {\left (2+3 n \right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {1+2 n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )+\left (-i x^{2 n +2} a^{{3}/{2}} \sqrt {c}+\left (-i \sqrt {a}\, \sqrt {c}\, b +a \right ) x^{n +1}+b \right ) c_3 \,{\mathrm e}^{\frac {i \pi \left (n +2\right )}{4 n +4}} \left (n +2\right ) \operatorname {hypergeom}\left (\left [\frac {\left (n +2\right ) \sqrt {a}+i \sqrt {c}\, b}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n +2}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right )-i \operatorname {hypergeom}\left (\left [\frac {i \sqrt {c}\, b +\sqrt {a}\, n}{\sqrt {a}\, \left (2 n +2\right )}\right ], \left [\frac {n}{n +1}\right ], \frac {2 i \sqrt {a}\, \sqrt {c}\, x^{n +1}}{n +1}\right ) \left (\sqrt {a}\, b \,x^{n}+a^{{3}/{2}} x^{1+2 n}\right ) n c \right ) \left (a \,x^{n +1}+b \right )^{2}} \\ \end{align*}
2.2.10.2 Maple. Time used: 0.003 (sec). Leaf size: 1191
ode:=diff(y(x),x) = (a*x^(2*n)+b*x^(n-1))*y(x)^2+c; 
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) = (2*x^(2*n)*n*a+b*x^( 
n-1)*n-b*x^(n-1))/x/(a*x^(2*n)+b*x^(n-1))*diff(y(x),x)-(a*x^(2*n)+b*x^(n-1))*c* 
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 
            -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
                  <- hyper3 successful: received ODE is equivalent to the 1F1 O\ 
DE 
         <- hypergeometric successful 
      <- special function solution successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\left (a \,x^{26432}+b \,x^{13215}\right ) y \left (x \right )^{2}+c \\ \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 )=\left (a \,x^{26432}+b \,x^{13215}\right ) y \left (x \right )^{2}+c \end {array} \]
2.2.10.3 Mathematica. Time used: 0.717 (sec). Leaf size: 836
ode=D[y[x],x]==(a*x^(2*n)+b*x^(n-1))*y[x]^2+c; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt {c} (n+1)^2 x^{-n} \left (L_{-\frac {\sqrt {c} b}{2 \sqrt {a} \sqrt {-(n+1)^2}}-\frac {n}{2 (n+1)}}^{-\frac {1}{n+1}}\left (\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )+c_1 \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {n}{n+1}\right ),\frac {n}{n+1},\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )\right )}{\sqrt {a} c_1 (n+1) \sqrt {-(n+1)^2} \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {n}{n+1}\right ),\frac {n}{n+1},\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )+c_1 \left (\sqrt {a} \sqrt {-(n+1)^2} n+b \sqrt {c} (n+1)\right ) \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {3 n+2}{n+1}\right ),\frac {n}{n+1}+1,\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )+\sqrt {a} (n+1) \sqrt {-(n+1)^2} \left (L_{-\frac {\sqrt {c} b}{2 \sqrt {a} \sqrt {-(n+1)^2}}-\frac {n}{2 (n+1)}}^{-\frac {1}{n+1}}\left (\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )+2 L_{-\frac {\sqrt {c} b}{2 \sqrt {a} \sqrt {-(n+1)^2}}-\frac {3 n+2}{2 n+2}}^{\frac {n}{n+1}}\left (\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )\right )}\\ y(x)&\to \frac {\sqrt {c} (n+1)^2 x^{-n} \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {n}{n+1}\right ),\frac {n}{n+1},\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )}{\sqrt {a} (n+1) \sqrt {-(n+1)^2} \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {n}{n+1}\right ),\frac {n}{n+1},\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )+\left (\sqrt {a} \sqrt {-(n+1)^2} n+b \sqrt {c} (n+1)\right ) \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {\sqrt {c} b}{\sqrt {a} \sqrt {-(n+1)^2}}+\frac {n}{n+1}+2\right ),\frac {n}{n+1}+1,\frac {2 \sqrt {a} \sqrt {c} x^{n+1}}{\sqrt {-(n+1)^2}}\right )} \end{align*}
2.2.10.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-c - (a*x**(2*n) + b*x**(n - 1))*y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*x**(2*n)*y(x)**2 - b*x**(n - 1)*y(x)**2 - c + Derivative(y(x), x) cannot be solved by the factorable group method