2.5.4 Problem 4

2.5.4.1 Solved using first_order_ode_riccati
2.5.4.2 Maple
2.5.4.3 Mathematica
2.5.4.4 Sympy

Internal problem ID [13323]
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.4-1. Equations with hyperbolic sine and cosine
Problem number : 4
Date solved : Sunday, January 18, 2026 at 07:15:48 PM
CAS classification : [_Riccati]

2.5.4.1 Solved using first_order_ode_riccati

3.832 (sec)

Entering first order ode riccati solver

\begin{align*} y^{\prime }&=\lambda \sinh \left (\lambda x \right ) y^{2}-\lambda \sinh \left (\lambda x \right )^{3} \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= \lambda \sinh \left (\lambda x \right ) y^{2}-\lambda \sinh \left (\lambda x \right )^{3} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

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

Substituting the above terms back in equation (2) gives

\[ \lambda \sinh \left (\lambda x \right ) u^{\prime \prime }\left (x \right )-\lambda ^{2} \cosh \left (\lambda x \right ) u^{\prime }\left (x \right )-\lambda ^{3} \sinh \left (\lambda x \right )^{5} 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 {\cosh \left (\lambda x \right )^{2}}{2}}+c_2 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right ) \end{equation}
Taking derivative gives
\begin{equation} \tag{4} u^{\prime }\left (x \right ) = -c_1 \cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}}-c_2 \cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )+\frac {2 c_2 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} {\mathrm e}^{\cosh \left (\lambda x \right )^{2}} \lambda \sinh \left (\lambda x \right )}{\sqrt {\pi }} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u \lambda \sinh \left (\lambda x \right )} \\ y &= -\frac {-c_1 \cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}}-c_2 \cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )+\frac {2 c_2 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} {\mathrm e}^{\cosh \left (\lambda x \right )^{2}} \lambda \sinh \left (\lambda x \right )}{\sqrt {\pi }}}{\lambda \sinh \left (\lambda x \right ) \left (c_1 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}}+c_2 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = -\frac {-\cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}}-c_3 \cosh \left (\lambda x \right ) \lambda \sinh \left (\lambda x \right ) {\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )+\frac {2 c_3 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} {\mathrm e}^{\cosh \left (\lambda x \right )^{2}} \lambda \sinh \left (\lambda x \right )}{\sqrt {\pi }}}{\lambda \sinh \left (\lambda x \right ) \left ({\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}}+c_3 \,{\mathrm e}^{-\frac {\cosh \left (\lambda x \right )^{2}}{2}} \operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )} \]
Simplifying the above gives
\begin{align*} y &= \frac {-2 c_3 \,{\mathrm e}^{\cosh \left (\lambda x \right )^{2}}+\sqrt {\pi }\, \cosh \left (\lambda x \right ) \left (1+c_3 \,\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )}{\sqrt {\pi }\, \left (1+c_3 \,\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {-2 c_3 \,{\mathrm e}^{\cosh \left (\lambda x \right )^{2}}+\sqrt {\pi }\, \cosh \left (\lambda x \right ) \left (1+c_3 \,\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )}{\sqrt {\pi }\, \left (1+c_3 \,\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right )\right )} \\ \end{align*}
2.5.4.2 Maple. Time used: 0.004 (sec). Leaf size: 51
ode:=diff(y(x),x) = lambda*sinh(lambda*x)*y(x)^2-lambda*sinh(lambda*x)^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 \left ({\mathrm e}^{\frac {\cosh \left (2 \lambda x \right )}{2}+\frac {1}{2}} c_1 -\frac {\cosh \left (\lambda x \right ) \sqrt {\pi }\, \left (\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right ) c_1 +1\right )}{2}\right )}{\sqrt {\pi }\, \left (\operatorname {erfi}\left (\cosh \left (\lambda x \right )\right ) c_1 +1\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 sub-methods: 
   trying Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = lambda*cosh(lambda*x 
)/sinh(lambda*x)*diff(y(x),x)+sinh(lambda*x)^4*lambda^2*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 = arccosh(t)/lambda] 
         Linear ODE actually solved: 
            -16*(t-1)^(1/2)*(t+1)^(1/2)*(t^4-2*t^2+1)*u(t)+16*(t-1)^(1/2)*(t+1)\ 
^(1/2)*(t^2-1)*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 )=\lambda \sinh \left (\lambda x \right ) y \left (x \right )^{2}-\lambda \sinh \left (\lambda x \right )^{3} \\ \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 )=\lambda \sinh \left (\lambda x \right ) y \left (x \right )^{2}-\lambda \sinh \left (\lambda x \right )^{3} \end {array} \]
2.5.4.3 Mathematica
ode=D[y[x],x]==\[Lambda]*Sinh[\[Lambda]*x]*y[x]^2-\[Lambda]*Sinh[\[Lambda]*x]^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

2.5.4.4 Sympy
from sympy import * 
x = symbols("x") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(-lambda_*y(x)**2*sinh(lambda_*x) + lambda_*sinh(lambda_*x)**3 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -lambda_*(y(x)**2 - sinh(lambda_*x)**2)*sinh(lambda_*x) + Deriva
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0
 
classify_ode(ode,func=y(x)) 
 
('factorable', '1st_power_series', 'lie_group')