2.3.19 Problem 20

2.3.19.1 Solved using first_order_ode_riccati_by_guessing_particular_solution
2.3.19.2 Maple
2.3.19.3 Mathematica
2.3.19.4 Sympy

Internal problem ID [13299]
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. Equations Containing Exponential Functions
Problem number : 20
Date solved : Wednesday, December 31, 2025 at 01:03:11 PM
CAS classification : [_Riccati]

2.3.19.1 Solved using first_order_ode_riccati_by_guessing_particular_solution

0.674 (sec)

Entering first order ode riccati guess solver

\begin{align*} \left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right ) y^{\prime }&=y^{2}+k \,{\mathrm e}^{\nu x} y-m^{2}+k m \,{\mathrm e}^{\nu x} \\ \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 {k m \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {m^{2}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\\ f_1(x) & =\frac {k \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\\ f_2(x) &=\frac {1}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c} \end{align*}

Using trial and error, the following particular solution was found

\[ y_p = -m \]
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 = -m +\frac {{\mathrm e}^{\int \left (\frac {k \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {2 m}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\right )d x}}{c_1 -\int \frac {{\mathrm e}^{\int \left (\frac {k \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {2 m}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\right )d x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}d x} \]

Summary of solutions found

\begin{align*} y &= -m +\frac {{\mathrm e}^{\int \left (\frac {k \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {2 m}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\right )d x}}{c_1 -\int \frac {{\mathrm e}^{\int \left (\frac {k \,{\mathrm e}^{\nu x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {2 m}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\right )d x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}d x} \\ \end{align*}
2.3.19.2 Maple. Time used: 0.009 (sec). Leaf size: 130
ode:=(a*exp(lambda*x)+b*exp(mu*x)+c)*diff(y(x),x) = y(x)^2+k*exp(nu*x)*y(x)-m^2+k*m*exp(nu*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -m +\frac {{\mathrm e}^{k \int \frac {{\mathrm e}^{\nu x}}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c}d x -2 m \int \frac {1}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c}d x}}{-\int \frac {{\mathrm e}^{k \int \frac {{\mathrm e}^{\nu x}}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c}d x -2 m \int \frac {1}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c}d x}}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c}d x +c_1} \]

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 case Kamke (b) successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c \right ) \left (\frac {d}{d x}y \left (x \right )\right )=y \left (x \right )^{2}+k \,{\mathrm e}^{\nu x} y \left (x \right )-m^{2}+k m \,{\mathrm e}^{\nu 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 {y \left (x \right )^{2}+k \,{\mathrm e}^{\nu x} y \left (x \right )-m^{2}+k m \,{\mathrm e}^{\nu x}}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c} \end {array} \]
2.3.19.3 Mathematica. Time used: 3.73 (sec). Leaf size: 358
ode=(a*Exp[\[Lambda]*x]+b*Exp[\[Mu]*x]+c)*D[y[x],x]==y[x]^2+k*Exp[\[Nu]*x]*y[x]-m^2+k*m*Exp[\[Nu]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x-\frac {\exp \left (-\int _1^{K[2]}-\frac {e^{\nu K[1]} k-2 m}{e^{\lambda K[1]} a+b e^{\mu K[1]}+c}dK[1]\right ) \left (e^{\nu K[2]} k-m+y(x)\right )}{\left (e^{\lambda K[2]} a+b e^{\mu K[2]}+c\right ) k \nu (m+y(x))}dK[2]+\int _1^{y(x)}\left (\frac {\exp \left (-\int _1^x-\frac {e^{\nu K[1]} k-2 m}{e^{\lambda K[1]} a+b e^{\mu K[1]}+c}dK[1]\right )}{k \nu (m+K[3])^2}-\int _1^x\left (\frac {\exp \left (-\int _1^{K[2]}-\frac {e^{\nu K[1]} k-2 m}{e^{\lambda K[1]} a+b e^{\mu K[1]}+c}dK[1]\right ) \left (e^{\nu K[2]} k-m+K[3]\right )}{\left (e^{\lambda K[2]} a+b e^{\mu K[2]}+c\right ) k \nu (m+K[3])^2}-\frac {\exp \left (-\int _1^{K[2]}-\frac {e^{\nu K[1]} k-2 m}{e^{\lambda K[1]} a+b e^{\mu K[1]}+c}dK[1]\right )}{\left (e^{\lambda K[2]} a+b e^{\mu K[2]}+c\right ) k \nu (m+K[3])}\right )dK[2]\right )dK[3]=c_1,y(x)\right ] \]
2.3.19.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
k = symbols("k") 
lambda_ = symbols("lambda_") 
m = symbols("m") 
mu = symbols("mu") 
nu = symbols("nu") 
y = Function("y") 
ode = Eq(-k*m*exp(nu*x) - k*y(x)*exp(nu*x) + m**2 + (a*exp(lambda_*x) + b*exp(mu*x) + c)*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out