2.2.5 Problem 5
Internal
problem
ID
[13211]
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
:
5
Date
solved
:
Wednesday, December 31, 2025 at 12:03:06 PM
CAS
classification
:
[_Riccati]
2.2.5.1 Solved using first_order_ode_riccati_by_guessing_particular_solution
26.707 (sec)
Entering first order ode riccati guess solver
\begin{align*}
y^{\prime }&=y^{2}+a n \,x^{n -1}-a^{2} x^{2 n} \\
\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 n \,x^{n}}{x}-a^{2} x^{2 n}\\ f_1(x) & =0\\ f_2(x) &=1 \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = x^{n} 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 = x^{n} a +\frac {{\mathrm e}^{\int 2 x^{n} a d x}}{c_1 -\int {\mathrm e}^{\int 2 x^{n} a d x}d x}
\]
Summary of solutions found
\begin{align*}
y &= x^{n} a +\frac {{\mathrm e}^{\int 2 x^{n} a d x}}{c_1 -\int {\mathrm e}^{\int 2 x^{n} a d x}d x} \\
\end{align*}
2.2.5.2 ✓ Maple. Time used: 0.002 (sec). Leaf size: 366
ode:=diff(y(x),x) = y(x)^2+a*n*x^(n-1)-a^2*x^(2*n);
dsolve(ode,y(x), singsol=all);
\[
y = \frac {-3 \left (n +2\right ) c_1 \left (\left (\frac {1}{3} n^{2}+n +\frac {2}{3}\right ) x^{-\frac {3 n}{2}}+a x \,x^{-\frac {n}{2}} \left (n +\frac {4}{3}\right )\right ) \operatorname {WhittakerM}\left (\frac {n +2}{2 n +2}, \frac {3+2 n}{2 n +2}, -\frac {2 a \,x^{n} x}{n +1}\right )+2 \left (\left (-\frac {1}{2} n^{2}-\frac {3}{2} n -1\right ) x^{-\frac {3 n}{2}}+a x \left (\left (-\frac {n}{2}-1\right ) x^{-\frac {n}{2}}+a x \,x^{\frac {n}{2}}\right )\right ) \left (n +1\right ) c_1 \operatorname {WhittakerM}\left (-\frac {n}{2 n +2}, \frac {3+2 n}{2 n +2}, -\frac {2 a \,x^{n} x}{n +1}\right )+2 \left (n +\frac {3}{2}\right ) \left (n +2\right )^{2} {\mathrm e}^{\frac {a \,x^{n} x}{n +1}} c_1 \,x^{-\frac {3 n}{2}} \left (-\frac {2 a \,x^{n} x}{n +1}\right )^{\frac {4+3 n}{2 n +2}}+2 a \,x^{n} x^{2} {\mathrm e}^{-\frac {a \,x^{n} x}{n +1}}}{2 x \left (-\frac {x^{-\frac {3 n}{2}} c_1 \left (n +2\right )^{2} \operatorname {WhittakerM}\left (\frac {n +2}{2 n +2}, \frac {3+2 n}{2 n +2}, -\frac {2 a \,x^{n} x}{n +1}\right )}{2}+\left (\left (-\frac {n}{2}-1\right ) x^{-\frac {3 n}{2}}+x^{-\frac {n}{2}} a x \right ) \left (n +1\right ) c_1 \operatorname {WhittakerM}\left (-\frac {n}{2 n +2}, \frac {3+2 n}{2 n +2}, -\frac {2 a \,x^{n} x}{n +1}\right )+{\mathrm e}^{-\frac {a \,x^{n} x}{n +1}} x \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 Special
trying Riccati sub-methods:
trying Riccati_symmetries
trying Riccati to 2nd Order
-> Calling odsolve with the ODE, diff(diff(y(x),x),x) = (-a*n*x^(n-1)+a^2*x^
(2*n))*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
<- Kovacics algorithm successful
<- Equivalence, under non-integer power transformations successful
<- Riccati to 2nd Order successful
2.2.5.3 ✓ Mathematica. Time used: 0.686 (sec). Leaf size: 227
ode=D[y[x],x]==y[x]^2+a*n*x^(n-1)-a^2*x^(2*n);
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \frac {2^{\frac {1}{n+1}} (n+1) \left (-\frac {a x^{n+1}}{n+1}\right )^{\frac {1}{n+1}} \left (a x^n-c_1 e^{\frac {2 a x^{n+1}}{n+1}}\right )-a c_1 x^{n+1} \Gamma \left (\frac {1}{n+1},-\frac {2 a x^{n+1}}{n+1}\right )}{2^{\frac {1}{n+1}} (n+1) \left (-\frac {a x^{n+1}}{n+1}\right )^{\frac {1}{n+1}}-c_1 x \Gamma \left (\frac {1}{n+1},-\frac {2 a x^{n+1}}{n+1}\right )}\\ y(x)&\to \frac {2^{\frac {1}{n+1}} (n+1) e^{\frac {2 a x^{n+1}}{n+1}} \left (-\frac {a x^{n+1}}{n+1}\right )^{\frac {1}{n+1}}}{x \Gamma \left (\frac {1}{n+1},-\frac {2 a x^{n+1}}{n+1}\right )}+a x^n \end{align*}
2.2.5.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
n = symbols("n")
y = Function("y")
ode = Eq(a**2*x**(2*n) - a*n*x**(n - 1) - y(x)**2 + Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE a**2*x**(2*n) - a*n*x**(n - 1) - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method