61.5.2 problem 2

Internal problem ID [12047]
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 : 2
Date solved : Sunday, March 30, 2025 at 10:21:26 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.005 (sec). Leaf size: 73
ode:=diff(y(x),x) = y(x)^2+a*sinh(beta*x)*y(x)+a*b*sinh(beta*x)-b^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {b \int {\mathrm e}^{\frac {-2 b x \beta +a \cosh \left (\beta x \right )}{\beta }}d x -b c_1 +{\mathrm e}^{\frac {-2 b x \beta +a \cosh \left (\beta x \right )}{\beta }}}{-\int {\mathrm e}^{\frac {-2 b x \beta +a \cosh \left (\beta x \right )}{\beta }}d x +c_1} \]
Mathematica. Time used: 1.273 (sec). Leaf size: 208
ode=D[y[x],x]==y[x]^2+a*Sinh[\[Beta]*x]*y[x]+a*b*Sinh[\[Beta]*x]-b^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x-\frac {\exp \left (-\int _1^{K[2]}(2 b-a \sinh (\beta K[1]))dK[1]\right ) (-b+a \sinh (\beta K[2])+y(x))}{a \beta (b+y(x))}dK[2]+\int _1^{y(x)}\left (\frac {\exp \left (-\int _1^x(2 b-a \sinh (\beta K[1]))dK[1]\right )}{a \beta (b+K[3])^2}-\int _1^x\left (\frac {\exp \left (-\int _1^{K[2]}(2 b-a \sinh (\beta K[1]))dK[1]\right ) (-b+K[3]+a \sinh (\beta K[2]))}{a \beta (b+K[3])^2}-\frac {\exp \left (-\int _1^{K[2]}(2 b-a \sinh (\beta K[1]))dK[1]\right )}{a \beta (b+K[3])}\right )dK[2]\right )dK[3]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
BETA = symbols("BETA") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*b*sinh(BETA*x) - a*y(x)*sinh(BETA*x) + b**2 - y(x)**2 + Derivative(y(x), x),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.