55.19.29 problem 29

Internal problem ID [13514]
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.8-1. Equations containing arbitrary functions (but not containing their derivatives).
Problem number : 29
Date solved : Wednesday, October 01, 2025 at 03:49:38 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=\lambda \sin \left (\lambda x \right ) y^{2}+f \left (x \right ) \cos \left (\lambda x \right ) y-f \left (x \right ) \end{align*}
Maple. Time used: 0.031 (sec). Leaf size: 62
ode:=diff(y(x),x) = lambda*sin(lambda*x)*y(x)^2+f(x)*cos(lambda*x)*y(x)-f(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {c_1 \,{\mathrm e}^{\int \left (\cos \left (\lambda x \right ) f \left (x \right )+2 \lambda \tan \left (\lambda x \right )\right )d x}}{\lambda \int {\mathrm e}^{\int \left (\cos \left (\lambda x \right ) f \left (x \right )+2 \lambda \tan \left (\lambda x \right )\right )d x} \sin \left (\lambda x \right )d x c_1 -1}+\sec \left (\lambda x \right ) \]
Mathematica
ode=D[y[x],x]==\[Lambda]*Sin[\[Lambda]*x]*y[x]^2+f[x]*Cos[\[Lambda]*x]*y[x]-f[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

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