60.1.192 problem 195

Internal problem ID [10206]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 195
Date solved : Sunday, March 30, 2025 at 03:30:36 PM
CAS classification : [_Riccati]

\begin{align*} \sin \left (x \right ) y^{\prime }-y^{2} \sin \left (x \right )^{2}+\left (\cos \left (x \right )-3 \sin \left (x \right )\right ) y+4&=0 \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 26
ode:=sin(x)*diff(y(x),x)-y(x)^2*sin(x)^2+(cos(x)-3*sin(x))*y(x)+4 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {4 \left ({\mathrm e}^{5 x} c_1 +1\right ) \csc \left (x \right )}{{\mathrm e}^{5 x} c_1 -4} \]
Mathematica. Time used: 0.246 (sec). Leaf size: 32
ode=Sin[x]*D[y[x],x] - y[x]^2*Sin[x]^2 + (Cos[x] - 3*Sin[x])*y[x] + 4==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \left (-4+\frac {1}{\frac {1}{5}+c_1 e^{5 x}}\right ) \csc (x) \\ y(x)\to -4 \csc (x) \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-3*sin(x) + cos(x))*y(x) - y(x)**2*sin(x)**2 + sin(x)*Derivative(y(x), x) + 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -y(x)**2*sin(x) - 3*y(x) + y(x)/tan(x) + Derivative(y(x), x) + 4/sin(x) cannot be solved by the factorable group method