2.3.15 Problem 15

2.3.15.1 Maple
2.3.15.2 Mathematica
2.3.15.3 Sympy

Internal problem ID [13295]
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 : 15
Date solved : Friday, December 19, 2025 at 02:45:06 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a \,{\mathrm e}^{\mu x} y^{2}+a b \,{\mathrm e}^{x \left (\lambda +\mu \right )} y-b \lambda \,{\mathrm e}^{\lambda x} \\ \end{align*}
Entering first order ode riccati solver
\begin{align*} y^{\prime }&=a \,{\mathrm e}^{\mu x} y^{2}+a b \,{\mathrm e}^{x \left (\lambda +\mu \right )} y-b \lambda \,{\mathrm e}^{\lambda x} \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= a \,{\mathrm e}^{\mu x} y^{2}+a b \,{\mathrm e}^{x \left (\lambda +\mu \right )} y -b \lambda \,{\mathrm e}^{\lambda x} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = a \,{\mathrm e}^{\mu x} y^{2}+a b \,{\mathrm e}^{\lambda x} {\mathrm e}^{\mu x} y -b \lambda \,{\mathrm e}^{\lambda x} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=-b \lambda \,{\mathrm e}^{\lambda x}\), \(f_1(x)={\mathrm e}^{x \left (\lambda +\mu \right )} a b\) and \(f_2(x)={\mathrm e}^{\mu x} a\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{{\mathrm e}^{\mu x} a u} \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' &=\mu \,{\mathrm e}^{\mu x} a\\ f_1 f_2 &={\mathrm e}^{x \left (\lambda +\mu \right )} a^{2} b \,{\mathrm e}^{\mu x}\\ f_2^2 f_0 &=-{\mathrm e}^{2 \mu x} a^{2} b \lambda \,{\mathrm e}^{\lambda x} \end{align*}

Substituting the above terms back in equation (2) gives

\[ {\mathrm e}^{\mu x} a u^{\prime \prime }\left (x \right )-\left (\mu \,{\mathrm e}^{\mu x} a +{\mathrm e}^{x \left (\lambda +\mu \right )} a^{2} b \,{\mathrm e}^{\mu x}\right ) u^{\prime }\left (x \right )-{\mathrm e}^{2 \mu x} a^{2} b \lambda \,{\mathrm e}^{\lambda x} u \left (x \right ) = 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 {a b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}+c_2 \left (4 \left (\mu +\frac {\lambda }{2}\right )^{2} {\mathrm e}^{-\frac {\left (3 \lambda +2 \mu \right ) x}{2}} \operatorname {WhittakerM}\left (\frac {\lambda +2 \mu }{2 \lambda +2 \mu }, \frac {3 \mu +2 \lambda }{2 \lambda +2 \mu }, \frac {a b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }\right )+\operatorname {WhittakerM}\left (-\frac {\lambda }{2 \lambda +2 \mu }, \frac {3 \mu +2 \lambda }{2 \lambda +2 \mu }, \frac {a b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }\right ) \left (\left (\lambda +2 \mu \right ) {\mathrm e}^{-\frac {\left (3 \lambda +2 \mu \right ) x}{2}}+{\mathrm e}^{-\frac {\lambda x}{2}} a b \right ) \left (\lambda +\mu \right )\right ) {\mathrm e}^{\frac {{\mathrm e}^{x \left (\lambda +\mu \right )} b a}{2 \lambda +2 \mu }} \end{equation}
Taking derivative gives
\begin{equation} \tag{4} \text {Expression too large to display} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{{\mathrm e}^{\mu x} a u} \\ y &= \text {Expression too large to display} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ \text {Expression too large to display} \]
Simplifying the above gives
\begin{align*} \text {Expression too large to display} \\ \end{align*}
The solution
\[ \text {Expression too large to display} \]
was found not to satisfy the ode or the IC. Hence it is removed.
2.3.15.1 Maple. Time used: 0.002 (sec). Leaf size: 525
ode:=diff(y(x),x) = a*exp(mu*x)*y(x)^2+a*b*exp((lambda+mu)*x)*y(x)-b*lambda*exp(lambda*x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \text {Solution too large to show}\end{align*}

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: 
   trying Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = (b*a*exp(lambda*x+mu 
*x)+mu)*diff(y(x),x)+a*exp(mu*x)*b*lambda*exp(lambda*x)*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 
      -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a \ 
power @ Moebius 
      -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int\ 
(r(x), dx)) * 2F1([a1, a2], [b1], f) 
      -> Trying changes of variables to rationalize or make the ODE simpler 
         trying a quadrature 
         checking if the LODE has constant coefficients 
         checking if the LODE is of Euler type 
         trying a symmetry of the form [xi=0, eta=F(x)] 
         checking if the LODE is missing y 
         -> 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 
         Change of variables used: 
            [x = ln(t)/(lambda+mu)] 
         Linear ODE actually solved: 
            -b*lambda*a*u(t)+(-a*b*lambda*t-a*b*mu*t+lambda^2+lambda*mu)*diff(u\ 
(t),t)+(lambda^2*t+2*lambda*mu*t+mu^2*t)*diff(diff(u(t),t),t) = 0 
      <- change of variables successful 
   <- Riccati to 2nd Order 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}^{\mu x} y \left (x \right )^{2}+a b \,{\mathrm e}^{\left (\lambda +\mu \right ) x} y \left (x \right )-b \lambda \,{\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 )=a \,{\mathrm e}^{\mu x} y \left (x \right )^{2}+a b \,{\mathrm e}^{\left (\lambda +\mu \right ) x} y \left (x \right )-b \lambda \,{\mathrm e}^{\lambda x} \end {array} \]
2.3.15.2 Mathematica. Time used: 3.352 (sec). Leaf size: 902
ode=D[y[x],x]==a*Exp[\[Mu]*x]*y[x]^2+a*b*Exp[(\[Lambda]+\[Mu])*x]*y[x]-b*\[Lambda]*Exp[\[Lambda]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}
2.3.15.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
lambda_ = symbols("lambda_") 
mu = symbols("mu") 
y = Function("y") 
ode = Eq(-a*b*y(x)*exp(x*(lambda_ + mu)) - a*y(x)**2*exp(mu*x) + b*lambda_*exp(lambda_*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*b*y(x)*exp(x*(lambda_ + mu)) - a*y(x)**2*exp(mu*x) + b*lambda_*exp(lambda_*x) + Derivative(y(x), x) cannot be solved by the lie group method