61.5.6 problem 6

Internal problem ID [12051]
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 : 6
Date solved : Sunday, March 30, 2025 at 10:22:24 PM
CAS classification : [_Riccati]

\begin{align*} \left (a \sinh \left (\lambda x \right )+b \right ) y^{\prime }&=y^{2}+c \sinh \left (\mu x \right ) y-d^{2}+c d \sinh \left (\mu x \right ) \end{align*}

Maple. Time used: 0.014 (sec). Leaf size: 253
ode:=(sinh(lambda*x)*a+b)*diff(y(x),x) = y(x)^2+c*sinh(x*mu)*y(x)-d^2+c*d*sinh(x*mu); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-d \int \frac {{\mathrm e}^{\frac {c \int \frac {\sinh \left (\mu x \right )}{a \sinh \left (\lambda x \right )+b}d x \sqrt {a^{2}+b^{2}}\, \lambda +4 d \,\operatorname {arctanh}\left (\frac {-b \tanh \left (\frac {\lambda x}{2}\right )+a}{\sqrt {a^{2}+b^{2}}}\right )}{\lambda \sqrt {a^{2}+b^{2}}}}}{a \sinh \left (\lambda x \right )+b}d x +d c_1 -{\mathrm e}^{\frac {c \int \frac {\sinh \left (\mu x \right )}{a \sinh \left (\lambda x \right )+b}d x \sqrt {a^{2}+b^{2}}\, \lambda +4 d \,\operatorname {arctanh}\left (\frac {-b \tanh \left (\frac {\lambda x}{2}\right )+a}{\sqrt {a^{2}+b^{2}}}\right )}{\lambda \sqrt {a^{2}+b^{2}}}}}{\int \frac {{\mathrm e}^{\frac {c \int \frac {\sinh \left (\mu x \right )}{a \sinh \left (\lambda x \right )+b}d x \sqrt {a^{2}+b^{2}}\, \lambda +4 d \,\operatorname {arctanh}\left (\frac {-b \tanh \left (\frac {\lambda x}{2}\right )+a}{\sqrt {a^{2}+b^{2}}}\right )}{\lambda \sqrt {a^{2}+b^{2}}}}}{a \sinh \left (\lambda x \right )+b}d x -c_1} \]
Mathematica. Time used: 5.957 (sec). Leaf size: 289
ode=(a*Sinh[\[Lambda]*x]+b)*D[y[x],x]==y[x]^2+c*Sinh[\[Mu]*x]*y[x]-d^2+c*d*Sinh[\[Mu]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x-\frac {\exp \left (-\int _1^{K[2]}\frac {2 d-c \sinh (\mu K[1])}{b+a \sinh (\lambda K[1])}dK[1]\right ) (-d+c \sinh (\mu K[2])+y(x))}{c \mu (b+a \sinh (\lambda K[2])) (d+y(x))}dK[2]+\int _1^{y(x)}\left (\frac {\exp \left (-\int _1^x\frac {2 d-c \sinh (\mu K[1])}{b+a \sinh (\lambda K[1])}dK[1]\right )}{c \mu (d+K[3])^2}-\int _1^x\left (\frac {\exp \left (-\int _1^{K[2]}\frac {2 d-c \sinh (\mu K[1])}{b+a \sinh (\lambda K[1])}dK[1]\right ) (-d+K[3]+c \sinh (\mu K[2]))}{c \mu (d+K[3])^2 (b+a \sinh (\lambda K[2]))}-\frac {\exp \left (-\int _1^{K[2]}\frac {2 d-c \sinh (\mu K[1])}{b+a \sinh (\lambda K[1])}dK[1]\right )}{c \mu (d+K[3]) (b+a \sinh (\lambda K[2]))}\right )dK[2]\right )dK[3]=c_1,y(x)\right ] \]
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*sinh(mu*x) - c*y(x)*sinh(mu*x) + d**2 + (a*sinh(lambda_*x) + b)*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
PolynomialDivisionFailed : couldnt reduce degree in a polynomial division algorithm when dividing [[], [ANP([mpq(-1,1), mpq(0,1)], [mpq(1,1), mpq(0,1), mpq(1,1)], QQ), ANP([mpq(1,1)], [mpq(1,1), mpq(0,1), mpq(1,1)], QQ)]] by [[ANP([mpq(1,1)], [mpq(1,1), mpq(0,1), mpq(1,1)], QQ)]]. This can happen when its not possible to detect zero in the coefficient domain. The domain of computation is QQ<I>. Zero detection is guaranteed in this coefficient domain. This may indicate a bug in SymPy or the domain is user defined and doesnt implement zero detection properly.