61.9.4 problem 4

Internal problem ID [12099]
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.6-1. Equations with sine
Problem number : 4
Date solved : Wednesday, March 05, 2025 at 04:20:16 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 76
ode:=diff(y(x),x) = y(x)^2+a*sin(beta*x)*y(x)+a*b*sin(beta*x)-b^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {b \left (\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x \right )-c_{1} b +{\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}}{-\int {\mathrm e}^{\frac {-2 b \beta x -a \cos \left (\beta x \right )}{\beta }}d x +c_{1}} \]
Mathematica. Time used: 3.243 (sec). Leaf size: 208
ode=D[y[x],x]==y[x]^2+a*Sin[\[Beta]*x]*y[x]+a*b*Sin[\[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 \sin (\beta K[1]))dK[1]\right ) (-b+a \sin (\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 \sin (\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 \sin (\beta K[1]))dK[1]\right ) (-b+K[3]+a \sin (\beta K[2]))}{a \beta (b+K[3])^2}-\frac {\exp \left (-\int _1^{K[2]}(2 b-a \sin (\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*sin(BETA*x) - a*y(x)*sin(BETA*x) + b**2 - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*b*sin(BETA*x) - a*y(x)*sin(BETA*x) + b**2 - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method