61.13.4 problem 50

Internal problem ID [12145]
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-5. Equations containing combinations of trigonometric functions.
Problem number : 50
Date solved : Wednesday, March 05, 2025 at 04:53:22 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 1066
ode:=diff(y(x),x) = a*cos(lambda*x)*y(x)^2+b*cos(lambda*x)*sin(lambda*x)^n; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]
Mathematica. Time used: 0.656 (sec). Leaf size: 633
ode=D[y[x],x]==a*Cos[\[Lambda]*x]*y[x]^2+b*Cos[\[Lambda]*x]*Sin[\[Lambda]*x]^n; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
cg = symbols("cg") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*y(x)**2*cos(cg*x) - b*sin(cg*x)**n*cos(cg*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(a*y(x)**2 + b*sin(cg*x)**n)*cos(cg*x) + Derivative(y(x), x) cannot be solved by the factorable group method