29.3.18 problem 72

Internal problem ID [4680]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 3
Problem number : 72
Date solved : Sunday, March 30, 2025 at 03:36:18 AM
CAS classification : [_Riccati]

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

Maple. Time used: 0.006 (sec). Leaf size: 26
ode:=diff(y(x),x)+4*csc(x) = (3-cot(x))*y(x)+y(x)^2*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\csc \left (x \right ) \left (-4 c_1 \,{\mathrm e}^{5 x}+1\right )}{c_1 \,{\mathrm e}^{5 x}+1} \]
Mathematica. Time used: 0.25 (sec). Leaf size: 32
ode=D[y[x],x]+4 Csc[x]==(3-Cot[x])y[x]+y[x]^2 Sin[x]; 
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 + 1/tan(x))*y(x) - y(x)**2*sin(x) + Derivative(y(x), x) + 4/sin(x),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