2.6.8 Problem 25
Internal
problem
ID
[13343]
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-2.
Equations
with
hyperbolic
tangent
and
cotangent.
Problem
number
:
25
Date
solved
:
Sunday, January 18, 2026 at 07:24:14 PM
CAS
classification
:
[_Riccati]
2.6.8.1 Solved using first_order_ode_riccati_by_guessing_particular_solution
1.477 (sec)
Entering first order ode riccati guess solver
\begin{align*}
\left (a \coth \left (\lambda x \right )+b \right ) y^{\prime }&=y^{2}+c \coth \left (\mu x \right ) y-d^{2}+c d \coth \left (\mu x \right ) \\
\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 {c d \coth \left (\mu x \right )}{a \coth \left (\lambda x \right )+b}-\frac {d^{2}}{a \coth \left (\lambda x \right )+b}\\ f_1(x) & =\frac {c \coth \left (\mu x \right )}{a \coth \left (\lambda x \right )+b}\\ f_2(x) &=\frac {1}{a \coth \left (\lambda x \right )+b} \end{align*}
Using trial and error, the following particular solution was found
\[
y_p = -d
\]
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 = -d +\frac {{\mathrm e}^{\frac {\left (c -2 d \right ) x}{a +b}-\frac {2 c x}{a +b}+\frac {c \ln \left ({\mathrm e}^{2 \mu x}-1\right )}{\mu \left (a +b \right )}+\int -\frac {2 \left (c \,{\mathrm e}^{2 \mu x}-2 d \,{\mathrm e}^{2 \mu x}+c +2 d \right ) a}{\left ({\mathrm e}^{2 \lambda x} a +b \,{\mathrm e}^{2 \lambda x}+a -b \right ) \left (a +b \right ) \left ({\mathrm e}^{2 \mu x}-1\right )}d x}}{c_1 -\int \frac {{\mathrm e}^{\frac {\left (c -2 d \right ) x}{a +b}-\frac {2 c x}{a +b}+\frac {c \ln \left ({\mathrm e}^{2 \mu x}-1\right )}{\mu \left (a +b \right )}+\int -\frac {2 \left (c \,{\mathrm e}^{2 \mu x}-2 d \,{\mathrm e}^{2 \mu x}+c +2 d \right ) a}{\left ({\mathrm e}^{2 \lambda x} a +b \,{\mathrm e}^{2 \lambda x}+a -b \right ) \left (a +b \right ) \left ({\mathrm e}^{2 \mu x}-1\right )}d x}}{a \coth \left (\lambda x \right )+b}d x}
\]
Summary of solutions found
\begin{align*}
y &= -d +\frac {{\mathrm e}^{\frac {\left (c -2 d \right ) x}{a +b}-\frac {2 c x}{a +b}+\frac {c \ln \left ({\mathrm e}^{2 \mu x}-1\right )}{\mu \left (a +b \right )}+\int -\frac {2 \left (c \,{\mathrm e}^{2 \mu x}-2 d \,{\mathrm e}^{2 \mu x}+c +2 d \right ) a}{\left ({\mathrm e}^{2 \lambda x} a +b \,{\mathrm e}^{2 \lambda x}+a -b \right ) \left (a +b \right ) \left ({\mathrm e}^{2 \mu x}-1\right )}d x}}{c_1 -\int \frac {{\mathrm e}^{\frac {\left (c -2 d \right ) x}{a +b}-\frac {2 c x}{a +b}+\frac {c \ln \left ({\mathrm e}^{2 \mu x}-1\right )}{\mu \left (a +b \right )}+\int -\frac {2 \left (c \,{\mathrm e}^{2 \mu x}-2 d \,{\mathrm e}^{2 \mu x}+c +2 d \right ) a}{\left ({\mathrm e}^{2 \lambda x} a +b \,{\mathrm e}^{2 \lambda x}+a -b \right ) \left (a +b \right ) \left ({\mathrm e}^{2 \mu x}-1\right )}d x}}{a \coth \left (\lambda x \right )+b}d x} \\
\end{align*}
2.6.8.2 ✓ Maple. Time used: 0.011 (sec). Leaf size: 198
ode:=(a*coth(lambda*x)+b)*diff(y(x),x) = y(x)^2+c*coth(mu*x)*y(x)-d^2+c*d*coth(mu*x);
dsolve(ode,y(x), singsol=all);
\[
y = -d +\frac {{\mathrm e}^{c \int \frac {\coth \left (\mu x \right )}{a \coth \left (\lambda x \right )+b}d x} \left (\coth \left (\lambda x \right )-1\right )^{\frac {d}{\lambda \left (a +b \right )}} \left (\coth \left (\lambda x \right )+1\right )^{\frac {d}{\lambda \left (a -b \right )}} \left (a \coth \left (\lambda x \right )+b \right )^{-\frac {2 a d}{\lambda \left (a^{2}-b^{2}\right )}}}{-\int \left (a \coth \left (\lambda x \right )+b \right )^{-\frac {a^{2} \lambda -b^{2} \lambda +2 a d}{\lambda \left (a^{2}-b^{2}\right )}} \left (\coth \left (\lambda x \right )-1\right )^{\frac {d}{\lambda \left (a +b \right )}} \left (\coth \left (\lambda x \right )+1\right )^{\frac {d}{\lambda \left (a -b \right )}} {\mathrm e}^{c \int \frac {\coth \left (\mu x \right )}{a \coth \left (\lambda x \right )+b}d x}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 \coth \left (\lambda x \right )+b \right ) \left (\frac {d}{d x}y \left (x \right )\right )=y \left (x \right )^{2}+c \coth \left (\mu x \right ) y \left (x \right )-d^{2}+c d \coth \left (\mu x \right ) \\ \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}+c \coth \left (\mu x \right ) y \left (x \right )-d^{2}+c d \coth \left (\mu x \right )}{a \coth \left (\lambda x \right )+b} \end {array} \]
2.6.8.3 ✓ Mathematica. Time used: 27.818 (sec). Leaf size: 808
ode=(a*Coth[\[Lambda]*x]+b)*D[y[x],x]==y[x]^2+c*Coth[\[Mu]*x]*y[x]-d^2+c*d*Coth[\[Mu]*x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} \text {Solution too large to show}\end{align*}
2.6.8.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
d = symbols("d")
lambda_ = symbols("lambda_")
mu = symbols("mu")
y = Function("y")
ode = Eq(-c*d/tanh(mu*x) - c*y(x)/tanh(mu*x) + d**2 + (a/tanh(lambda_*x) + b)*Derivative(y(x), x) - y(x)**2,0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
TypeError : Invalid NaN comparison
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', 'lie_group')