2.2.20 Problem 22
Internal
problem
ID
[13226]
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
:
22
Date
solved
:
Sunday, January 18, 2026 at 06:48:36 PM
CAS
classification
:
[_rational, _Riccati]
2.2.20.1 Solved using first_order_ode_riccati
2.170 (sec)
Entering first order ode riccati solver
\begin{align*}
\left (x^{n} a +b \right ) y^{\prime }&=b y^{2}+a \,x^{n -2} \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {b y^{2}+a \,x^{n -2}}{x^{n} a +b} \end{align*}
This is a Riccati ODE. Comparing the ODE to solve
\[
y' = \frac {b y^{2}}{x^{n} a +b}+\frac {a \,x^{n}}{\left (x^{n} a +b \right ) x^{2}}
\]
With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows
that \(f_0(x)=\frac {a \,x^{n}}{\left (x^{n} a +b \right ) x^{2}}\), \(f_1(x)=0\) and \(f_2(x)=\frac {b}{x^{n} a +b}\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u b}{x^{n} a +b}} \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 {b a n \,x^{n}}{\left (x^{n} a +b \right )^{2} x}\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\frac {b^{2} a \,x^{n}}{\left (x^{n} a +b \right )^{3} x^{2}} \end{align*}
Substituting the above terms back in equation (2) gives
\[
\frac {b u^{\prime \prime }\left (x \right )}{x^{n} a +b}+\frac {b a n \,x^{n} u^{\prime }\left (x \right )}{\left (x^{n} a +b \right )^{2} x}+\frac {b^{2} a \,x^{n} u \left (x \right )}{\left (x^{n} a +b \right )^{3} x^{2}} = 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 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )
\end{equation}
Taking derivative gives \begin{equation}
\tag{4} u^{\prime }\left (x \right ) = c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+\frac {c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )}{x^{n} a +b}-\frac {2 c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1+\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n}}{b}+\frac {c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )}{x \left (x^{n} a +b \right )}-\frac {c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [2, 1+\frac {1}{n}\right ], \left [\frac {n -1}{n}+1\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n} n}{\left (n -1\right ) b x}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{\frac {u b}{x^{n} a +b}} \\
y &= -\frac {\left (c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+\frac {c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )}{x^{n} a +b}-\frac {2 c_1 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1+\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n}}{b}+\frac {c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )}{x \left (x^{n} a +b \right )}-\frac {c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [2, 1+\frac {1}{n}\right ], \left [\frac {n -1}{n}+1\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n} n}{\left (n -1\right ) b x}\right ) \left (x^{n} a +b \right )}{b \left (c_1 x \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+c_2 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )\right )} \\
\end{align*}
Doing change of constants, the above solution becomes \[
y = -\frac {\left (\left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+\frac {\left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )}{x^{n} a +b}-\frac {2 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1+\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n}}{b}+\frac {c_3 \left (x^{n} a +b \right )^{\frac {1}{n}} a \,x^{n} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )}{x \left (x^{n} a +b \right )}-\frac {c_3 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [2, 1+\frac {1}{n}\right ], \left [\frac {n -1}{n}+1\right ], -\frac {a \,x^{n}}{b}\right ) a \,x^{n} n}{\left (n -1\right ) b x}\right ) \left (x^{n} a +b \right )}{b \left (x \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [\frac {2}{n}\right ], \left [\right ], -\frac {a \,x^{n}}{b}\right )+c_3 \left (x^{n} a +b \right )^{\frac {1}{n}} \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right )\right )}
\]
Simplifying the above gives
\begin{align*}
y &= \frac {\left (a n c_3 \left (a \,x^{-1+2 n}+b \,x^{n -1}\right ) \operatorname {hypergeom}\left (\left [2, \frac {n +1}{n}\right ], \left [\frac {-1+2 n}{n}\right ], -\frac {a \,x^{n}}{b}\right )-b \left (n -1\right ) \left (a \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right ) c_3 \,x^{n -1}+b \left (\frac {x^{n} a +b}{b}\right )^{-\frac {2}{n}}\right )\right ) \left (\frac {x^{n} a +b}{b}\right )^{\frac {2}{n}}}{\left (n -1\right ) \left (\operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right ) c_3 \left (\frac {x^{n} a +b}{b}\right )^{\frac {2}{n}}+x \right ) b^{2}} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {\left (a n c_3 \left (a \,x^{-1+2 n}+b \,x^{n -1}\right ) \operatorname {hypergeom}\left (\left [2, \frac {n +1}{n}\right ], \left [\frac {-1+2 n}{n}\right ], -\frac {a \,x^{n}}{b}\right )-b \left (n -1\right ) \left (a \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right ) c_3 \,x^{n -1}+b \left (\frac {x^{n} a +b}{b}\right )^{-\frac {2}{n}}\right )\right ) \left (\frac {x^{n} a +b}{b}\right )^{\frac {2}{n}}}{\left (n -1\right ) \left (\operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {n -1}{n}\right ], -\frac {a \,x^{n}}{b}\right ) c_3 \left (\frac {x^{n} a +b}{b}\right )^{\frac {2}{n}}+x \right ) b^{2}} \\
\end{align*}
2.2.20.2 Solved using first_order_ode_riccati_by_guessing_particular_solution
0.148 (sec)
Entering first order ode riccati guess solver
\begin{align*}
\left (x^{n} a +b \right ) y^{\prime }&=b y^{2}+a \,x^{n -2} \\
\end{align*}
This is a Riccati ODE. Comparing the above ODE to
solve with the Riccati standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \begin{align*} f_0(x) & =\frac {a \,x^{n}}{\left (x^{n} a +b \right ) x^{2}}\\ f_1(x) & =0\\ f_2(x) &=\frac {b}{x^{n} a +b} \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = -\frac {1}{x}
\]
Since a particular solution is
known, then the general solution is given by \begin{align*} y &= y_p + \frac { \phi (x) }{ c_1 - \int { \phi (x) f_2 \,dx} } \end{align*}
Where
\begin{align*} \phi (x) &= e^{ \int 2 f_2 y_p + f_1 \,dx } \end{align*}
Evaluating the above gives the general solution as
\[
y = -\frac {1}{x}+\frac {{\mathrm e}^{\frac {2 \ln \left (x^{n} a +b \right )}{n}-\frac {2 \ln \left (x^{n}\right )}{n}}}{c_1 -\int \frac {{\mathrm e}^{\frac {2 \ln \left (x^{n} a +b \right )}{n}-\frac {2 \ln \left (x^{n}\right )}{n}} b}{x^{n} a +b}d x}
\]
Summary of solutions found
\begin{align*}
y &= -\frac {1}{x}+\frac {{\mathrm e}^{\frac {2 \ln \left (x^{n} a +b \right )}{n}-\frac {2 \ln \left (x^{n}\right )}{n}}}{c_1 -\int \frac {{\mathrm e}^{\frac {2 \ln \left (x^{n} a +b \right )}{n}-\frac {2 \ln \left (x^{n}\right )}{n}} b}{x^{n} a +b}d x} \\
\end{align*}
2.2.20.3 ✓ Maple. Time used: 0.003 (sec). Leaf size: 224
ode:=(a*x^n+b)*diff(y(x),x) = b*y(x)^2+a*x^(-2+n);
dsolve(ode,y(x), singsol=all);
\[
y = \frac {\left (\frac {a \,x^{n}+b}{b}\right )^{\frac {2}{n}} \left (a n c_1 \left (a^{2} x^{3 n}+2 b a \,x^{2 n}+b^{2} x^{n}\right ) \operatorname {hypergeom}\left (\left [2, \frac {1+n}{n}\right ], \left [\frac {-1+2 n}{n}\right ], -\frac {a \,x^{n}}{b}\right )-\left (a c_1 \left (a \,x^{2 n}+x^{n} b \right ) \operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {-1+n}{n}\right ], -\frac {a \,x^{n}}{b}\right )+\left (\frac {a \,x^{n}+b}{b}\right )^{-\frac {2}{n}} b \left (x^{1+n} a +x b \right )\right ) \left (-1+n \right ) b \right )}{b^{2} \left (-1+n \right ) x \left (a \,x^{n}+b \right ) \left (x +\operatorname {hypergeom}\left (\left [1, \frac {1}{n}\right ], \left [\frac {-1+n}{n}\right ], -\frac {a \,x^{n}}{b}\right ) c_1 \left (\frac {a \,x^{n}+b}{b}\right )^{\frac {2}{n}}\right )}
\]
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/(a*x^n+b)*a*x^n*n
/x*diff(y(x),x)-1/(a*x^n+b)^2*b*a*x^(n-2)*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
A Liouvillian solution exists
Reducible group (found an exponential solution)
Group is reducible, not completely reducible
Solution has integrals. Trying a special function solution free of \
integrals...
-> 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
-> Trying to convert hypergeometric functions to elementary form\
...
<- elementary form could result into a too large expression - re\
turning special function form of solution, free of uncomputed integrals
<- Kovacics algorithm successful
<- Equivalence, under non-integer power transformations successful
<- Riccati to 2nd Order successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a \,x^{13226}+b \right ) \left (\frac {d}{d x}y \left (x \right )\right )=b y \left (x \right )^{2}+a \,x^{13224} \\ \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 {b y \left (x \right )^{2}+a \,x^{13224}}{a \,x^{13226}+b} \end {array} \]
2.2.20.4 ✓ Mathematica. Time used: 1.201 (sec). Leaf size: 289
ode=(a*x^n+b)*D[y[x],x]==b*y[x]^2+a*x^(n-2);
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \frac {-b^2 (-1)^{\frac {1}{n}} (n-1) \left (-\frac {a x^n}{b}\right )^{\frac {1}{n}}-a b c_1 (n-1) x^n \left (\frac {a x^n}{b}+1\right )^{2/n} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},\frac {n-1}{n},-\frac {a x^n}{b}\right )+a c_1 n x^n \left (a x^n+b\right ) \left (\frac {a x^n}{b}+1\right )^{2/n} \operatorname {Hypergeometric2F1}\left (2,1+\frac {1}{n},2-\frac {1}{n},-\frac {a x^n}{b}\right )}{b^2 (n-1) x \left ((-1)^{\frac {1}{n}} \left (-\frac {a x^n}{b}\right )^{\frac {1}{n}}+c_1 \left (\frac {a x^n}{b}+1\right )^{2/n} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},\frac {n-1}{n},-\frac {a x^n}{b}\right )\right )}\\ y(x)&\to \frac {a x^{n-1} \left (\frac {n \left (a x^n+b\right ) \operatorname {Hypergeometric2F1}\left (2,1+\frac {1}{n},2-\frac {1}{n},-\frac {a x^n}{b}\right )}{\operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},\frac {n-1}{n},-\frac {a x^n}{b}\right )}+b (-n)+b\right )}{b^2 (n-1)} \end{align*}
2.2.20.5 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
n = symbols("n")
y = Function("y")
ode = Eq(-a*x**(n - 2) - b*y(x)**2 + (a*x**n + b)*Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**(n - 2) + b*y(x)**2)/(a*x**n + b) ca
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0
classify_ode(ode,func=y(x))
('factorable', '1st_power_series', 'lie_group')