2.2.40 Problem 43
Internal
problem
ID
[13246]
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
:
43
Date
solved
:
Sunday, January 18, 2026 at 06:51:25 PM
CAS
classification
:
[_rational, _Riccati]
2.2.40.1 Solved using first_order_ode_riccati
0.737 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime } x&=x^{2 n} a y^{2}+\left (b \,x^{n}-n \right ) y+c \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {x^{2 n} a y^{2}+x^{n} b y-n y+c}{x} \end{align*}
This is a Riccati ODE. Comparing the ODE to solve
\[
y' = \frac {x^{2 n} a y^{2}}{x}+\frac {x^{n} b y}{x}-\frac {n y}{x}+\frac {c}{x}
\]
With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows
that \(f_0(x)=\frac {c}{x}\), \(f_1(x)=\frac {b \,x^{n}}{x}-\frac {n}{x}\) and \(f_2(x)=\frac {x^{2 n} a}{x}\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u a \,x^{2 n}}{x}} \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 {a \,x^{2 n}}{x^{2}}+\frac {2 a \,x^{2 n} n}{x^{2}}\\ f_1 f_2 &=\frac {\left (\frac {b \,x^{n}}{x}-\frac {n}{x}\right ) a \,x^{2 n}}{x}\\ f_2^2 f_0 &=\frac {a^{2} x^{4 n} c}{x^{3}} \end{align*}
Substituting the above terms back in equation (2) gives
\[
\frac {a \,x^{2 n} u^{\prime \prime }\left (x \right )}{x}-\left (-\frac {a \,x^{2 n}}{x^{2}}+\frac {2 a \,x^{2 n} n}{x^{2}}+\frac {\left (\frac {b \,x^{n}}{x}-\frac {n}{x}\right ) a \,x^{2 n}}{x}\right ) u^{\prime }\left (x \right )+\frac {a^{2} x^{4 n} c u \left (x \right )}{x^{3}} = 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 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+c_2 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )
\end{equation}
Taking derivative gives \begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {c_1 b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_1 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_2 b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_2 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{\frac {u a \,x^{2 n}}{x}} \\
y &= -\frac {\left (\frac {c_1 b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_1 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_2 b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_2 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}\right ) x \,x^{-2 n}}{a \left (c_1 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+c_2 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )\right )} \\
\end{align*}
Doing change of constants, the above solution becomes \[
y = -\frac {\left (\frac {b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_3 b \,x^{n} {\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}+\frac {c_3 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} x^{n} n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\, \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )}{2 x}\right ) x \,x^{-2 n}}{a \left ({\mathrm e}^{\frac {b \,x^{n}}{2 n}} \sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+c_3 \,{\mathrm e}^{\frac {b \,x^{n}}{2 n}} \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )\right )}
\]
Simplifying the above gives
\begin{align*}
y &= -\frac {\left (\left (c_3 b +n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\right ) \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+\sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right ) \left (n c_3 \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}+b \right )\right ) x^{-n}}{2 a \left (\sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+c_3 \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )\right )} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -\frac {\left (\left (c_3 b +n \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}\right ) \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+\sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right ) \left (n c_3 \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}+b \right )\right ) x^{-n}}{2 a \left (\sinh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )+c_3 \cosh \left (\frac {x^{n} \sqrt {\frac {-4 a c +b^{2}}{n^{2}}}}{2}\right )\right )} \\
\end{align*}
2.2.40.2 Solved using first_order_ode_riccati_by_guessing_particular_solution
0.126 (sec)
Entering first order ode riccati guess solver
\begin{align*}
y^{\prime } x&=x^{2 n} a y^{2}+\left (b \,x^{n}-n \right ) y+c \\
\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 {c}{x}\\ f_1(x) & =\frac {b \,x^{n}}{x}-\frac {n}{x}\\ f_2(x) &=\frac {x^{2 n} a}{x} \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = \frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n}}{2 a}
\]
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 {\left (a \left (b +\sqrt {-4 a c +b^{2}}\right ) {\mathrm e}^{\frac {x^{n} \sqrt {-4 a c +b^{2}}}{n}}-4 c_1 \left (a c -\frac {b^{2}}{4}+\frac {b \sqrt {-4 a c +b^{2}}}{4}\right )\right ) x^{-n}}{2 a \left (a \,{\mathrm e}^{\frac {x^{n} \sqrt {-4 a c +b^{2}}}{n}}-c_1 \sqrt {-4 a c +b^{2}}\right )}
\]
Summary of solutions found
\begin{align*}
y &= -\frac {\left (a \left (b +\sqrt {-4 a c +b^{2}}\right ) {\mathrm e}^{\frac {x^{n} \sqrt {-4 a c +b^{2}}}{n}}-4 c_1 \left (a c -\frac {b^{2}}{4}+\frac {b \sqrt {-4 a c +b^{2}}}{4}\right )\right ) x^{-n}}{2 a \left (a \,{\mathrm e}^{\frac {x^{n} \sqrt {-4 a c +b^{2}}}{n}}-c_1 \sqrt {-4 a c +b^{2}}\right )} \\
\end{align*}
2.2.40.3 ✓ Maple. Time used: 0.007 (sec). Leaf size: 72
ode:=x*diff(y(x),x) = x^(2*n)*a*y(x)^2+(b*x^n-n)*y(x)+c;
dsolve(ode,y(x), singsol=all);
\[
y = \frac {\left (\tan \left (\frac {\sqrt {4 b^{2} a c -b^{4}}\, \left (b \,x^{n}+c_1 n \right )}{2 b^{2} n}\right ) \sqrt {4 b^{2} a c -b^{4}}-b^{2}\right ) x^{-n}}{2 a b}
\]
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
<- Chini successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \left (\frac {d}{d x}y \left (x \right )\right )=a \,x^{26492} y \left (x \right )^{2}+\left (b \,x^{13246}-13246\right ) y \left (x \right )+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 )=\frac {a \,x^{26492} y \left (x \right )^{2}+\left (b \,x^{13246}-13246\right ) y \left (x \right )+c}{x} \end {array} \]
2.2.40.4 ✓ Mathematica. Time used: 0.477 (sec). Leaf size: 118
ode=x*D[y[x],x]==a*x^(2*n)*y[x]^2+(b*x^n-n)*y[x]+c;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \frac {x^{-n} \left (-b+\frac {\sqrt {b^2-4 a c} \left (-e^{\frac {x^n \sqrt {b^2-4 a c}}{n}}+c_1\right )}{e^{\frac {x^n \sqrt {b^2-4 a c}}{n}}+c_1}\right )}{2 a}\\ y(x)&\to \frac {x^{-n} \left (\sqrt {b^2-4 a c}-b\right )}{2 a} \end{align*}
2.2.40.5 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
n = symbols("n")
y = Function("y")
ode = Eq(-a*x**(2*n)*y(x)**2 - c + x*Derivative(y(x), x) - (b*x**n - n)*y(x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**(2*n)*y(x)**2 + b*x**n*y(x) + c - n*
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', 'lie_group')