2.4.13 Problem 34
Internal
problem
ID
[13313]
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
:
34
Date
solved
:
Sunday, January 18, 2026 at 07:13:25 PM
CAS
classification
:
[[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]
2.4.13.1 Solved using first_order_ode_riccati
0.750 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime }&=a \,{\mathrm e}^{\lambda x} \left (y-b \,x^{n}-c \right )^{2}+b n \,x^{n -1} \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c -2 a b \,x^{n} {\mathrm e}^{\lambda x} y+{\mathrm e}^{\lambda x} a \,c^{2}-2 \,{\mathrm e}^{\lambda x} y a c +a \,{\mathrm e}^{\lambda x} y^{2}+b n \,x^{n -1} \end{align*}
This is a Riccati ODE. Comparing the ODE to solve
\[
y' = a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c -2 a b \,x^{n} {\mathrm e}^{\lambda x} y+{\mathrm e}^{\lambda x} a \,c^{2}-2 \,{\mathrm e}^{\lambda x} y a c +a \,{\mathrm e}^{\lambda x} y^{2}+\frac {b \,x^{n} n}{x}
\]
With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows
that \(f_0(x)=a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c +{\mathrm e}^{\lambda x} a \,c^{2}+\frac {b \,x^{n} n}{x}\), \(f_1(x)=-2 x^{n} {\mathrm e}^{\lambda x} a b -2 \,{\mathrm e}^{\lambda x} a c\) and \(f_2(x)={\mathrm e}^{\lambda x} a\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \,{\mathrm e}^{\lambda x} a} \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' &=a \lambda \,{\mathrm e}^{\lambda x}\\ f_1 f_2 &=\left (-2 x^{n} {\mathrm e}^{\lambda x} a b -2 \,{\mathrm e}^{\lambda x} a c \right ) {\mathrm e}^{\lambda x} a\\ f_2^2 f_0 &={\mathrm e}^{2 \lambda x} a^{2} \left (a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c +{\mathrm e}^{\lambda x} a \,c^{2}+\frac {b \,x^{n} n}{x}\right ) \end{align*}
Substituting the above terms back in equation (2) gives
\[
{\mathrm e}^{\lambda x} a u^{\prime \prime }\left (x \right )-\left (a \lambda \,{\mathrm e}^{\lambda x}+\left (-2 x^{n} {\mathrm e}^{\lambda x} a b -2 \,{\mathrm e}^{\lambda x} a c \right ) {\mathrm e}^{\lambda x} a \right ) u^{\prime }\left (x \right )+{\mathrm e}^{2 \lambda x} a^{2} \left (a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c +{\mathrm e}^{\lambda x} a \,c^{2}+\frac {b \,x^{n} n}{x}\right ) u \left (x \right ) = 0
\]
Entering second order change of variable
on \(y\) method 1 solverIn normal form the given ode is written as \begin{align*} \frac {d^{2}u}{d x^{2}}+p \left (x \right ) \left (\frac {d u}{d x}\right )+q \left (x \right ) u&=0 \tag {2} \end{align*}
Where
\begin{align*} p \left (x \right )&=2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \\ q \left (x \right )&=\left (b n \,x^{n -1}+a \,{\mathrm e}^{\lambda x} \left (b^{2} x^{2 n}+2 c \,x^{n} b +c^{2}\right )\right ) {\mathrm e}^{2 \lambda x} a \,{\mathrm e}^{-\lambda x} \end{align*}
Calculating the Liouville ode invariant \(Q\) given by
\begin{align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= \left (b n \,x^{n -1}+a \,{\mathrm e}^{\lambda x} \left (b^{2} x^{2 n}+2 c \,x^{n} b +c^{2}\right )\right ) {\mathrm e}^{2 \lambda x} a \,{\mathrm e}^{-\lambda x} - \frac {\left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )'}{2}- \frac {\left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )^2}{4} \\ &= \left (b n \,x^{n -1}+a \,{\mathrm e}^{\lambda x} \left (b^{2} x^{2 n}+2 c \,x^{n} b +c^{2}\right )\right ) {\mathrm e}^{2 \lambda x} a \,{\mathrm e}^{-\lambda x} - \frac {\left (\frac {2 \,{\mathrm e}^{\lambda x} a b \,x^{n} n}{x}+2 a \left (b \,x^{n}+c \right ) \lambda \,{\mathrm e}^{\lambda x}\right )}{2}- \frac {\left ({\left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )}^{2}\right )}{4} \\ &= \left (b n \,x^{n -1}+a \,{\mathrm e}^{\lambda x} \left (b^{2} x^{2 n}+2 c \,x^{n} b +c^{2}\right )\right ) {\mathrm e}^{2 \lambda x} a \,{\mathrm e}^{-\lambda x} - \left (\frac {{\mathrm e}^{\lambda x} a b \,x^{n} n}{x}+a \left (b \,x^{n}+c \right ) \lambda \,{\mathrm e}^{\lambda x}\right )-\frac {{\left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )}^{2}}{4}\\ &= -\frac {\lambda ^{2}}{4} \end{align*}
Since the Liouville ode invariant does not depend on the independent variable \(x\) then the
transformation
\begin{align*} u = v \left (x \right ) z \left (x \right )\tag {3} \end{align*}
is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given by
\begin{align*} z \left (x \right )&={\mathrm e}^{-\int \frac {p \left (x \right )}{2}d x}\\ &= e^{-\int \frac {2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda }{2} }\\ &= {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}\tag {5} \end{align*}
Hence (3) becomes
\begin{align*} u = v \left (x \right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}\tag {4} \end{align*}
Applying this change of variable to the original ode results in
\begin{align*} {\mathrm e}^{\lambda x -\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}} a \left (\frac {d^{2}}{d x^{2}}v \left (x \right )-\frac {v \left (x \right ) \lambda ^{2}}{4}\right ) = 0 \end{align*}
Which is now solved for \(v \left (x \right )\).
The above ode simplifies to
\begin{align*} \frac {a \left (-v \left (x \right ) \lambda ^{2}+4 \frac {d^{2}}{d x^{2}}v \left (x \right )\right )}{4} = 0 \end{align*}
Entering second order linear constant coefficient ode solver
This is second order with constant coefficients homogeneous ODE. In standard form the ODE is
\[ A v''(x) + B v'(x) + C v(x) = 0 \]
Where in the above \(A=a, B=0, C=-\frac {a \,\lambda ^{2}}{4}\). Let the solution be \(v \left (x \right )=e^{\lambda x}\). Substituting this into the ODE gives \[ a \,\lambda ^{2} {\mathrm e}^{x \lambda }-\frac {a \,\lambda ^{2} {\mathrm e}^{x \lambda }}{4} = 0 \tag {1} \]
Since
exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\) gives \[ a \,\lambda ^{2}-\frac {1}{4} a \,\lambda ^{2} = 0 \tag {2} \]
Equation (2)
is the characteristic equation of the ODE. Its roots determine the general solution
form. Using the quadratic formula the roots are \[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]
Substituting \(A=a, B=0, C=-\frac {a \,\lambda ^{2}}{4}\) into the above gives
\begin{align*} \lambda _{1,2} &= \frac {0}{(2) \left (a\right )} \pm \frac {1}{(2) \left (a\right )} \sqrt {0^2 - (4) \left (a\right )\left (-\frac {a \,\lambda ^{2}}{4}\right )}\\ &= \pm \frac {\sqrt {a^{2} \lambda ^{2}}}{2 a} \end{align*}
Hence
\begin{align*}
\lambda _1 &= + \frac {\sqrt {a^{2} \lambda ^{2}}}{2 a} \\
\lambda _2 &= - \frac {\sqrt {a^{2} \lambda ^{2}}}{2 a} \\
\end{align*}
Which simplifies to \begin{align*}
\lambda _1 &= \frac {\sqrt {a^{2} \lambda ^{2}}}{2 a} \\
\lambda _2 &= -\frac {\sqrt {a^{2} \lambda ^{2}}}{2 a} \\
\end{align*}
Since the roots are distinct, the solution is \begin{align*}
v \left (x \right ) &= c_1 e^{\lambda _1 x} + c_2 e^{\lambda _2 x} \\
v \left (x \right ) &= c_1 e^{\left (\frac {\sqrt {a^{2} \lambda ^{2}}}{2 a}\right )x} +c_2 e^{\left (-\frac {\sqrt {a^{2} \lambda ^{2}}}{2 a}\right )x} \\
\end{align*}
Or \[
v \left (x \right ) =c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}
\]
Now that \(v \left (x \right )\) is known,
then \begin{align*} u&= v \left (x \right ) z \left (x \right )\\ &= \left (c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) \left (z \left (x \right )\right )\tag {7} \end{align*}
But from (5)
\begin{align*} z \left (x \right )&= {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}} \end{align*}
Hence (7) becomes
\begin{align*} u = \left (c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}} \end{align*}
Taking derivative gives
\begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \left (\frac {c_1 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}-\frac {c_2 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}+\left (c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) \left (-a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}+\frac {\lambda }{2}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u \,{\mathrm e}^{\lambda x} a} \\
y &= -\frac {\left (\left (\frac {c_1 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}-\frac {c_2 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}+\left (c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) \left (-a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}+\frac {\lambda }{2}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}\right ) {\mathrm e}^{-\lambda x} {\mathrm e}^{\int \left (a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\frac {\lambda }{2}\right )d x}}{a \left (c_1 \,{\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right )} \\
\end{align*}
Doing change of
constants, the above solution becomes \[
y = -\frac {\left (\left (\frac {\sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}-\frac {c_3 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}+\left ({\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) \left (-a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}+\frac {\lambda }{2}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}\right ) {\mathrm e}^{-\lambda x} {\mathrm e}^{\int \left (a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\frac {\lambda }{2}\right )d x}}{a \left ({\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right )}
\]
Summary of solutions found
\begin{align*}
y &= -\frac {\left (\left (\frac {\sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}-\frac {c_3 \sqrt {a^{2} \lambda ^{2}}\, {\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}}{2 a}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}+\left ({\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right ) \left (-a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}+\frac {\lambda }{2}\right ) {\mathrm e}^{-\frac {\int \left (2 a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\lambda \right )d x}{2}}\right ) {\mathrm e}^{-\lambda x} {\mathrm e}^{\int \left (a \left (b \,x^{n}+c \right ) {\mathrm e}^{\lambda x}-\frac {\lambda }{2}\right )d x}}{a \left ({\mathrm e}^{\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {a^{2} \lambda ^{2}}\, x}{2 a}}\right )} \\
\end{align*}
2.4.13.2 Solved using first_order_ode_riccati_by_guessing_particular_solution
0.125 (sec)
Entering first order ode riccati guess solver
\begin{align*}
y^{\prime }&=a \,{\mathrm e}^{\lambda x} \left (y-b \,x^{n}-c \right )^{2}+b n \,x^{n -1} \\
\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) & =a \,b^{2} {\mathrm e}^{\lambda x} x^{2 n}+2 \,{\mathrm e}^{\lambda x} x^{n} a b c +{\mathrm e}^{\lambda x} a \,c^{2}+\frac {b \,x^{n} n}{x}\\ f_1(x) & =-2 x^{n} {\mathrm e}^{\lambda x} a b -2 \,{\mathrm e}^{\lambda x} a c\\ f_2(x) &={\mathrm e}^{\lambda x} a \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = \left (b \,{\mathrm e}^{n \ln \left (x \right )}+c \right ) {\mathrm e}^{-\frac {\ln \left (x \right ) b n \,{\mathrm e}^{n \ln \left (x \right )}}{b \,{\mathrm e}^{n \ln \left (x \right )}+c}} x^{\frac {b n \,{\mathrm e}^{n \ln \left (x \right )}}{b \,{\mathrm e}^{n \ln \left (x \right )}+c}}
\]
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 = b \,x^{n}+c -\frac {\lambda }{{\mathrm e}^{\lambda x} a -c_1 \lambda }
\]
Summary of solutions found
\begin{align*}
y &= b \,x^{n}+c -\frac {\lambda }{{\mathrm e}^{\lambda x} a -c_1 \lambda } \\
\end{align*}
2.4.13.3 ✓ Maple. Time used: 0.002 (sec). Leaf size: 38
ode:=diff(y(x),x) = a*exp(lambda*x)*(y(x)-b*x^n-c)^2+b*n*x^(n-1);
dsolve(ode,y(x), singsol=all);
\[
y = \frac {{\mathrm e}^{-\lambda x} \lambda \left (-1+\frac {1}{c_1 \lambda \,{\mathrm e}^{\lambda x}+1}\right )+a \left (b \,x^{n}+c \right )}{a}
\]
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:
<- Riccati particular polynomial solution successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=a \,{\mathrm e}^{\lambda x} \left (y \left (x \right )-b \,x^{13313}-c \right )^{2}+13313 b \,x^{13312} \\ \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 )=a \,{\mathrm e}^{\lambda x} \left (y \left (x \right )-b \,x^{13313}-c \right )^{2}+13313 b \,x^{13312} \end {array} \]
2.4.13.4 ✓ Mathematica. Time used: 1.262 (sec). Leaf size: 40
ode=D[y[x],x]==a*Exp[\[Lambda]*x]*(y[x]-b*x^n-c)^2+b*n*x^(n-1);
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \frac {\lambda }{-a e^{\lambda x}+c_1 \lambda }+b x^n+c\\ y(x)&\to b x^n+c \end{align*}
2.4.13.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*(-b*x**n - c + y(x))**2*exp(lambda_*x) - b*n*x**(n - 1) + Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
Timed Out
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0