23.1.25 problem 20

Internal problem ID [4632]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 20
Date solved : Tuesday, September 30, 2025 at 07:37:32 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\csc \left (x \right )+2 y \cot \left (x \right )&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)+csc(x)+2*y(x)*cot(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\cos \left (x \right )+c_1 \right ) \csc \left (x \right )^{2} \]
Mathematica. Time used: 0.022 (sec). Leaf size: 15
ode=D[y[x],x]+Csc[x]+2*y[x]*Cot[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \csc ^2(x) (\cos (x)+c_1) \end{align*}
Sympy. Time used: 0.483 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)/tan(x) + Derivative(y(x), x) + 1/sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \cos {\left (x \right )}}{\sin ^{2}{\left (x \right )}} \]