2.4.15 Problem 36
Internal
problem
ID
[13315]
Book
:
Handbook
of
exact
solutions
for
ordinary
differential
equations.
By
Polyanin
and
Zaitsev.
Second
edition
Section
:
Chapter
1,
section
1.2.
Riccati
Equation.
subsection
1.2.3-2.
Equations
with
power
and
exponential
functions
Problem
number
:
36
Date
solved
:
Wednesday, December 31, 2025 at 01:14:04 PM
CAS
classification
:
[_Riccati]
2.4.15.1 Solved using first_order_ode_riccati
17.483 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime } x&=a \,x^{2 n} {\mathrm e}^{\lambda x} y^{2}+\left ({\mathrm e}^{\lambda x} x^{n} b -n \right ) y+{\mathrm e}^{\lambda x} c \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {a \,x^{2 n} {\mathrm e}^{\lambda x} y^{2}+x^{n} {\mathrm e}^{\lambda x} b y+{\mathrm e}^{\lambda x} c -n y}{x} \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)=\frac {{\mathrm e}^{\lambda x} c}{x}\), \(f_1(x)=\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\) and \(f_2(x)=\frac {x^{2 n} {\mathrm e}^{\lambda x} a}{x}\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u a \,x^{2 n} {\mathrm e}^{\lambda x}}{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 {{\mathrm e}^{\lambda x} a \,x^{2 n}}{x^{2}}+\frac {2 a \,x^{2 n} {\mathrm e}^{\lambda x} n}{x^{2}}+\frac {a \,x^{2 n} \lambda \,{\mathrm e}^{\lambda x}}{x}\\ f_1 f_2 &=\frac {\left (\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right ) a \,x^{2 n} {\mathrm e}^{\lambda x}}{x}\\ f_2^2 f_0 &=\frac {a^{2} x^{4 n} {\mathrm e}^{3 \lambda x} c}{x^{3}} \end{align*}
Substituting the above terms back in equation (2) gives
\[
\frac {a \,x^{2 n} {\mathrm e}^{\lambda x} u^{\prime \prime }\left (x \right )}{x}-\left (-\frac {{\mathrm e}^{\lambda x} a \,x^{2 n}}{x^{2}}+\frac {2 a \,x^{2 n} {\mathrm e}^{\lambda x} n}{x^{2}}+\frac {a \,x^{2 n} \lambda \,{\mathrm e}^{\lambda x}}{x}+\frac {\left (\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right ) a \,x^{2 n} {\mathrm e}^{\lambda x}}{x}\right ) u^{\prime }\left (x \right )+\frac {a^{2} x^{4 n} {\mathrm e}^{3 \lambda x} 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 ) = {\mathrm e}^{\int \frac {\left (b^{2}+\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (\Gamma \left (n , -\lambda x \right ) x^{n} b \left (-\lambda x \right )^{-n}-\Gamma \left (n \right ) x^{n} b \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}\right ) x^{n -1} {\mathrm e}^{\lambda x}}{2 b}d x} c_2
\end{equation}
Taking derivative gives \begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {\left (b^{2}+\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (\Gamma \left (n , -\lambda x \right ) x^{n} b \left (-\lambda x \right )^{-n}-\Gamma \left (n \right ) x^{n} b \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}\right ) x^{n -1} {\mathrm e}^{\lambda x} {\mathrm e}^{\int \frac {\left (b^{2}+\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (\Gamma \left (n , -\lambda x \right ) x^{n} b \left (-\lambda x \right )^{-n}-\Gamma \left (n \right ) x^{n} b \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}\right ) x^{n -1} {\mathrm e}^{\lambda x}}{2 b}d x} c_2}{2 b}
\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} {\mathrm e}^{\lambda x}}{x}} \\
y &= -\frac {\left (b^{2}+\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (\Gamma \left (n , -\lambda x \right ) x^{n} b \left (-\lambda x \right )^{-n}-\Gamma \left (n \right ) x^{n} b \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}\right ) x^{n -1} x \,x^{-2 n}}{2 b a} \\
\end{align*}
Simplifying the above gives \begin{align*}
y &= -\frac {x^{-n} \left (\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (b \,x^{n} \left (\Gamma \left (n , -\lambda x \right )-\Gamma \left (n \right )\right ) \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}+b^{2}\right )}{2 a b} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -\frac {x^{-n} \left (\tan \left (\frac {\sqrt {4 a \,b^{2} c -b^{4}}\, \left (b \,x^{n} \left (\Gamma \left (n , -\lambda x \right )-\Gamma \left (n \right )\right ) \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 a \,b^{2} c -b^{4}}+b^{2}\right )}{2 a b} \\
\end{align*}
2.4.15.2 Solved using first_order_ode_riccati_by_guessing_particular_solution
1.728 (sec)
Entering first order ode riccati guess solver
\begin{align*}
y^{\prime } x&=a \,x^{2 n} {\mathrm e}^{\lambda x} y^{2}+\left ({\mathrm e}^{\lambda x} x^{n} b -n \right ) y+{\mathrm e}^{\lambda x} 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 {{\mathrm e}^{\lambda x} c}{x}\\ f_1(x) & =\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\\ f_2(x) &=\frac {x^{2 n} {\mathrm e}^{\lambda x} 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 (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n}}{2 a}+\frac {{\mathrm e}^{\int \left (\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n} x^{2 n} {\mathrm e}^{\lambda x}}{x}+\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right )d x}}{c_1 -\int \frac {{\mathrm e}^{\int \left (\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n} x^{2 n} {\mathrm e}^{\lambda x}}{x}+\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right )d x} a \,x^{2 n} {\mathrm e}^{\lambda x}}{x}d x}
\]
Summary of solutions found
\begin{align*}
y &= \frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n}}{2 a}+\frac {{\mathrm e}^{\int \left (\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n} x^{2 n} {\mathrm e}^{\lambda x}}{x}+\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right )d x}}{c_1 -\int \frac {{\mathrm e}^{\int \left (\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{-n} x^{2 n} {\mathrm e}^{\lambda x}}{x}+\frac {b \,x^{n} {\mathrm e}^{\lambda x}}{x}-\frac {n}{x}\right )d x} a \,x^{2 n} {\mathrm e}^{\lambda x}}{x}d x} \\
\end{align*}
2.4.15.3 ✓ Maple. Time used: 0.009 (sec). Leaf size: 86
ode:=x*diff(y(x),x) = a*x^(2*n)*exp(lambda*x)*y(x)^2+(b*x^n*exp(lambda*x)-n)*y(x)+c*exp(lambda*x);
dsolve(ode,y(x), singsol=all);
\[
y = -\frac {\left (\tan \left (\frac {\sqrt {4 b^{2} a c -b^{4}}\, \left (b \,x^{n} \left (\Gamma \left (n , -\lambda x \right )-\Gamma \left (n \right )\right ) \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\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^{26630} {\mathrm e}^{\lambda x} y \left (x \right )^{2}+\left (b \,x^{13315} {\mathrm e}^{\lambda x}-13315\right ) y \left (x \right )+c \,{\mathrm e}^{\lambda x} \\ \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^{26630} {\mathrm e}^{\lambda x} y \left (x \right )^{2}+\left (b \,x^{13315} {\mathrm e}^{\lambda x}-13315\right ) y \left (x \right )+c \,{\mathrm e}^{\lambda x}}{x} \end {array} \]
2.4.15.4 ✓ Mathematica. Time used: 1.315 (sec). Leaf size: 87
ode=x*D[y[x],x]==a*x^(2*n)*Exp[\[Lambda]*x]*y[x]^2+(b*x^n*Exp[\[Lambda]*x]-n)*y[x]+c*Exp[\[Lambda]*x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\[
\text {Solve}\left [\int _1^{\sqrt {\frac {a x^{2 n}}{c}} y(x)}\frac {1}{K[1]^2-\sqrt {\frac {b^2}{a c}} K[1]+1}dK[1]=-c (\lambda (-x))^{-n} \sqrt {\frac {a x^{2 n}}{c}} \Gamma (n,-x \lambda )+c_1,y(x)\right ]
\]
2.4.15.5 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
lambda_ = symbols("lambda_")
n = symbols("n")
y = Function("y")
ode = Eq(-a*x**(2*n)*y(x)**2*exp(lambda_*x) - c*exp(lambda_*x) + x*Derivative(y(x), x) - (b*x**n*exp(lambda_*x) - 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*exp(lambda_*x) + b*x**n*y(x)*exp(lambda_*x) + c*exp(lambda_*x) - n*y(x))/x cannot be solved by the factorable group method